py2exe, pyparallel

garyr at fidalgo.net garyr at fidalgo.net
Sun Nov 13 20:55:04 EST 2005


Chris Mellon wrote:
> On 13 Nov 2005 10:03:52 -0800, garyr at fidalgo.net <garyr at fidalgo.net> wrote:
> > 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.
>
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
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?




More information about the Python-list mailing list