Re: Does python(django) have an official database driver to access SQLFire

2012-01-29 Thread Chris Rebert
On Sat, Jan 28, 2012 at 11:12 PM, Niu.Jack wrote: > I have a question on Python.  Does python(django) have an official database > driver to access SQLFire? Or is there any roadmap to deliver an official > database driver? Sounds like no; SQLFire's FAQ (http://communities.vmware.com/docs/DOC-16640

autoconf error on Windows

2012-01-29 Thread Alec Taylor
PyCrypto's install is giving an autoconf error on Windows, whether I install from the git repo or normally. Traceback (most recent call last): File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\Projects\satchmo_test\satchmo_test\src\pycrypto\setup.py

Re: autoconf error on Windows

2012-01-29 Thread Chris Rebert
On Sun, Jan 29, 2012 at 12:52 AM, Alec Taylor wrote: > PyCrypto's install is giving an autoconf error on Windows, whether I > install from the git repo or normally. > > Traceback (most recent call last): >  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command >    cmd_obj.run() > >  

Re: autoconf error on Windows

2012-01-29 Thread Alec Taylor
Thanks, but I already have MinGW installed and in PATH. C:\>where g++ C:\libraries\MinGW\bin\g++.exe C:\libraries\perl\c\bin\g++.exe On Sun, Jan 29, 2012 at 8:07 PM, Chris Rebert wrote: > On Sun, Jan 29, 2012 at 12:52 AM, Alec Taylor wrote: >> PyCrypto's install is giving an autoconf error on W

回复: write 中文 into c:\t1

2012-01-29 Thread 水静流深
file.write(s.decode('gbk').encode('utf-8')) i open the file c:\t1, to get 中文 in it not 涓枃 -- 原始邮件 -- 发件人: "MRAB"; 发送时间: 2012年1月27日(星期五) 上午10:53 收件人: "python-list"; 主题: Re: write 中文 into c:\t1 On 27/01/2012 02:46, contro opinion wrote: > |>>> s='\xd6\xd0

Re: autoconf error on Windows

2012-01-29 Thread Chris Rebert
> On Sun, Jan 29, 2012 at 8:07 PM, Chris Rebert wrote: >> On Sun, Jan 29, 2012 at 12:52 AM, Alec Taylor wrote: >>> PyCrypto's install is giving an autoconf error on Windows, whether I >>> install from the git repo or normally. >>> >>> Traceback (most recent call last): >>>  File "C:\Python27\lib\

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-29 Thread Dominic Binks
snipped lots of mindless nonsense, nothing at all to do with Python On 25-Jan-12 3:23 PM, Rick Johnson wrote: ... In my world ... Rick, I may be overstepping the mark here but I believe all participants on this list would probably like it if that's precisely where you stayed. -- Dominic Bi

Re: autoconf error on Windows

2012-01-29 Thread Alec Taylor
Thanks, adding MSYS's bin to PATH solved that issue. Now I'm getting linker errors on: C:\libraries\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win-amd64-2.7\Release\src\winrand.o build\temp.win-amd64-2.7\Release\src\winrandom.def -LC:\Python27\libs -LC:\Python27\PCbuild\amd64 -lws2_32 -l

Re: python logging filter limitation, looks intentional?

2012-01-29 Thread Vinay Sajip
On Jan 28, 10:51 am, Chris Withers wrote: > To be clear, I wasn't asking for a change to existing behaviour, I was > asking for the addition of an option that would allow thelogging > framework to behave as most people would expect when it comes to filters ;-) And the evidence for "most people"

Re: parse binary file

2012-01-29 Thread Peter Otten
contro opinion wrote: > please download the attachment ,and put in c:\test.data Your data didn't make it through. > and run the folloeing code: > > from struct import unpack > file_obj = open('c:\\test.data', 'r') Open the file in binary mode to disable CRNL-to-NL translation which will corr

Re: parse binary file

2012-01-29 Thread Steven D'Aprano
On Sun, 29 Jan 2012 13:39:25 +0100, Peter Otten wrote: > contro opinion wrote: > >> please download the attachment ,and put in c:\test.data > > Your data didn't make it through. Since this is a text-only newsgroup, it won't. >> and run the folloeing code: >> >> from struct import unpack >>

Re: parse binary file

2012-01-29 Thread Andrea Crotti
On 01/29/2012 07:51 AM, contro opinion wrote: please download the attachment ,and put in c:\test.data Your program should never use hard-coded path, and actually I think the majority here is not using windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: parse binary file

