Pure Embedding
Alex Martelli
aleax at aleax.it
Thu Mar 6 17:30:29 EST 2003
More information about the Python-list mailing list
Thu Mar 6 17:30:29 EST 2003
- Previous message (by thread): Problem finding modules
- Next message (by thread): Pure Embedding
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Khorne wrote: > Hello! > > Can anyone tell me why *untouched* "pure embedding" example from > python.org just does not work? The code can be found at > http://www.python.org/doc/2.2.2/ext/pure-embedding.html > > I wote the following script: > > -script.py- > > def func(a,b): > return a+b > > -end- > > And I get: > > [root at khorne python]# ./call ./script.py func 1 2 > ValueError: Empty module name > Failed to load "./script.py" > > WTF? 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. Alex
- Previous message (by thread): Problem finding modules
- Next message (by thread): Pure Embedding
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list