Re: [Glitch?] Python has just stopped working

2017-02-23 Thread tomasz . wisniewski . gm
W dniu wtorek, 16 lutego 2016 21:09:50 UTC+1 użytkownik Theo Hamilton napisał: > I woke up two days ago to find out that python literally won't work any > more. I have looked everywhere, asked multiple Stack Overflow questions, > and am ready to give up. Whenever I run python (3.5), I get the follo

Re: --> Running shell script with python

2016-08-18 Thread gm
On 08/18/2016 11:16 AM, Lawrence D’Oliveiro wrote: On Thursday, August 18, 2016 at 8:00:51 PM UTC+12, gm wrote: os.system("python /home/pi/test/testserver.sh") command How to run shell ( not python ) script, from python code ? Take out the “python” from the command. :-) Damn

lotto number generator

2015-06-01 Thread gm
7.) 1 2 8.) 1 2 9.) 1 2 10.) 1 2 So, i want to print out (in rows) each possible configuration but for all 10 pairs. example: 1 1 1 2 2 2 2 1 1 1 2 2 2 1 1 1 1 2 2 2 1 1 2 2 1 1 2 2 1 1 etc. What would be the best way to make something like this ? Maybe some tutorial ? GM -- https://mail.

Raspberry model b --> program

2014-11-08 Thread gm
Hi ! I have one small program that should be completed till tomorrow so if someone can help am ready to pay this ( btw. budget for this is $40 ). Project: - usb scanner is connected to the PI. - when the user gets his e.g. coffe bill with barcode, he put this bill in from of scanner and scann

Re: Trapping the segfault of a subprocess.Popen

2011-04-07 Thread Pierre GM
On Apr 7, 5:12 am, Terry Reedy wrote: > On 4/6/2011 7:58 PM, Nobody wrote: > > > On Wed, 06 Apr 2011 02:20:22 -0700, Pierre GM wrote: > > >> I need to run a third-party binary from a python script and retrieve > >> its output (and its error messages). I u

Re: Trapping the segfault of a subprocess.Popen

2011-04-07 Thread Pierre GM
On Apr 7, 1:58 am, Nobody wrote: > On Wed, 06 Apr 2011 02:20:22 -0700, Pierre GM wrote: > > I need to run a third-party binary from a python script and retrieve > > its output (and its error messages). I use something like > >>>> process = subprocess.Popen(o

Trapping the segfault of a subprocess.Popen

2011-04-06 Thread Pierre GM
All, I need to run a third-party binary from a python script and retrieve its output (and its error messages). I use something like >>> process = subprocess.Popen(options, stdout=subprocess.PIPE, >>> stderr=subprocess.PIPE) >>> (info_out, info_err) = process.communicate() That works fine, except

Re: Logging exceptions to a file

2009-05-07 Thread Pierre GM
On May 7, 5:32 am, Lie Ryan wrote: > Pierre GM wrote: > > All, > > I need to log messages to both the console and a given file. I use the > > following code (on Python 2.5) > > >>>> import logging > >>>> # > >>>> logging.b

Logging exceptions to a file

2009-05-06 Thread Pierre GM
All, I need to log messages to both the console and a given file. I use the following code (on Python 2.5) >>> import logging >>> # >>> logging.basicConfig(level=logging.DEBUG,) >>> logfile = logging.FileHandler('log.log') >>> logfile.setLevel(level=logging.INFO) >>> logging.getLogger('').addHandl

C Python Network Performance

2007-07-11 Thread GM M
Hello, I am writing an application bulk of which is sending and receving UDP data. I was evaluating which language will be a better fit for the job. I wrote following small pieces of code in Python and C respectively: from socket import * import sys if __name__ == '__main__': s = socket(AF

Re: Thunderbird access to this newsgroup

2007-06-19 Thread engarde . gm
On Jun 18, 1:23 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > You might find, as many others do, that it's convenient to read this > group using the Gmane service - it's group gmane.comp.python.general on > server news.gmane.org. I tried news.gmane.org in Thunderbird and I keep on getting a error s

Re: what is wrong with my python code?

2007-02-07 Thread Pierre GM
On Wednesday 07 February 2007 12:43:34 Dongsheng Ruan wrote: > I got feed back saying" list object is not callable". But I can't figure > out what is wrong with my code. > for i in range(l): > print A(i) You're calling A, when you want to access one of its elements: use the straight bracket

Problem on getting various character set from pop3.retr

2006-09-08 Thread GM
Dear all, The problem that I am facing now is that, when I use poplib to get a email message with chinese character set like big5, the character string is changed automatically to sth like =B8=D5=ACQ=AAM...the OS I am using is red hat ES4 and the python version I am using is 2.3.4 (it seems python

Convert to big5 to unicode

2006-09-07 Thread GM
Dear all, Could you all give me some guide on how to convert my big5 string to unicode using python? I already knew that I might use cjkcodecs or python 2.4 but I still don't have idea on what exactly I should do. Please give me some sample code if you could. Thanks a lot Regards, Gary -- http