[Python.NET] PyTables working with python not working with python.net

Barton barton at bcdesignswell.com
Mon Mar 28 04:48:51 CEST 2011


I do believe (although I'm not an embedder myself) that this is the ol' 
"Can't use unicode strings on import statements" thing...
This is the reason for a new class called PyAnsiString().

You'll have to have a fairly recent version to see if that fixes things 
for you.
HTH,
Barton
On 03/27/2011 07:31 AM, Tanmoy wrote:
> python is written in pure C/C++. The point is to integrate C# codes in 
> python.net <http://python.net>. do go thru the list and u will be able 
> to find ur answer.
>
> T
>
> On Sat, Mar 26, 2011 at 1:44 AM, Guillaume Pichard 
> <kyomster at googlemail.com <mailto:kyomster at googlemail.com>> wrote:
>
>     Hello,
>
>     I am trying to use pytables with python.net <http://python.net>.
>     It is working great with python alone. What I am doing with
>     python.net <http://python.net> is:
>                 PythonEngine.Initialize();
>                 PythonEngine.AcquireLock();
>
>                 PyObject sys = PythonEngine.ImportModule("sys");
>                 PyObject path = sys.GetAttr("path");
>                 PyObject append = path.GetAttr("append");
>                 PyObject[] a = new PyObject[1];
>                 a[0] = new PyString("C:\\Python27\\Lib\\site-packages");
>                 append.Invoke(a);
>
>                 PyObject pyTables = PythonEngine.ImportModule("tables");
>                 if (pyTables == null)
>                     throw new PythonException();
>
>     The exception message is "ImportError : DLL load failed: Specified
>     module not found."
>
>     What could be the differences between python.net
>     <http://python.net> and python ? Is there any specific path to add ?
>
>     Thanks a lot,
>     Guillaume.
>
>
>     _________________________________________________
>     Python.NET mailing list - PythonDotNet at python.org
>     <mailto:PythonDotNet at python.org>
>     http://mail.python.org/mailman/listinfo/pythondotnet
>
>
>
>
> -- 
> Tanmoy Mukherjee
>
>
> _________________________________________________
> Python.NET mailing list - PythonDotNet at python.org
> http://mail.python.org/mailman/listinfo/pythondotnet


More information about the PythonDotNet mailing list