[capi-sig] PyImport_ImportModule and folders
Gustavo Carneiro
gjcarneiro at gmail.com
Wed Sep 3 17:06:02 CEST 2008
2008/9/3 anti00Zero <anti00Zero at gmx.de>
> Hello.
>
> I have a problem with importing a script in a folder.
> The script is in a folder simple\index.py. This folder is in the root
> folder of my application.
> I use boost 1.33.1 with Python 2.4.
>
> Here is my code:
>
> PyObject *pObject =
> PyImport_ImportModule(const_cast<char*>(pcSkriptName.c_str()));
>
> If I use pcSkriptName with value "index" all works right. Now I want to
> load this script in the folder simple.
> But pcSkriptName with value "simple.index" doesn't work.
>
> What shell I do?
>
Silly question, but do you have an __init__.py file in the "simple" folder ?
>
> Thanks for responding.
> --
> Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
> Der Eine für Alle: http://www.gmx.net/de/go/messenger03
> _______________________________________________
> capi-sig mailing list
> capi-sig at python.org
> http://mail.python.org/mailman/listinfo/capi-sig
>
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the capi-sig
mailing list