Re: Python deployment options.
king kikapu wrote: > Hi to all folks here, > > i just bought a book and started reading about this language. > I want to ask what options do we have to deploy a python program to > users that do not have the labguage installed ?? > > I mean, can i make an executable file, or something that contains the > runtime and the modules that the program only use or am i forced to > download the language to the user machine so the .py files can be run > ?? > > Thanks in advance, > > king kikapu Well, on Windows you have to look for the Py2Exe package (www.py2exe.org) On Mac OS X you can use Py2App (http://undefined.org/python/py2app.html) Mind you, on Windows there is one big potentional problem: Python is compiled with Visual Studio 2003 and needs msvcr71.dll. So Py2Exe wants to distribute that dll also, but if you don't have a valid Visual Studio license, you are not allowed to. It is explained further in this thread: http://groups.google.com/group/comp.lang.python/browse_frm/thread/bccb45b7dae7ddd5/dacec12e300a74d4#dacec12e300a74d4 I doubt Microsoft will unleash their lawyers on you, but it is a problem. -- http://mail.python.org/mailman/listinfo/python-list
can't figure out error: module has no attribute...
but it seems to depend on from where I start the Python shell. so I've got a module selfservicelabels.py with some variables defined, like this: BtnSave = "link=label.save" DeliveryAutomaat= "//[EMAIL PROTECTED]'deliveryMethod' and @value='AU']" This module is in the Lib directory. Now when I do import selfservicelabels selfservicelabels.BtnSave -> link=nmbs.label.save selfservicelabels.DeliveryAutomaat -> AttributeError: 'module' object has no attribute 'DeliveryAutomaat' to make it more strange: PyCrust and Idle recognise DeliveryAutomaat perfectly. Everything above is done with Python 2.4.3 on Windows XP SP2 So after some testing it seems to depend on from which partition I start Python. So open commandline and navigate to a dir on C: everything works perfectly. Close python shell en navigate to D: some variables in selfservicelabels.py are not known. What is going on here? Is this a known error? -- http://mail.python.org/mailman/listinfo/python-list
Re: can't figure out error: module has no attribute...
Thanks for the reply. you are indeed right, they were included from different places. from C:\Python24\Lib and D:\mydir But the strange thing is: anywhere on C: the file from C:\Python24\Lib was included. in D:\mydir the one from that directory BUT: anywhere else on D: apparantly the one from D:\mydir was included ?! I would expect it would come from c:\Python24\Lib. Now I changed the files and of course I cannot reproduce it anymore. Oh well, now it works. -- http://mail.python.org/mailman/listinfo/python-list