Thanks [EMAIL PROTECTED] wrote: (snip) PyRun_SimpleString("sys.path.append('.\')\n");(snip)I try to throw in my 5 Cent: The backslash (Windows path separator?) following the dot might be the problem. So let me guess, the program runs on Windows, but not on Unix.(Sorry for my silly quoting, but
(snip)
PyRun_SimpleString("sys.path.append('.\')\n");
(snip)
I try to throw in my 5 Cent: The backslash (Windows path separator?)
following the dot might be the problem. So let me guess, the program runs
on Windows, but not on Unix.
(Sorry for my silly quoting, but Lotus Notes is a pain!)
Hi! Bob
As I said, I can import it from command line
by
>pythonw
>import StringModule
>
By the way, the StringModule has been installed in the
MacPython system as I do a setup.
The sys.path print out as following:
=
zhi-pengs-power-mac-g5:~/Desktop/zhiyong/ScriptSupport
zpeng
If sys.path is correct, then it would import. I don't believe you,
show the sys.path from the python interpreter and show it from your
program.
-bob
On Dec 12, 2005, at 9:40 AM, Zhi Peng wrote:
>
> Hi! Bob
>
> Following is the main code that I used for test. The
> sys.path seems correct bec
Hi! Bob
Following is the main code that I used for test. The
sys.path seems correct because I can import when I use
pythonw and import SringModule. Everytime I run the
program, it said "can not import
StringModule". One might use a simple module with only
one sentance inside as a "StringModule.
Well I have no idea whether you're extending or embedding Python..
and if you are embedding, I have no idea what steps you've taken to
initialize the interpreter... so I'm not sure.
Like I said before, what you need to do is make absolutely sure
you're using the correct Python interpreter, f
Hi! Bob I have not tried to append current directory in sys.path. Maybe I need to do sth sys.path.append("./") and then do import. The module is installed in MacPython package. The os module is in python23.dylib so it can find it and import it. But my module is just a py file. Thanks
On Dec 9, 2005, at 4:41 PM, Zhi Peng wrote:
> In my c code, I have used myMod=PyImport_ImportModule("moduleName")
> and run on Mac, but it just can not import the "moduleName" for
> some unknown reason.
>
> I am sure I install the "moduleName" by "pythonw setup install".
> And I can import
Hi! All In my c code, I have used myMod=PyImport_ImportModule("moduleName") and run on Mac, but it just can not import the "moduleName" for some unknown reason. I am sure I install the "moduleName" by "pythonw setup install". And I can import "moduleName" from command lines such as >