Python 2.7.3 tempfile.py, ln34, from random import Random as _Random

2013-03-25 Thread dbv
In Python 2.7.3, at ln34 the source file tempfile.py states:

from random import Random as _Random

But, Random is a Class.

The project imports werkzeug and using PyInstaller, the Traceback is:

Traceback (most recent call last):
  File "", line 9, in 
  File 
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py", 
line 404, in load_module
module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
  File "xserver.pyx", line 18, in init xserver 
(//home//ubuntu//Programs//myproject//myproject_pyx/xserver.c:2481)
  File 
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py", 
line 268, in load_module
exec(bytecode, module.__dict__)
  File 
"//home//ubuntu//Programs//myproject//myproject_pi2/build/pyi.linux2/myproject/out00-PYZ.pyz/werkzeug.wrappers",
 line 26, in 
  File 
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py", 
line 268, in load_module
exec(bytecode, module.__dict__)
  File 
"//home//ubuntu//Programs//myproject//myproject_pi2/build/pyi.linux2/myproject/out00-PYZ.pyz/werkzeug.http",
 line 25, in 
  File 
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py", 
line 268, in load_module
exec(bytecode, module.__dict__)
  File 
"//home//ubuntu//Programs//myproject//myproject_pi2/build/pyi.linux2/myproject/out00-PYZ.pyz/urllib2",
 line 94, in 
  File 
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py", 
line 268, in load_module
exec(bytecode, module.__dict__)
  File 
"//home//ubuntu//Programs//myproject//myproject_pi2/build/pyi.linux2/myproject/out00-PYZ.pyz/httplib",
 line 79, in 
  File 
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py", 
line 268, in load_module
exec(bytecode, module.__dict__)
  File 
"//home//ubuntu//Programs//myproject//myproject_pi2/build/pyi.linux2/myproject/out00-PYZ.pyz/mimetools",
 line 6, in 
  File 
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py", 
line 268, in load_module
exec(bytecode, module.__dict__)
  File 
"//home//ubuntu//Programs//myproject//myproject_pi2/build/pyi.linux2/myproject/out00-PYZ.pyz/tempfile",
 line 34, in 
ImportError: cannot import name Random

Is this a bug?  Or, is there some workaround available?  Thx.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python 2.7.3 tempfile.py, ln34, from random import Random as _Random

2013-03-25 Thread dbv
I have a number of .py source files and one source file has an "import random" 
and another has "import werkzeug".

The project works perfectly in the Python interpreter.

Problem appears when using PyInstaller.

How do get out of jail?

-- 
http://mail.python.org/mailman/listinfo/python-list


is "_io.py" missing from 2.7.4 ?

2013-04-08 Thread dbv
In 2.7.4, io.py shows:

import _io
import abc

from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
 open, FileIO, BytesIO, StringIO, BufferedReader,
 BufferedWriter, BufferedRWPair, BufferedRandom,
 IncrementalNewlineDecoder, TextIOWrapper)

but, cannot find _io.py, though there is the old _pyio.py in the 
//Python27//Lib folder.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: is "_io.py" missing from 2.7.4 ?

2013-04-08 Thread dbv
Ah, okay.  Then on Windows, _io.pyd should be in the /DLLs folder but it isn't 
there ?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: is "_io.py" missing from 2.7.4 ?

2013-04-08 Thread dbv
_io is a builtin module
-- 
http://mail.python.org/mailman/listinfo/python-list