Problem building Python 1.6 on NT...

dts42 at my-deja.com dts42 at my-deja.com
Fri Oct 20 09:09:14 EDT 2000


I am having a problem building a good python 1.6 on NT.

Installing the binary distribution of Python 1.6 for NT does not
expose all of the functions that are documented as available for
NT.  Specifically I want to use the os.tmpnam and os.tempname
functions documented in "os - 6.1.4 Files and Directories".

To get these I downloaded the source distrib and loaded up the
workspace in dev studio 6.0, edited the posixmodule.c file in the
python16 files project to add the necessary #defines and compiled it
(along with tcl/tk) and installed
the binaries/dll/support files out in D:\some\install\dir (the bin
dir under that is in my NT PATH).  Now the os.tmpnam and os.tempnam
functions are exposed and work, BUT...

If I try to import the 'fnmatch' module I get the traceback:
>>> import fnmatch
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "D:\some\install\dir\lib\Python-1.6\lib\fnmatch.py",
    line 13, in ?
    import re
  File "D:\some\install\dir\lib\Python-1.6\lib\re.py", line 28,
    in ?
    from sre import *
  File "D:\some\install\dir\lib\Python-1.6\lib\sre.py", line 19,
    in ?
    import sre_compile
  File "D:\some\install\dir\lib\Python-1.6\lib\sre_compile.py",
    line 11, in ?
    import _sre
ImportError: No module named _sre
>>>

I DO NOT get the traceback if I try this with the binary distrib I
had installed in C:\Program Files\Python.

Even stranger (to me anyway) is that everything seems to work if I
run the python executable that I compiled BUT set PYTHONHOME to
C:\Program Files\Python (the binary distribs support files)...

What is going on here?  Any ideas how I can build and configure
python to run correctly?  I need to remove my current dependency
on the installed binary distribution so that I can remove it.

Thanks in advance for any help!

Dave


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list