aleax at aleax.it
Thu Mar 6 23:30:29 CET 2003
> Can anyone tell me why *untouched* "pure embedding" example from
> python.org just does not work? The code can be found at
> I wote the following script:
> def func(a,b):
> return a+b
> And I get:
> [root at khorne python]# ./call ./script.py func 1 2
> ValueError: Empty module name
> Failed to load "./script.py"
The example usage give in the URL you quote is:
$ call multiply 3 2
Hint: does the example usage give a path and extension?
Does your failing use attempt give them?
I think the example will probably also fail when used
as documented, because the current directory is not, by
default, in sys.path for embedded Python -- I just posted
about this and the solution[s] in another thread, just
a few hours ago, so please look my other post up for details.
More information about the Python-list