win32 pyserial requires javax.comm for py2exe?

Grant Edwards grante at visi.com
Tue Jun 29 12:52:49 EDT 2004


On 2004-06-29, Grant Edwards <grante at visi.com> wrote:

> Everything works fine until I add an "include serial", then 
> py2exe fails because
>
>   The following modules appear to be missing
>   ['javax.comm']
>
> Apparently serial.py imports a both the posix and java versions
> of things even on a win32 platform?

Removing the lines in site-packages/serial/__init__.py that
import the foreign platform stuff (java, posix) fixes things.

Platform-dependant imports are "a bad thing" when you want to
package up stuff with py2exe -- you end up with Mac and Unix
and Java stuff in your distribution since py2exe has no way to
tell which conditional imports to pay attention to.

-- 
Grant Edwards                   grante             Yow!  I once decorated my
                                  at               apartment entirely in ten
                               visi.com            foot salad forks!!



More information about the Python-list mailing list