py2exe, pyparallel

G

garyr

I'm using py2exe to create a standalone program that uses pyparallel.
When I run the created program an error occurs and a message directs me
to
the log file which contains:

Traceback (most recent call last):
File "fg.py", line 30, in ?
import dds2
File "dds2.pyc", line 24, in ?
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR
File "parallel\__init__.pyc", line 13, in ?
File "parallel\parallelwin32.pyc", line 59, in ?
File "ctypes\__init__.pyc", line 407, in __getattr__
File "ctypes\__init__.pyc", line 319, in __init__
WindowsError: [Errno 1157] One of the library files needed to run this
application cannot be found

My setup.py is:
from distutils.core import setup
import py2exe
setup(windows = ["fg.py"])

Line 59 in parallelwin32.py is: _pyparallel = ctypes.windll.simpleio.

I'm using PythonWin 2.3.2 on Win98SE. I have ctypes 0.9.6, py2exe 0.6.3
and pyparallel 0.2 installed.

I posted a similar message to the py2exe mailing list but apparently
that list is inactive. Any suggestions appreciated.

Thanks,
Gary Richardson
 
C

Chris Mellon

I'm using py2exe to create a standalone program that uses pyparallel.
When I run the created program an error occurs and a message directs me
to
the log file which contains:

Traceback (most recent call last):
File "fg.py", line 30, in ?
import dds2
File "dds2.pyc", line 24, in ?
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR
File "parallel\__init__.pyc", line 13, in ?
File "parallel\parallelwin32.pyc", line 59, in ?
File "ctypes\__init__.pyc", line 407, in __getattr__
File "ctypes\__init__.pyc", line 319, in __init__
WindowsError: [Errno 1157] One of the library files needed to run this
application cannot be found

My setup.py is:
from distutils.core import setup
import py2exe
setup(windows = ["fg.py"])

Line 59 in parallelwin32.py is: _pyparallel = ctypes.windll.simpleio.

I'm using PythonWin 2.3.2 on Win98SE. I have ctypes 0.9.6, py2exe 0.6.3
and pyparallel 0.2 installed.

I posted a similar message to the py2exe mailing list but apparently
that list is inactive. Any suggestions appreciated.

Thanks,
Gary Richardson

This *looks* like all that's happening is that ctypes is unable to
load the dll simpleio.dll , which is not a standard windows library
and therefore needs to be somewhere LoadLibrary can find it.
 
G

garyr

Chris said:
I'm using py2exe to create a standalone program that uses pyparallel.
When I run the created program an error occurs and a message directs me
to
the log file which contains:

Traceback (most recent call last):
File "fg.py", line 30, in ?
import dds2
File "dds2.pyc", line 24, in ?
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR
File "parallel\__init__.pyc", line 13, in ?
File "parallel\parallelwin32.pyc", line 59, in ?
File "ctypes\__init__.pyc", line 407, in __getattr__
File "ctypes\__init__.pyc", line 319, in __init__
WindowsError: [Errno 1157] One of the library files needed to run this
application cannot be found

My setup.py is:
from distutils.core import setup
import py2exe
setup(windows = ["fg.py"])

Line 59 in parallelwin32.py is: _pyparallel = ctypes.windll.simpleio.

I'm using PythonWin 2.3.2 on Win98SE. I have ctypes 0.9.6, py2exe 0.6.3
and pyparallel 0.2 installed.

I posted a similar message to the py2exe mailing list but apparently
that list is inactive. Any suggestions appreciated.

Thanks,
Gary Richardson

This *looks* like all that's happening is that ctypes is unable to
load the dll simpleio.dll , which is not a standard windows library
and therefore needs to be somewhere LoadLibrary can find it.
Thanks for you reply.
Yes, copying simpleio.dll to my dist directory corrected the problem.
The
program now runs but I get an error message when it terminates that
directs
me to the log file where I find the message:

C:\MY DOCUMENTS\PYTHON\DDS\DIST\library.zip\dds2.py:96: FutureWarning:
x<<y
losing bits or changing sign will return a long in Python 2.4 and up

I added the statement "from __future__ import division" to dds2.py and
no
longer see that message when I run the program from Python. So why
should I
see it when the standalone program runs?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top