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

*** Hinweis ***

Kommentare sind erwünscht. Aber um lästige Spamposts abweisen zu können gibt es ein paar Dinge die zu beachten sind:
  1. Kommentare mit dem Text http werden sofort zurückgewiesen mit der Meldung Sie sind nicht berechtigt den Tag zu verwenden. zz
  2. Kommentare werden manuell überprüft und es dauert deshalb in der Regel einen Tag bis sie veröffentlicht werden.