Re: Thread-ID - how much could be?

2014-09-12 Thread dieter
Ervin Hegedüs writes: > ... What is used as thread id is platform dependent. Likely, it depends on the thread support of the underlying C libary (i.e. the operating system thread support). Under Linux, thread ids seem to be addresses - i.e. very large integers. -- https://mail.python.org/mailma

Re: find the error

2014-09-12 Thread Andrea D'Amore
On 2014-09-13 05:53:37 +, Chris Angelico said: If you're using sys.argv, you need to provide arguments to your script. Or check sys.argv's length ensuring that an element is there before accessing it. -- Andrea -- https://mail.python.org/mailman/listinfo/python-list

Re: Iterator, modify data in loop body

2014-09-12 Thread Chris Angelico
On Sat, Sep 13, 2014 at 4:09 PM, Michael Welle wrote: > foo = [1,2,3,4] > it = iter(foo) > > for e in it: > if e % 2 == 0: > x.append(e) A better way to do this is with a list comprehension: x = [e for e in foo if e %2 == 0] Modifying something that you're iterating over is unspecif

Re: find the error

2014-09-12 Thread Chris Angelico
On Sat, Sep 13, 2014 at 3:47 PM, wrote: > Dear friends when i used > import urllib, re, sys > > symbol = sys.argv[1] >>> this function is show -->> symbol = sys.argv[1] > IndexError: list index out of range > > kindly find the solution of this If you're using sys.argv, you need to provide argume

find the error

2014-09-12 Thread daoudimca
Dear friends when i used import urllib, re, sys symbol = sys.argv[1] >>> this function is show -->> symbol = sys.argv[1] IndexError: list index out of range kindly find the solution of this -- https://mail.python.org/mailman/listinfo/python-list

Re: Example of python service running under systemd?

2014-09-12 Thread Chris Angelico
On Sat, Sep 13, 2014 at 12:36 PM, Michael Torrie wrote: > Oh funny. Just when I think the bot is ready to pass a turing test we > get a regression. Ah, the Turing test... everyone loves it. I had some really naughty fun with that name a while ago. In my D&D world themed on Wonderland, there are

Re: Example of python service running under systemd?

2014-09-12 Thread Michael Torrie
On 09/12/2014 02:05 PM, CHIN Dihedral wrote: > Please check the examples in wxpython and boa. Oh funny. Just when I think the bot is ready to pass a turing test we get a regression. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python stdout goes where under systemd? (Was: Example of python service running under systemd?)

2014-09-12 Thread Chris Angelico
On Sat, Sep 13, 2014 at 7:45 AM, Travis Griggs wrote: > Python print() is buffered, so it wasn’t showing up except in huge blocks. > Changed the .service file to start with -u and everything works as expected > now. Ah, yes, that'll happen any time stdout isn't connected to a tty. Nothing to do

Re: very lightweight gui for win32 + python 3.4

2014-09-12 Thread Grant Edwards
On 2014-09-12, Thomas Heller wrote: > Am 12.09.2014 18:38, schrieb Chris Angelico: > > Does Tkinter really work well with cx_Freeze? I doubt it (from my > experiences with py2exe). I never had any problems with Tkinter and py2exe, but you do get a considerably larger distribution than you do wi

Re: pythonw.exe has stopped working

2014-09-12 Thread Terry Reedy
On 9/12/2014 1:48 AM, rahuldbha...@gmail.com wrote: Hello Folks, I'm using RIDE -- Robot Framework Test Data Editor RIDE 1.3 running on Python 2.7.6. When I click on some of my test case the RIDE GUI hangs and gives bellow error message. Run RIDE with python, not pythonw, from a command pro

Re: Python stdout goes where under systemd? (Was: Example of python service running under systemd?)

2014-09-12 Thread Travis Griggs
On Sep 12, 2014, at 12:05 PM, Travis Griggs wrote: > Thanks all for the help/advice. I’m getting there. > > To experiment/learn, I made a simple python program (/Foo/cyclic.py): > >#!/usr/bin/env python3 > >import time > >while True: >time.sleep(5) >with open('s

