py2exe windows apps path question

Grant Edwards grante at visi.com
Tue Aug 2 15:32:13 EDT 2005


On 2005-08-02, vincent wehren <vincent at visualtrans.de> wrote:

> If you are building paths in you code that are relative to
> your app,

I'm not using any paths.  I use cytpes to load a .dll, and I
don't really know what gnuplot-py is doing, but I think it's
executing a .exe file and talking to it via a pipe or something.

> please see my reply to Greg's post. If not, you may
> as a workaround want to try to add the frozen application's
> directory to the system path environment variable. Windows
> will look for dlls there, too.

That's probably the right answer.

> To get the app's actual location, you will need something like
> the getAppPrefix() function as per my reply to Greg's reply.
> The getAppPrefix() function will also hold when the user adds
> your frozen app to his/her system path and call the app from
> any location from the command line - sys.argv[0] just won't do
> the trick in such a setting.

I'll give that a try.

-- 
Grant Edwards                   grante             Yow!  .. I think I'd
                                  at               better go back to my DESK
                               visi.com            and toy with a few common
                                                   MISAPPREHENSIONS...



More information about the Python-list mailing list