Re: File Read issue by using module binascii

2013-04-28 Thread Peter Otten
Tim Roberts wrote: > Jimmie He wrote: > >>When I run the readbmp on an example.bmp(about 100k),the Shell is become >>to "No respose",when I change f.read() to f.read(1000),it is ok,could >>someone tell me the excat reason for this? Thank you in advance! >> >>Python Code as below!! >> >>import bi

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

2013-04-28 Thread Terry Jan Reedy
On 4/27/2013 11:42 PM, cormog...@gmail.com wrote: Is there the place to open a ticket for Python developers? bugs.python.org -- http://mail.python.org/mailman/listinfo/python-list

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

2013-04-28 Thread Fábio Santos
Cannot reproduce on windows 7 ultimate Steps taken: Start cmd cd to Desktop where I have a GUI application run python on the console import os os.execl('exe.exe', 'exe.exe') On Sun, Apr 28, 2013 at 8:51 AM, Terry Jan Reedy wrote: > On 4/27/2013 11:42 PM, cormog...@gmail.com wrote: > >> Is th

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

2013-04-28 Thread Fábio Santos
Is this executable freely available, or something you can share? If you can send me that executable I can try to reproduce the bug with it. -- http://mail.python.org/mailman/listinfo/python-list

Re: File Read issue by using module binascii

2013-04-28 Thread Jens Thoms Toerring
Tim Roberts wrote: > Jimmie He wrote: > >When I run the readbmp on an example.bmp(about 100k),the Shell is become to > >"No respose",when I change f.read() to f.read(1000),it is ok,could someone > >tell me the excat reason for this? > >Thank you in advance! > > > >Python Code as below!! > > >

Re: File Read issue by using module binascii

2013-04-28 Thread Jimmie He
On Sunday, April 28, 2013 8:04:04 PM UTC+8, Jens Thoms Toerring wrote: > Tim Roberts wrote: > > > Jimmie He wrote: > > > > > >When I run the readbmp on an example.bmp(about 100k),the Shell is become > > >to "No respose",when I change f.read() to f.read(1000),it is ok,could > > >someone tell

Adding new source types to distutils?

2013-04-28 Thread Devin Jeanpierre
Last night I wrote a toy prototype module that lets one compile Rust crates into extension modules for Python. The problem is, I don't know the "right" way to do this. Ideally I'd just want to tell build_ext that there's a new source type I want to handle (.rc and .rs), and also tell distutils that

Re: Adding new source types to distutils?

2013-04-28 Thread Stefan Behnel
Devin Jeanpierre, 28.04.2013 19:55: > Last night I wrote a toy prototype module that lets one compile Rust > crates into extension modules for Python. The problem is, I don't know > the "right" way to do this. Ideally I'd just want to tell build_ext > that there's a new source type I want to handle

Unwanted window spawns when using Tkinter with multiprocessing.

2013-04-28 Thread alternative00
Hi everyone, I'm trying to use multiprocessing to avoid Python's GIL but with Tkinter, instead of running my main function, it spawns new windows. In fact, my fuction is used everytime I press a specified key, but with multiprocessing I only get a new window when I hit a key. Does anyone have a

Re: Adding new source types to distutils?

2013-04-28 Thread Devin Jeanpierre
On Sun, Apr 28, 2013 at 2:24 PM, Stefan Behnel wrote: > That approach is discouraged for Cython. The compiler comes with a > cythonize() function these days, which users can simply call from their > setup.py scripts. It spits out a list of Extensions that you can pass into > setup(). So, for examp

[JOB] Two opportunities at Decernis

2013-04-28 Thread Patrick Waldo
Hi All, The company I work for, Decernis, has two job opportunities that might be of interest. Decernis provides global systems for regulatory compliance management of foods and consumer products to world leaders in each sector. The company has offices in Rockville, MD as well as Frankfurt, Germa

Re: epiphany