Re: Example of python service running under systemd?

2014-09-12 Thread CHIN Dihedral
On Friday, September 12, 2014 1:48:37 AM UTC+8, Travis Griggs wrote: > I've been reading lots of systemd docs. And blogs. Etc. At this point, I > think I would benefit from learning by example... > > > > Does anyone have an example .service file that they use to launch a long > running service

Re: very lightweight gui for win32 + python 3.4

2014-09-12 Thread Zachary Ware
On Fri, Sep 12, 2014 at 1:35 PM, Thomas Heller wrote: > Does Tkinter really work well with cx_Freeze? I doubt it (from my > experiences with py2exe). Just to give anecdotal evidence, I have used Tkinter successfully without much headache with both cx_Freeze (with Python 2.7 and 3.1-3.2) and py2e

Python stdout goes where under systemd? (Was: Example of python service running under systemd?)

2014-09-12 Thread Travis Griggs
Thanks all for the help/advice. I’m getting there. To experiment/learn, I made a simple python program (/Foo/cyclic.py): #!/usr/bin/env python3 import time while True: time.sleep(5) with open('sound', 'r') as file: currentValue = file.read() o

Re: very lightweight gui for win32 + python 3.4

2014-09-12 Thread Thomas Heller
Am 12.09.2014 18:38, schrieb Chris Angelico: On Sat, Sep 13, 2014 at 2:35 AM, Nagy László Zsolt wrote: So I need to create a GUI mode version of my program. That the customer should be able to see a progress bar. What kind of GUI toolkit should I use for this? I would like this to be lightweigh

Re: very lightweight gui for win32 + python 3.4

2014-09-12 Thread Chris Angelico
On Sat, Sep 13, 2014 at 3:08 AM, Mark Lawrence wrote: >> There's absolutely no reason to go Windows-specific. Use Tkinter - >> it's pretty light-weight. Comes with most Python distros. See how it >> goes in terms of code size - if it's unsuitable, then look at others, >> but start with the obvious

Re: very lightweight gui for win32 + python 3.4

2014-09-12 Thread Mark Lawrence
On 12/09/2014 17:38, Chris Angelico wrote: On Sat, Sep 13, 2014 at 2:35 AM, Nagy László Zsolt wrote: So I need to create a GUI mode version of my program. That the customer should be able to see a progress bar. What kind of GUI toolkit should I use for this? I would like this to be lightweight,

Marco's atexit issue was: Re: ANN: wxPython 3.0.1.1

2014-09-12 Thread Nathan McCorkle
On Friday, September 12, 2014 1:14:41 AM UTC-7, Marco Prosperi wrote: > > > I'm trying to pass my application from wxpython2.9.4 to 3.0.1 but there > seems to be still some of the problems that made me skip wxpy2.9.5: when I > close the main window of my application (windows7-64bit, python 2.7)

Re: pylint for cython?

2014-09-12 Thread Stefan Behnel
Skip Montanaro schrieb am 12.09.2014 um 17:52: > I have slowly been converting some Python source to Cython. I'm pretty > conservative in what changes I make, mostly sprinkling a few "cdef", > "float" and "int" declarations around the pyx file. Still, conservative or > not, it's enough to choke pyl

Re: very lightweight gui for win32 + python 3.4

2014-09-12 Thread Chris Angelico
On Sat, Sep 13, 2014 at 2:35 AM, Nagy László Zsolt wrote: > So I need to create a GUI mode version of my program. That the customer > should be able to see a progress bar. What kind of GUI toolkit should I use > for this? I would like this to be lightweight, preferably under 5MB with a > very easy

very lightweight gui for win32 + python 3.4

2014-09-12 Thread Nagy László Zsolt
I wrote a small program that copies some files between directories. This is a special utility program for a particular customer. I could compile the program into a portable exe with cx_freeze, and the total size is below 10MB. This customer wants to use this utility on many computers. He wants

pylint for cython?

2014-09-12 Thread Skip Montanaro
I have slowly been converting some Python source to Cython. I'm pretty conservative in what changes I make, mostly sprinkling a few "cdef", "float" and "int" declarations around the pyx file. Still, conservative or not, it's enough to choke pylint. Rather than have to maintain a pure Python version

