Re: Curses unicode support

2012-09-01 Thread cjgohlke
On Saturday, September 1, 2012 3:41:04 PM UTC-7, Steven D'Aprano wrote:
 Thanks to Victor Stinner, the curses module now has improved Unicode 
 
 support.
 
 
 
 http://mail.python.org/pipermail/python-dev/2012-September/121569.html
 
 
 
 Victor has asked for testers to report any bugs in the module before 
 
 Python 3.3 goes live:
 
 
 
 [quote]
 
 So please try to test the curses module before Python 3.3 final with
 
 your favorite application!
 
 [end quote]
 
 
 
 
 
 -- 
 
 Steven

It might be worth mentioning here that there is no _curses module, with or 
without Unicode support, in any CPython version for the Windows operating 
system (http://bugs.python.org/issue2889).

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


Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-09-24 Thread cjgohlke
On Monday, September 24, 2012 4:38:05 PM UTC-7, alex23 wrote:
 On Sep 25, 6:04 am, Gelonida N gelon...@gmail.com wrote:
 
  This all does not sound very comforting. Why is there no fix on the
 
  official site?
 
 
 
 Has a bug been logged about the issue?
 

See issue #1 at 
http://hg.effbot.org/pil-117/issue/1/windows-build-of-_imagingft-module-fails

Christoph

 
 
 The Plone community keeps a fairly up-to-date fork called Pillow,
 
 we've had a lot of success using that locally:
 
 
 
 http://pypi.python.org/pypi/Pillow/

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


Re: Can't import modules

2012-10-01 Thread cjgohlke
On Sunday, September 30, 2012 5:35:02 PM UTC-7, Peter Farrell wrote:
 Thanks for trying to help, everybody. Sorry I didn't post the whole error 
 message. Now my problem is I just installed VPython and I'm trying to run the 
 very first example, bounce.py which I located. I opened it and ran it in 
 Idle. I got this message:
 
 
 
 Traceback (most recent call last):
 
   File C:\Python32\Lib\site-packages\visual\examples\bounce.py, line 1, in 
 module
 
 from visual import *
 
   File C:\Python32\lib\site-packages\visual\__init__.py, line 1, in module
 
 from .visual_all import *
 
   File C:\Python32\lib\site-packages\visual\visual_all.py, line 1, in 
 module
 
 from vis import version
 
   File C:\Python32\lib\site-packages\vis\__init__.py, line 3, in module
 
 from .cvisual import (vector, dot, mag, mag2, norm, cross, rotate,
 
 SystemError: initialization of cvisual raised unreported exception
 
 

Works for me on win-amd64-3.2. 

Do you have the numpy package installed? The cvisual extension module uses the 
numpy C API. The SystemError is expected if numpy is not installed.

Install numpy-MKL-1.6.2.win-amd64-py3.2.‌exe from 
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy if you are using 
VPython-5.74.win-amd64-py3.2.‌exe.

Christoph

 I'm not a programmer, just a math teacher/tutor who's trying to teach my 
 students to understand math through using something real like Python. I'll 
 keep you posted on my progress.
 
 
 
 Thank you in advance for your help!
 
 
 
 Peter
 
 
 
 On Sunday, September 30, 2012 1:22:31 PM UTC-7, Hans Mulder wrote:
 
  On 30/09/12 21:42:37, Peter Farrell wrote:
 
  
 
   I'm still new to Python, so here's another easy one. After I save 
   something
 
  
 
   I've done as a .py file, how do I import it into something else I work on?
 
  
 
   Every time I try to import something other than turtle or math, I get 
   this error message:
 
  
 
   
 
  
 
   'module' object is not callable
 
  
 
   
 
  
 
   What am I doing wrong?
 
  
 
  
 
  
 
  For starters, you're not showing us any code.
 
  
 
  
 
  
 
  The error message suggests that you have successfully imported
 
  
 
  a module, and you then try to use the module as if it were a
 
  
 
  callable.  That won't work: modules are not callable.
 
  
 
  
 
  
 
  My crystal ball says that you may have been a Java programmer
 
  
 
  in an earlier life.  In Java, a file must define exactly one
 
  
 
  class, and the class must have the same name as the file.
 
  
 
  
 
  
 
  Python is not Java.  In Python, a file may define one class,
 
  
 
  or twenty, or none at all.  To avoid confusion, do not give
 
  
 
  any of your classes the same name as any of your files.
 
  
 
  
 
  
 
  
 
  
 
  Hope this helps,
 
  
 
  
 
  
 
  -- HansM

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


Re: win32serviceutil: ImportError: DLL load failed: The specified module could not be found

2014-05-26 Thread cjgohlke
On Monday, May 26, 2014 6:32:19 AM UTC-7, Tim Golden wrote:
 On 26/05/2014 14:24, Nagy L�szl� Zsolt wrote:
 
 
 
Strange thing is that win32serviceutil.py is part of the pywin32
 
distribution, so I guess I should be able to import it, right?
 
  Make sure you have a pywin32 that matches ???. Matching includes python
 
  version and bitness.
 
  In addition, c:\python27\DLLs should also be on your %PATH%:
 
  setx PATH %PATH%;c:\python27\DLLs
 
  Just curious: what if I don't have python2.7 installed at all? How on
 
  earth python3.4 + pywin32 requires DLL files from python2.7 ?
 
 
 
  BTW it did not help. Here is my path:
 
 
 
  Path=C:\Python34\;C:\Python34\Scripts;C:\Program Files (x86)\NVIDIA
 
  Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
 
  Files\SlikSvn\bin;C:\texlive\2013\bin\win32;c:\Python34\DLLs;c:\Python27\DLLs
 
 
 
 
 
  I have both Python27 and Python34 installed.
 
 
 
  Python 3.4: import win32service still throws ImportError: DLL load
 
  failed.
 
  Python 2.7: import win32service succeeds
 
 
 
  Build information:
 
 
 
  Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64
 
  bit (AMD64)] on win32
 
 
 
  It is the official latest. pywin32 is also the latest (build 219).
 
 
 
 Nagy -- could you post to the python-win32 list? There's nothing wrong 
 
 with putting it out here, but I don't know if the pywin32 guys hang out 
 
 here, and I know they definitely do there. (Which is also lower volume).
 
 
 
 I'm not seeing any changes to the win32service code, but a missing DLL 
 
 error is almost always about some combination of permissions / UAC on 
 
 install. Adding anything to your PATH is unlikely to help (unless you 
 
 have a truly outlandish PATH).
 
 
 
 I'll try to reproduce later if I can but I don't have time right now.
 
 
 
 TJG

Python 3.4 does not run any bdist_wininst postinstall scripts. Try to run 
`C:\Python34\python.exe C:\Python34\Scripts\pywin32_postinstall.py -install` 
manually from an elevated command prompt.

Christoph
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Compiling Python (modules) on 64bit Windows - which compiler suite?

2012-03-21 Thread cjgohlke
On Wednesday, March 21, 2012 8:06:47 AM UTC-7, Ralph Heinkel wrote:
 Hi,
 
 when processing our mass spectrometry data we are running against the
 2GB memory limit on our 32 bit machines. So we are planning to move to
 64bit. Downloading and installing the 64bit version of Python for
 Windows is trivial, but how do we compile our own C extension? Visual C
 ++ 2008 express comes for free, but only compiles for 32 bit.
 
 What has been used to compile the downloadable Python Win64 bit
 version? Visual Studio professional?
 The problem with the professional edition is that it is hard to obtain
 and it is sort of out-of-date - nowadays everyone uses Visual Studio
 2010 (or even 2011 coming soon). So if Visual Studio 2008 professional
 is required for compiling 64bit modules, we would have to spend $1200
 for a license which is actually rather out of date.
 
 Any hints or suggestions are very welcome.
 
 Thanks,
 
 Ralph

See Compiling 64-bit extension modules on Windows at 
http://wiki.cython.org/64BitCythonExtensionsOnWindows. It applies to 
non-Cython extensions as well.

MinGW-w64 also works, but you'll have to generate and use libpythonXX.a and 
libmsvcr90.a link libraries.

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


Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread cjgohlke
On Monday, January 12, 2015 at 10:09:03 PM UTC-8, Tim Golden wrote:
 On 12/01/2015 23:12, Andrew Koenig wrote:
  Fixed it!
 
  The aforementioned article is correct. I downloaded the RegDelNull
  program mentioned in the article
  (http://technet.microsoft.com/en-us/sysinternals/bb897448.aspx) and
  ran it on hkcr, hkcu, hklm, hku, and hkcc (short for
  HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS,
  and HKEY_CURRENT_CONFIG), respectively. It deleted a bunch of keys.
  Rerunning the program you posted earlier revealed no keys with
  embedded nulls in their names, and ensurepip now works.
 
  I have no idea how these keys got there. For all I know they are the
  result of malware.
 
  I think it would be worthwhile changing the Python code to detect
  nulls and perhaps issue a warning that directs people to this article
  or something like it.
 
 
 Thanks, yes. Unfortunate that no-one's actually reported this before as 
 a bug -- as far as I'm aware. Would you be in a position to report this 
 at bugs.python.org? If not, I'll do it when I get a chance.
 
 TJG

http://bugs.python.org/issue22028
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: problem building python 3.5 extensions for windows

2015-09-22 Thread cjgohlke
On Tuesday, September 22, 2015 at 1:49:16 PM UTC-7, Terry Reedy wrote:
> On 9/22/2015 9:35 AM, Robin Becker wrote:
> > On 22/09/2015 11:14, Robin Becker wrote:
> >> On 22/09/2015 01:36, CG wrote:
> > .t
> >>> .
> >>>
> >> Thanks for the pointer Christoph.
> >>
> >> I certainly didn't let it run for 30 minutes. When I build with 2.7,
> >> 3.3 or 3.4
> >> the whole build including reportlab stuff is over in a couple of
> >> minutes. I will
> >> try again, but a linker that takes 30 minutes to create an extension
> >> that ends
> >> up 204Kb long has to be seriously broken. Is it trying to hard? Most
> >> of the code
> >> size is in arrays for code points etc etc.
> >
> > I timed my builds of pyRXPU for x86 + amd64; these are on a core i5-3470
> > @ 3.20Ghz with 4Gb memory.
> >
> > python 3.4   1 minute  14 seconds
> > python 3.5  52 minutes 50 seconds
> >
> > so with VS2015 it will now take me an hour to make and test any changes
> > to this extension. I don't see how the issue can be considered closed.
> > VS2015 is clearly not the way forward for any reasonable development
> > process.
> 
> I think you should add the above to the issue.
> 
> -- 
> Terry Jan Reedy

It's a compiler bug. To work around, disable compiler optimizations, i.e. set 
`extra_compile_args=['/Od']` in setup.py.

--
Christoph
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: problem building python 3.5 extensions for windows

2015-09-21 Thread cjgohlke
On Monday, September 21, 2015 at 9:54:51 AM UTC-7, Robin Becker wrote:
> .
> >
> > This also sounds like the C++ stuff just wasn't installed.  I'm afraid
> > reinstallation is probably your best bet.
> >
> I used the default installation, but it failed first time around (perhaps a 
> network thing) and I stupidly assumed 'repair' would work.
> 
> After a full reinstallation at least vcvarsall is present and  I can at least 
> get the amd64/x86 compilers to work with bdist_wheel (I didn't get any errors 
> from using my already compiled relocatable libs) and I can no build the open 
> source reportlab extensions.
> 
> One simple extension
> 
> https://bitbucket.org/rptlab/pyrxp
> 
> doesn't get built. For some reason I get a hang in the linker for both amd64 
> & 
> x86. This builds fine for 27, 33 & 34.
> 
> 
> However, I see this in the output
> 
>   | creating C:\ux\XB33\repos\pyRXP\build\lib.win-amd64-3.5
>   | C:\Program Files (x86)\Microsoft Visual Studio 
> 14.0\VC\BIN\amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL
> /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ux\XB33\py35_amd64\libs 
> /LIBPATH:C:\python35\libs /LIBPATH:C:\python35
> /LIBPATH:C:\ux\XB33\py35_amd64\PCbuild\amd64 "/LIBPATH:C:\Program Files 
> (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64"
>   "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 
> 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Win
> dows Kits\10\lib\10.0.10150.0\ucrt\x64" "/LIBPATH:C:\Program Files 
> (x86)\Windows 
> Kits\NETFXSDK\4.6\lib\um\x64" "/LIBPATH
> :C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" wsock32.lib 
> /EXPORT:PyInit_pyRXPU build\temp.win-amd64-3.5\
> Release\ux\XB33\repos\pyRXP\src\pyRXP.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\xmlparser.obj bui
> ld\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\url.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\s
> rc\rxp\charset.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\string16.obj 
> build\temp.win-amd64-3.5\Re
> lease\ux\XB33\repos\pyRXP\src\rxp\ctype16.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\dtd.obj build
> \temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\input.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\s
> rc\rxp\stdio16.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\system.obj 
> build\temp.win-amd64-3.5\Rele
> ase\ux\XB33\repos\pyRXP\src\rxp\hash.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\version.obj 
> build\
> temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\namespaces.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyR
> XP\src\rxp\http.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\nf16check.obj 
> build\temp.win-amd64-3.5\
> Release\ux\XB33\repos\pyRXP\src\rxp\nf16data.obj 
> /OUT:build\lib.win-amd64-3.5\pyRXPU.cp35-win_amd64.pyd /IMPLIB:build\te
> mp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib
> 
>   | pyRXP.obj : warning LNK4197: export 'PyInit_pyRXPU' specified 
> multiple times; using first specification
>   |Creating library 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib
>  
> and ob
> ject 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.exp
> 
> 
>   | Generating code
> Stderr:  | error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 
> 14.0\\VC\\BIN\\amd64\\link.exe' failed with
> exit status 1
> 
> so there are some warnings which I don't understand. Maybe I need to do 
> something special for pyRXP (possibly I have some ifdefs poorly configured).
> -- 
> Robin Becker

How long did you let it "hang"? For me the incremental linker took in the order 
of 30 minutes to link. I mentioned this on the Python issue tracker at 
. 
-- 
https://mail.python.org/mailman/listinfo/python-list