2013-04-28 Thread 88888 Dihedral
Roy Smith於 2013年4月25日星期四UTC+8上午7時50分33秒寫道: > I discovered something really neat today. > > > > We've got a system with a bunch of rules. Each rule is a method which > > returns True or False. At some point, we need to know if all the rules > > are True. Complicating things, not all the ru

Re: Unwanted window spawns when using Tkinter with multiprocessing.

2013-04-28 Thread Dave Angel
On 04/28/2013 02:33 PM, alternativ...@rocketmail.com wrote: Hi everyone, I'm trying to use multiprocessing to avoid Python's GIL but with Tkinter, instead of running my main function, it spawns new windows. In fact, my fuction is used everytime I press a specified key, but with multiprocessing

Re: Unwanted window spawns when using Tkinter with multiprocessing.

2013-04-28 Thread alternative00
Sorry for my bad english. Here's my code : def key(event): instance = 'Instance' touche = event.char instance = multiprocessing.Process(target=player, args=(hitkey,)) instance.start() def player(hitkey): winsound.

Re: Unwanted window spawns when using Tkinter with multiprocessing.

2013-04-28 Thread Dave Angel
On 04/28/2013 06:23 PM, alternativ...@rocketmail.com wrote: Sorry for my bad english. Here's my code : def key(event): instance = 'Instance' touche = event.char instance = multiprocessing.Process(target=player, args=(hitkey,)) instance.start() d

Re: Unwanted window spawns when using Tkinter with multiprocessing.

2013-04-28 Thread alternative00
Well I saw this clause on most of the multiprocessing examples I saw but the reason it was here wasn't explained so I just ignored it (yeah stupid I know). I don't think I bypassed anything, at least not on purpose. I'm running on Windows 7 64 bits. -- http://mail.python.org/mailman/listinfo/p

Re: Unwanted window spawns when using Tkinter with multiprocessing.

2013-04-28 Thread Dave Angel
On 04/28/2013 07:40 PM, alternativ...@rocketmail.com wrote: Well I saw this clause on most of the multiprocessing examples I saw but the reason it was here wasn't explained so I just ignored it (yeah stupid I know). I don't think I bypassed anything, Yes, you skipped the essential if clause.

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

2013-04-28 Thread cormogram
It works fine as long as you don't provide a null string ('') to os.execl(), such as: os.execl('filename.exe','') On Sunday, April 28, 2013 5:02:48 AM UTC-3, Fábio Santos wrote: > Cannot reproduce on windows 7 ultimate > > > > Steps taken: > > > > Start cmd > > cd to Desktop where I have

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

2013-04-28 Thread cormogram
Thank you! On Sunday, April 28, 2013 4:51:03 AM UTC-3, Terry Jan Reedy wrote: > On 4/27/2013 11:42 PM, cormog...@gmail.com wrote: > > > > > Is there the place to open a ticket for Python developers? > > > > bugs.python.org -- http://mail.python.org/mailman/listinfo/python-list

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

2013-04-28 Thread cormogram
It isn't, but it doesn't matter because all executables I've tried cause the error, even "ping.exe". Just try: os.execl('ping.exe', '') And it will cause the "python.exe has stopped working" error message. On Sunday, April 28, 2013 5:05:02 AM UTC-3, Fábio Santos wrote: > Is this executable free

Re: Unwanted window spawns when using Tkinter with multiprocessing.

2013-04-28 Thread Chris Angelico
On Mon, Apr 29, 2013 at 9:40 AM, wrote: > Well I saw this clause on most of the multiprocessing examples I saw but the > reason it was here wasn't explained so I just ignored it (yeah stupid I > know). I don't think I bypassed anything, at least not on purpose. I'm > running on Windows 7 64 b

SMTP-Email Help

2013-04-28 Thread root . phidgets
Hi Guys. I need some help with the coding for my program. This coding is suppose to sort text file according to the latest date and send the latest file. Attach it to my email and sent to another email account. But somehow the program is unable to send email. [CODE]#!/usr/bin/python import os,