[Matplotlib-users] Win32 python 2.3 and User's Guide

This is sneaking in for python2.3 and windows. Here is the code
culprit below. We'll have to look into where this _subprocess module
is supposed to be coming from.

For now you can download
"http://effbot.org/downloads/subprocess-0.1-20041012.win32-py2.3.exe"
from "http://effbot.org/downloads/". I'll post a new python2.3 build
shortly that includes this.

if mswindows:
    import threading
    import msvcrt
    if 0: # <-- change this to use pywin32 instead of the _subprocess driver
        import pywintypes
        from win32api import GetStdHandle, STD_INPUT_HANDLE, \
                             STD_OUTPUT_HANDLE, STD_ERROR_HANDLE
        from win32api import GetCurrentProcess, DuplicateHandle, \
                             GetModuleFileName, GetVersion
        from win32con import DUPLICATE_SAME_ACCESS, SW_HIDE
        from win32pipe import CreatePipe
        from win32process import CreateProcess, STARTUPINFO, \
                                 GetExitCodeProcess, STARTF_USESTDHANDLES, \
                                 STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE
        from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0
    else:
        from _subprocess import *
        class STARTUPINFO:
            dwFlags = 0
            hStdInput = None
            hStdOutput = None
            hStdError = None
        class pywintypes:
            error = IOError
else:
    import select
    import errno
    import fcntl
    import pickle

···

On 3/16/06, daigos@...331... <daigos@...331...> wrote:

Hi All,

I installed the new release for win32 and python 2.3 but
every time that I import the pylab, I receive the
following error:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Python23>python FIRExample --verbose-helpful
matplotlib data path
C:\Python23\lib\site-packages\matplotlib\mpl-data
$HOME=C:\Documents and Settings\a
CONFIGDIR=C:\Documents and Settings\a\.matplotlib
loaded rc file
C:\Python23\lib\site-packages\matplotlib\mpl-data\matplotlibrc
matplotlib version 0.87.2
verbose.level helpful
interactive is False
platform is win32
numerix Numeric 23.6
font search path
['C:\\Python23\\lib\\site-packages\\matplotlib\\mpl-data']
loaded ttfcache file C:\Documents and
Settings\a\.matplotlib\ttffont.
cache
Traceback (most recent call last):
   File "FIRExample", line 2, in ?
     import pylab
   File "C:\Python23\Lib\site-packages\pylab.py", line 1,
in ?
     from matplotlib.pylab import *
   File
"C:\Python23\Lib\site-packages\matplotlib\pylab.py", line
219, in ?
     new_figure_manager, draw_if_interactive, show =
pylab_setup()
   File
"C:\Python23\Lib\site-packages\matplotlib\backends\__init__.py",
line 23,
  in pylab_setup
     globals(),locals(),[backend_name])
   File
"C:\Python23\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
lin
e 9, in ?
     from backend_agg import FigureCanvasAgg
   File
"C:\Python23\Lib\site-packages\matplotlib\backends\backend_agg.py",
line
86, in ?
     from matplotlib.texmanager import TexManager
   File
"C:\Python23\Lib\site-packages\matplotlib\texmanager.py",
line 37, in ?
     from subprocess import Popen, STDOUT, PIPE
   File
"C:\Python23\Lib\site-packages\subprocess\__init__.py",
line 366, in ?
     from _subprocess import *
ImportError: No module named _subprocess

Also the User's Guide doesn't work. The pdf file seems to
be damaged.
Can you help me?

Thanks in advance

Daigos

INFINITO ADSLFLAT 4 MEGA: SOLO 27,90 EURO AL MESE IVA INCLUSA IP STATICO, BANDA GARANTITA 256Kbps ANTIVIRUS E FIREWALL INCLUSI NEL PREZZO

http://adsl.infinito.it

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Charlie Moad wrote:

This is sneaking in for python2.3 and windows. Here is the code
culprit below. We'll have to look into where this _subprocess module
is supposed to be coming from.

For now you can download
"http://effbot.org/downloads/subprocess-0.1-20041012.win32-py2.3.exe"
from "http://effbot.org/downloads/". I'll post a new python2.3 build
shortly that includes this.

I noticed yesterday that the setuptools we have isn't the setuptools in Python (2.5) SVN which seems a pity -- there a number of cleanups, especially checking if a "variable is None" instead of "variable == None".

I'm not sure if there are any fixes for windows, but I don't remember any.

The comments at the top of the Python SVN version say the module should be kept compatible with Python 2.2, which I haven't verified. I would propose we update MPL to the newest version of subprocess, which is presumably that distributed in Python SVN. Also for the sake of finding this as an exact copy, I suggest really having it in a file named 'subprocess.py' and make matplotlib/lib/subprocess/__init__.py have contents of "from subprocess import *". I hesitate to do this because there may be issues I'm not aware of. Are there any?

Otherwise, I can do this later today or tonight.

The full subprocess source is available here:
http://www.lysator.liu.se/~astrand/popen5/

which contains only one directory with the following files:
AUTHORS TODO pep.txt setup.py test_subprocess.py
MANIFEST.in _subprocess.c setup.cfg subprocess.py

Would someone well versed with distutils please advise me on which of these
should be added to the mpl tree and where? (Note: Their setup.py file uses
py_modules, which if I remember correctly is not backwards compatible with
python 2.2.)

Thanks,

Darren

···

On Thursday 16 March 2006 14:55, Charlie Moad wrote:

This is sneaking in for python2.3 and windows. Here is the code
culprit below. We'll have to look into where this _subprocess module
is supposed to be coming from.

For now you can download
"http://effbot.org/downloads/subprocess-0.1-20041012.win32-py2.3.exe"
from "http://effbot.org/downloads/". I'll post a new python2.3 build
shortly that includes this.