summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2004-06-29 22:08:28 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2004-06-29 22:08:28 +0000
commit290999b37be7a1815beb5c1a76547ad266a4961d (patch)
treeccd229ebfeed89fa009e85003cbc585df5c50a53
parent835996a8a2a86584da62495acdb615c4b8070f5e (diff)
downloadpyserial-git-290999b37be7a1815beb5c1a76547ad266a4961d.tar.gz
added py2exe demo script and a note in the readme
-rw-r--r--pyserial/README.txt11
-rw-r--r--pyserial/examples/setup_demo.py35
2 files changed, 46 insertions, 0 deletions
diff --git a/pyserial/README.txt b/pyserial/README.txt
index b476eb3..d29bbd6 100644
--- a/pyserial/README.txt
+++ b/pyserial/README.txt
@@ -209,6 +209,17 @@ Tips & Tricks
some platforms. Look at the tools from Roger Binns:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/bitpim/comscan/
+- When packagin a project with py2exe, it will likely print a warning about
+ missing modules 'javax.comm'. This warning is uncritical as the module is
+ used in the Jython implementation that is not used but packaged.
+
+ It can be avoided with:
+ setup(...
+ options = {'py2exe': {'excludes': ['javax.comm']}})
+
+ See also setup_demo.py in the examples.
+
+
References
----------
- Python: http://www.python.org
diff --git a/pyserial/examples/setup_demo.py b/pyserial/examples/setup_demo.py
new file mode 100644
index 0000000..854c0b9
--- /dev/null
+++ b/pyserial/examples/setup_demo.py
@@ -0,0 +1,35 @@
+# This is a setup.py example script for the use with py2exe
+from distutils.core import setup
+import py2exe
+import sys, os
+
+#this script is only useful for py2exe so just run that distutils command.
+#that allows to run it with a simple double click.
+sys.argv.append('py2exe')
+
+#get an icon from somewhere.. the python installation should have one:
+icon = os.path.join(os.path.dirname(sys.executable), 'py.ico')
+
+setup(
+ options = {'py2exe': {
+ 'excludes': ['javax.comm'],
+ 'optimize': 2,
+ 'dist_dir': 'dist',
+ }
+ },
+
+ name = "wxTerminal",
+ windows = [
+ {
+ 'script': "wxTerminal.py",
+ 'icon_resources': [(0x0004, icon)]
+ },
+ ],
+ zipfile = "stuff.lib",
+
+ description = "Simple serial terminal application",
+ version = "0.1",
+ author = "Chris Liechti",
+ author_email = "cliechti@gmx.net",
+ url = "http://pyserial.sf.net",
+)