Re: Why command os.popen works in python interactive mode but not in script debugger mode?

2014-09-12 Thread Viet Nguyen
On Thursday, September 11, 2014 10:15:57 PM UTC-7, Viet Nguyen wrote: > Can anyone give me hint or reason why same command behaves differently in > debugger mode from interactive mode: > > > > From interactive mode: > > > > >>> import os > > >>> p = os.popen('date') > > >>> p.read() > > '

Re: Changer le path pour l'accès aux modules

2014-09-12 Thread Chris Angelico
2014-09-12 23:20 GMT+10:00 ast : > Sorry I sent this message in the wrong forum. > I intended to send it to fr.comp.lang.python Ah! Okay. That works too :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Changer le path pour l'accès aux modules

2014-09-12 Thread Chris Angelico
2014-09-12 23:19 GMT+10:00 ast : > Tout d'abord à quoi correspond le ' ' vide au tout début ? > Pourquoi y a t'il deux backslashs \\ entre les répertoires ? > (sous windows normalement c'est un seul) Hi! I'm afraid my French isn't very good, but Google Translate suggests you're asking about why th

Re: Changer le path pour l'accès aux modules

2014-09-12 Thread ast
"ast" a écrit dans le message de news:5412f2cb$0$2069$426a3...@news.free.fr... bonjour Mon path est: sys.path [' ', 'C:\\Python33\\Lib\\idlelib', 'C:\\Windows\\system32\\python33.zip', 'C:\\Python33\\DLLs', 'C:\\Python33\\lib', 'C:\\Python33', 'C:\\Python33\\lib\\site-packages', 'mypath']

Changer le path pour l'accès aux modules

2014-09-12 Thread ast
bonjour Mon path est: sys.path [' ', 'C:\\Python33\\Lib\\idlelib', 'C:\\Windows\\system32\\python33.zip', 'C:\\Python33\\DLLs', 'C:\\Python33\\lib', 'C:\\Python33', 'C:\\Python33\\lib\\site-packages', 'mypath'] Tout d'abord à quoi correspond le ' ' vide au tout début ? Pourquoi y a t'il deux

Re: pythonw.exe has stopped working

2014-09-12 Thread Marko Rauhamaa
Steven D'Aprano : > rahuldbha...@gmail.com wrote: >> encountered this problem and knows how to fix it ? some fix like >> providing more memory or specifying some parameter when pythonw.exe >> starts? > > Install more memory? > > It might help if you show us the code that crashes. Reminds me of a

Re: Pyston 0.2 released

2014-09-12 Thread serge Guelton
On Thu, Sep 11, 2014 at 12:52:15PM -0700, Kevin Modzelewski wrote: > > Hi all, we're excited to announce the existence of Pyston 0.2, a > much-improved version of our new Python JIT. The new > version features greatly improved language support, basic native C API > support, and an experimental GI

Re: pythonw.exe has stopped working

2014-09-12 Thread Steven D'Aprano
rahuldbha...@gmail.com wrote: > It's strange that while it's able to open other test cases but fails on > one particular test case. The distinguishing  fact about the test case is > that it is a big one using lots of keywords. Sounds like you've run out of memory, and Windows has killed the proce

Re: pythonw.exe has stopped working

2014-09-12 Thread Rahul Bhagat
On Friday, 12 September 2014 11:18:25 UTC+5:30, Rahul Bhagat wrote: > Hello Folks, > > > > I'm using RIDE -- Robot Framework Test Data Editor > > RIDE 1.3 running on Python 2.7.6. > > > > When I click on some of my test case the RIDE GUI hangs and gives bellow > error message. > > > >

Re: Example of python service running under systemd?

2014-09-12 Thread Chris Angelico
On Fri, Sep 12, 2014 at 4:18 PM, Ervin Hegedüs wrote: > is there any other reason outside the debugging? > > Of course, I've handled that in a simple way: > > parser = optparse.OptionParser() > > parser.add_option("-d", > "--debug", > action="c