Re: a question about unicode in python
hzqij schrieb: > i have a python source code test.py > > # -*- coding: UTF-8 -*- > > # s is a unicode string, include chinese > s = u'张三' > > then i run > > $ python test.py > UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: > invalid data > > by in python interactive, it is right > s = u'张三' > > why? > > just an idea: is your text editor really supporting utf-8? In the mail it is only displayed as '??' which looks for me as the mail editor did not send the mail as utf. Try to attach a correct text file. -- http://mail.python.org/mailman/listinfo/python-list
Re: subprocess.Popen(cmd) question
WolfgangZ schrieb: > Hello, > > I'm starting some subprocesses inside a loop. The processes run > independent and dont need any communication between each other. Due to > memory issues I need to limit the number of running processes to around > 10. How can I insert a break into my loop to wait until some processes > are finished? > > Some minimal examplecode: > > import subprocess > for i in range(0,100): > cmd='ping localhost' > p=subprocess.Popen(cmd) > p.wait() > > Thanks for any ideas. > > Wolfgang > Problem solved by using "threading" Wolfgang -- http://mail.python.org/mailman/listinfo/python-list
subprocess.Popen(cmd) question
Hello, I'm starting some subprocesses inside a loop. The processes run independent and dont need any communication between each other. Due to memory issues I need to limit the number of running processes to around 10. How can I insert a break into my loop to wait until some processes are finished? Some minimal examplecode: import subprocess for i in range(0,100): cmd='ping localhost' p=subprocess.Popen(cmd) p.wait() Thanks for any ideas. Wolfgang -- http://mail.python.org/mailman/listinfo/python-list
pycrust startup question
Hi, I've tried to add " from __future__ import division" to the startup script of pycrust. It seems to be imported as division is listed in the namespace. But it is somehow not activated. Any suggestions? PyCrust 0.9.5 Python 2.5 -- http://mail.python.org/mailman/listinfo/python-list
Re: What is the purpose of ptyhon in Windows
[EMAIL PROTECTED] schrieb: hi All, I have no idea why I need to learn a new scripting language, nothing much to the sytnax, I need to understand what could be the prupose of another scripting language Cna you please help me with this, Is there a possibilty to work on bigger projects with Python -- http://mail.python.org/mailman/listinfo/python-list At least I'm living in a free country and nobody forces me to learn python. So I don't fully understand why you HAVE TO learn it. When your problems can be solved in a different programming language than you should be free to use whatever you like. And also why should it be forbidden to create a new programming language? Diversity and competition is usually not bad. -- http://mail.python.org/mailman/listinfo/python-list