[Ironpython-users] Distributing apps

Markus Schaber m.schaber at 3s-software.com
Mon Mar 5 09:38:37 CET 2012

Hi, Mark,

Von: mchalkley at mail.com
> I have one more question regarding deploying python apps. If I put the python libraries I'm using (string, etc.) into a zip file, the app doesn't see it in the current working directory, for some reason.
> Since there's no PYTHONPATH on the target machine, and the 'os' module isn't available until after the library is imported, what's the best way to specify the path to the zipped lib file? I can specify a complete path, using sys.path.append (e.g. 'c:\lib.zip'), which requres putting it there, but is there a way specify the current working directory, so I can deploy the program in one place, rather than making the user copy the library to C:\ directory?

If you don't find a "nice" solution, there are 2 things to keep in mind which could help you to create a workaround:

- Some IronPython modules are implemented in C#, and are in the IronPython.dll or IronPython.Modules.dll. Those modules should be available for "import" even without any pathes set.

- You always can use the .NET libraries to find about the current working directory or such things.



Best regards

Markus Schaber
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 

More information about the Ironpython-users mailing list