Stern inaktivStern inaktivStern inaktivStern inaktivStern inaktiv
Python allows to bundle a lot of Python files with py2exe in one executable for Windows. That way a simple call of this exe allows to start the Python program. No installation is required. I don't like windows and use Linux instead. That's why I had to search for a similar solution on Linux. I just want to have all my Python code bundled in one shell script and to be able to distribute one bash file only instead of the whole set of python files.

I found this site. In addition (because it's referred by the previous site) I found the Python Cookbook from Oreilly. There it's desribed in detail how this method works with some restriction which are removed in the first link. Unfortunately I had problems when I called my generated shell script. Everytime I got.

traceback (most recent call last):
  File "<string>", line 17, in <module>
ImportError: No module named main

It's not that difficult to fix this - if you read the doc about Modules and Packages on
I had defined a file which has a main defined. Then I changed in the template script
import main
import collectNWData
and everything works as expected.
Kommentar schreiben


Spam Kommentare werden gelöscht und nicht veröffentlicht. Die Überprüfung wird manuell vorgenommen und deshalb dauert es i.d.R. zwischen ein paar Stunden bis zu einem Tag bis ein Kommentar veröffentlicht wird.