elias.collas at gulfstream.com
elias.collas at gulfstream.com
Tue Nov 6 13:30:26 EST 2007
I solved my own problem by putting _nrlib.so in a directory and using PythonPath to point to it. Just like it says in the docs ;) I also found an old post on this by Graham that gave me the hint. Thanks. This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain legally privileged and confidential information. If you are not an intended recipient, you are hereby notified that you have either received this message in error or through interception, and that any review, use, distribution, copying or disclosure of this message or its attachments is strictly prohibited and is subject to criminal and civil penalties. All personal messages express solely the sender's views and not those of Gulfstream Aerospace Corporation. If you received this message in error, please contact the sender by reply e-mail and destroy all copies of the original message. mod_python-bounces at modpython.org wrote on 11/06/2007 09:58:55 AM: > I've just upgraded to mod_python 3.3.1 and it has broken my apps. I'm > having problems importing some modules, so before I punt and set > > PythonOption mod_python.legacy.importer > > I would like to know how to import a module that I built with f2py. Here's > what I used to do: > > import _nrlib # _nrlib.so lives in the same directory as the importing > module > > That didn't work, so I tried > > from mod_python import apache > _nrlib = apache.import_module('~/_nrlib.so') > > mod_python finds the file, but I here's some of my traceback: > > File "/cluster/stress/u308168/public_html/gflat/splines.py", line 3, in > <module> > _nrlib = apache.import_module('~/_nrlib.so') > > File > "/cluster/stress/methods/opt/lib/python2.5/site- > packages/mod_python/importer.py", > line 296, in import_module > log, import_path) > > File > "/cluster/stress/methods/opt/lib/python2.5/site- > packages/mod_python/importer.py", > line 680, in import_module > execfile(file, module.__dict__) > > File "/cluster/stress/u308168/public_html/gflat/_nrlib.so", line 1 > > SyntaxError: Non-ASCII character '\x8c' in file > /cluster/stress/u308168/public_html/gflat/_nrlib.so on line 2, but no > encoding declared; see http://www.python.org/peps/pep-0263.html for details > (_nrlib.so, line 1) > > > > > > This e-mail message, including all attachments, is for the sole use of the > intended recipient(s) and may contain legally privileged and confidential > information. If you are not an intended recipient, you are hereby notified > that you have either received this message in error or through > interception, and that any review, use, distribution, copying or disclosure > of this message or its attachments is strictly prohibited and is subject to > criminal and civil penalties. All personal messages express solely the > sender's views and not those of Gulfstream Aerospace Corporation. If you > received this message in error, please contact the sender by reply e-mail > and destroy all copies of the original message. > > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|