2012-01-29 Thread Aaron
On 01/29/2012 03:04 PM, Andrea Crotti wrote: On 01/29/2012 07:51 AM, contro opinion wrote: please download the attachment ,and put in c:\test.data Your program should never use hard-coded path, and actually I think the majority here is not using windows. But I also think that the majority o

Re: [Python-Dev] #include "Python.h"

2012-01-29 Thread Chris Angelico
On Mon, Jan 30, 2012 at 2:34 AM, Andrea Crotti wrote: > I have a newbie question about CPython. > Looking at the C code I noted that for example in tupleobject.c there is > only one include > #include "Python.h" For files like tupleobject.c there's often a corresponding tupleobject.h in the Inclu

Re: problems with tkinter updates

2012-01-29 Thread yves
In case somebody else is trying to do the same thing, this is what I ended up with to get the concept, that I can now integrate in other scripts: http://projects.zioup.org/scratchpad/python/tkrun.py -- Yves. http://www.SollerS.ca/

Re: object aware of others

2012-01-29 Thread Jerry Hill
On Sun, Jan 29, 2012 at 1:47 AM, Lee wrote: > I was afraid that a list/set/dictionary and alike is the answer, but, > anyway, thanks everybody. > > It doesn't seem too bad to keep track of the instances in the class object using weak references (http://docs.python.org/py3k/library/weakref.html).

Questions about "compiled" Python (beginner)

2012-01-29 Thread HoneyMonster
I am new to Python (Python 2.7 on Linux). Research indicates that: a) "Compiling" Python modules into intermediate bytecode marginally improves load time. b) The Python interpreter will use an already-prepared .pyc file if one exists in the same directory as the .py. That then, is presumably w

How To Use Python/GDAL to create a KML file from an Image?

2012-01-29 Thread Roger Zimmerman
Hi All, I'd have a contour image file, in either svg, gif or png format. I know the GPS coordinates for the four corners of the image. I'd like to create a KML file from that image. I will view the KML file in Google Earth or ARCGIS. I understand that GDAL can do this, and I saw a tutorial for GD

Re: Questions about "compiled" Python (beginner)

2012-01-29 Thread Terry Reedy
On 1/29/2012 12:57 PM, HoneyMonster wrote: I am new to Python (Python 2.7 on Linux). Research indicates that: a) "Compiling" Python modules into intermediate bytecode marginally improves load time. The improvement is larger the larger the file. You may notice that .pyc files are only created

Re: Questions about "compiled" Python (beginner)

2012-01-29 Thread Cousin Stanley
This short article provides some basic information about .pyc and .pyo files http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html -- Stanley C. Kitching Human Being Phoenix, Arizona -- http://mail.python.org/mailman/listinfo/python-list

Re: calling a simple PyQt application more than once

2012-01-29 Thread John Posner
Jabba Laci wrote: > Hi, Thanks for your reply. I forgot to mention that my first solution > created a headless browser, i.e. it didn't create any GUI. I would > like to keep it that way, thus I could scrape (AJAX-powered) webpages > in batch mode without any user interaction. No head, no problem.

Re: parse binary file

2012-01-29 Thread Steven D'Aprano
On Sun, 29 Jan 2012 15:50:49 +0100, Aaron wrote: > On 01/29/2012 03:04 PM, Andrea Crotti wrote: >> On 01/29/2012 07:51 AM, contro opinion wrote: >>> please download the attachment ,and put in c:\test.data >>> >>> >> Your program should never use hard-coded path, and actually I think the >> majori

Re: constraint based killer sudoku solver performance improvements

2012-01-29 Thread Blockheads Oi Oi
On 27/01/2012 07:47, Blockheads Oi Oi wrote: On 27/01/2012 06:57, Frank Millman wrote: "Blockheads Oi Oi" wrote: I have a working program based on [1] that sets up all different constraints for each row, column and box and then sets exact sum constraints for each cage. It'll run in around 0.2

Re: Questions about "compiled" Python (beginner)

2012-01-29 Thread HoneyMonster
On Sun, 29 Jan 2012 14:01:01 -0500, Terry Reedy wrote: > On 1/29/2012 12:57 PM, HoneyMonster wrote: >> I am new to Python (Python 2.7 on Linux). Research indicates that: >> >> a) "Compiling" Python modules into intermediate bytecode marginally >> improves load time. > > The improvement is larger