RE: Windows Problem: Module Name Truncation

Hammond, Mark (MHammond@jm.cmutual.com.au)
Mon, 24 Apr 95 10:30:00 PDT

> Hi. I've installed python on a Windows (yuck)
> system, and the interpreter and everything
> I've written in it appear to work beautifully. The
> tkinter library, however, does not work. I
> keep getting complaints that there is no
> "create" attribute for tkinter. I have to think
> that this may stem from the fact that Windows
> filenames can be only 8 + 3 charcters long; many

I have this same problem. However, I dont think that you will find that
_attribute_ names get truncated - only module names itself - ie, if you have
an "Attribute Error", this is unlikely to be the problem.

> of the python library modules were longer. I've
> haphazardly truncated these, but I don't see how
> they could work as planned. Isn't there a Windows
> version of the library, or some sort of renaming
> convention?

For little one-off problems, I used to say:
try:
import longmodule
except ImportError:
import longmodu
longmodule = longmodu

However, Python 1.2 has solved this in a cleaner fashion. I adapted Guido's
"imp module" example code from the lib manual to support this in a much
cleaner way.

The implication here is that a "short naming convention" is the first 8
characters of the module name. Obviously this has long term name clash
potentials, but is not a problem at the moment.

FWIW - My build of Python 1.2 for NT, Win32s and Win95 has actually been
built. I only need to update the readme's, and upload to cwi! Hopefully
tonight!

Mark.