Re: [Tutor] how to read over serial port

2008-11-03 Thread shawn bright
Hey all, thanks for all the help. I will go out in the morning and check all the equipment, have heard too much advice from too many with python experience to ignore the fact that something is likely screwed up in my settings or baudrate. will be back in touch later as i check it out. sk On Mon,

Re: [Tutor] how to read over serial port

2008-11-03 Thread Brian C. Lane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 shawn bright wrote: > Forgot some info, > i hooked the device up and used a serial terminal and got back stuff like this > !^V$G(R)±LL,3602.0960,N,10229.2959,W,r$4013,V*2E > some of the above is what i am looking for. > Ok, that looks bad. You have s

Re: [Tutor] accessing an image with pygame.image.load()

2008-11-03 Thread Jerry Hill
On Mon, Nov 3, 2008 at 7:05 PM, bob gailer <[EMAIL PROTECTED]> wrote: > Christopher Spears wrote: >> self.image = >> pygame.image.load("C:Users\Chris\Documents\python\assignment07\chris_graphics\spaceship.gif") >> > > Since \ is used to "escape" certain characters it is advisable to either use > \\

Re: [Tutor] how to read over serial port

2008-11-03 Thread shawn bright
Forgot some info, i hooked the device up and used a serial terminal and got back stuff like this !^V$G(R)±LL,3602.0960,N,10229.2959,W,r$4013,V*2E some of the above is what i am looking for. settings are the same as in my python script thanks for any help, shawn On Mon, Nov 3, 2008 at 3:49 PM, J

Re: [Tutor] python based blogging software/cms?

2008-11-03 Thread Bill Campbell
On Mon, Nov 03, 2008, [EMAIL PROTECTED] wrote: >Not sure if this is appropriate for the tutor mailing list, but it >is a beginner question for python. > >It seems most of the popular cms/blogging software is php/mysql based > >Anything of substancial popularity/support based on python? > >I was loo

Re: [Tutor] accessing an image with pygame.image.load()

2008-11-03 Thread bob gailer
Christopher Spears wrote: I want to access a spaceship image with pygame.image.load(), so I wrote self.image = pygame.image.load("C:Users\Chris\Documents\python\assignment07\chris_graphics\spaceship.gif") However, I got this error message: error: Couldn't open C:Users\Chris\Documents\python

[Tutor] python based blogging software/cms?

2008-11-03 Thread lister
Not sure if this is appropriate for the tutor mailing list, but it is a beginner question for python. It seems most of the popular cms/blogging software is php/mysql based Anything of substancial popularity/support based on python? I was looking for something along the lines of wordpress popular

Re: [Tutor] how to read over serial port

2008-11-03 Thread Jerry Hill
On Mon, Nov 3, 2008 at 4:08 PM, shawn bright <[EMAIL PROTECTED]> wrote: > yes, they look like this > �� > > so i used your print repr(chr(ord(i))) and got this Note that that's the same thing as just printing repr(i). > so, what do i do now? > and thanks for the info, by the w

[Tutor] accessing an image with pygame.image.load()

2008-11-03 Thread Christopher Spears
I want to access a spaceship image with pygame.image.load(), so I wrote self.image = pygame.image.load("C:Users\Chris\Documents\python\assignment07\chris_graphics\spaceship.gif") However, I got this error message: error: Couldn't open C:Users\Chris\Documents\python\assignment07\chris_graphics

Re: [Tutor] how to read over serial port

2008-11-03 Thread shawn bright
yes, they look like this �� so i used your print repr(chr(ord(i))) and got this '\x00' '\x06' '\x00' ':' '\x80' '\x1f' '\x16' 'g' 'J' 's' '\xde' '\xc0' 'J' 's' '\xde' '\xc0' '\xce' '\xcc' '\x06' '\n' '\x00' '\x00' ' ' '\xaf' 'J' 's' '\xde' '\xc0' so, what do i do now? and than

Re: [Tutor] stopping threads ?

2008-11-03 Thread Kent Johnson
On Mon, Nov 3, 2008 at 1:14 PM, Lie Ryan <[EMAIL PROTECTED]> wrote: > On Mon, 03 Nov 2008 14:46:09 +, dave selby wrote: > >> Hi All, >> >> Why when I use threads in my app (I know they are evil ...lol) does it >> not stop with ctrl-c, I have to use ctrl-z ? >> >> Cheers >> >> Dave > > Wonder wh

Re: [Tutor] (no subject)

2008-11-03 Thread otu
Thank You! Kent and Kerbros. I got it Regards, Bennedy. > On Sat, Nov 1, 2008 at 7:17 AM, <[EMAIL PROTECTED]> wrote: > >> >> I am struggling with how to enable executable files. I copied the ff >> program on idlle non-interactice and run it. >> >> the_world_is_flat =1 >> if the_world_is_flat:

Re: [Tutor] string.join()

2008-11-03 Thread Monte Milanuk
Thanks for the verification, folks. What had me stumped for a while was the first method was string.join(words[,sep]), and the new one showed str.join(words)... it wasn't immediately obvious (to me) that 'str' was in this case supposed to be the separator. Thanks again, Monte

Re: [Tutor] how to read over serial port

2008-11-03 Thread Lie Ryan
On Mon, 03 Nov 2008 08:48:44 -0600, shawn bright wrote: > ok, i have another question: > if i run this: > #!/usr/bin/env python > f = 'test_out' > f = open(f, 'r').read() > for i in f: > print ord(i) > > I get this: > 0 > 6 > 0 > 58 > 128 > 31 > 22 > 103 > 74 > 115 > 222 > 192 > 74 > 115 > 22

Re: [Tutor] how to read over serial port

2008-11-03 Thread Lie Ryan
On Mon, 03 Nov 2008 08:48:44 -0600, shawn bright wrote: > ok, i have another question: > if i run this: > #!/usr/bin/env python > f = 'test_out' > f = open(f, 'r').read() > for i in f: > print ord(i) > > I get this: > 0 > 6 > 0 > 58 > 128 > 31 > 22 > 103 > 74 > 115 > 222 > 192 > 74 > 115 > 22

Re: [Tutor] stopping threads ?

2008-11-03 Thread Lie Ryan
On Mon, 03 Nov 2008 14:46:09 +, dave selby wrote: > Hi All, > > Why when I use threads in my app (I know they are evil ...lol) does it > not stop with ctrl-c, I have to use ctrl-z ? > > Cheers > > Dave Wonder why? Because Ctrl-C merely raises KeyboardInterrupt in the main thread, breaking

Re: [Tutor] How to check online status

2008-11-03 Thread W W
On Mon, Nov 3, 2008 at 9:54 AM, Timmie <[EMAIL PROTECTED]> wrote: > Dear fellow Pythonistas, > is it possible to check with Python whether a computer is connected to the > internet or not? Yes. That's the short answer anyway. > I don't not find a module which can do such a thing like 'ping'?

Re: [Tutor] How to check online status

2008-11-03 Thread Tim Golden
Timmie wrote: Dear fellow Pythonistas, is it possible to check with Python whether a computer is connected to the internet or not? You've got several options. The simplest, cross-platform solution is to connect a socket to a known port on a known server with a timeout and see if it connects. Bu

Re: [Tutor] string.join()

2008-11-03 Thread Kent Johnson
On Mon, Nov 3, 2008 at 10:54 AM, Monte Milanuk <[EMAIL PROTECTED]> wrote: > Hello again, > > Just looking for clarification on a point: the book I'm using is written > around Python v.2.3, and has an exercise using string.join(). Specifically, > it said to use string.join(msgList, "") > After a

Re: [Tutor] string.join()

2008-11-03 Thread A.T.Hofkamp
Monte Milanuk wrote: Hello again, Just looking for clarification on a point: the book I'm using is written around Python v.2.3, and has an exercise using string.join(). Specifically, it said to use string.join(msgList, ""), the object of which was to take the list items in msgList and concatena

[Tutor] How to check online status

2008-11-03 Thread Timmie
Dear fellow Pythonistas, is it possible to check with Python whether a computer is connected to the internet or not? I don't not find a module which can do such a thing like 'ping'? And how do I make my python scipts that use urllib to recognize the windows operating system proxy settings? Thank

[Tutor] string.join()

2008-11-03 Thread Monte Milanuk
Hello again, Just looking for clarification on a point: the book I'm using is written around Python v.2.3, and has an exercise using string.join(). Specifically, it said to use string.join(msgList, ""), the object of which was to take the list items in msgList and concatenate them using a bla

Re: [Tutor] how to read over serial port

2008-11-03 Thread shawn bright
ok, i have another question: if i run this: #!/usr/bin/env python f = 'test_out' f = open(f, 'r').read() for i in f: print ord(i) I get this: 0 6 0 58 128 31 22 103 74 115 222 192 74 115 222 192 (deleted some in the email for brevity) if i do for i in f: print chr(ord(i)) i get the same

[Tutor] stopping threads ?

2008-11-03 Thread dave selby
Hi All, Why when I use threads in my app (I know they are evil ...lol) does it not stop with ctrl-c, I have to use ctrl-z ? Cheers Dave -- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html __

Re: [Tutor] how to read over serial port

2008-11-03 Thread shawn bright
Hey all, sorry, but am i supposed to be using 'rb' to read this? thanks sk On Sun, Nov 2, 2008 at 11:50 AM, shawn bright <[EMAIL PROTECTED]> wrote: > Thanks all, > Yeah, checked the settings, and when i have the thing talk to a > program that just prints out whatever the serial port reads, It was

Re: [Tutor] pickling, writing, reading individual lists from a file

2008-11-03 Thread Dinesh B Vadhia
Just one change - pickler.load() doesn't take an argument - otherwise works perfectly! Thank-you. ... 6. Make multiple calls to dump() and load() using an explicit pickler, pickling directly to the file (not tested): import cPickle as pickle filename = 'lists.txt' fw = open(filename, 'wb')

[Tutor] Tkinter troubles

2008-11-03 Thread btkuhn
Hi guys, I'm having trouble with weird activity with a Tkinter GUI I'm creating. I've stripped down the code somewhat to simplify the problem somewhat, and I've posted it below, with further explanation at the end of this message: from Tkinter import * import tkFileDialog,tkSimpleDialog WINDO

Re: [Tutor] pickling, writing, reading individual lists from a file

2008-11-03 Thread Lie Ryan
On Mon, 03 Nov 2008 06:42:28 -0500, Kent Johnson wrote: > On Mon, Nov 3, 2008 at 6:15 AM, Lie Ryan <[EMAIL PROTECTED]> wrote: >> On Sun, 02 Nov 2008 23:20:47 -0800, Dinesh B Vadhia wrote: >> >>> I want to pickle a bunch of lists and write each list separately to a >>> fileand then read them back.

Re: [Tutor] pickling, writing, reading individual lists from a file

2008-11-03 Thread Kent Johnson
On Mon, Nov 3, 2008 at 6:15 AM, Lie Ryan <[EMAIL PROTECTED]> wrote: > On Sun, 02 Nov 2008 23:20:47 -0800, Dinesh B Vadhia wrote: > >> I want to pickle a bunch of lists and write each list separately to a >> fileand then read them back. > To solve your problem, you have several alternative possibil

Re: [Tutor] pickling, writing, reading individual lists from a file

2008-11-03 Thread Lie Ryan
On Sun, 02 Nov 2008 23:20:47 -0800, Dinesh B Vadhia wrote: > I want to pickle a bunch of lists and write each list separately to a > fileand then read them back. Here is my code with the EOF error: > > filename = 'lists.txt' > fw = open(filename, 'w') > for l in m: > n = pickle.dumps(l,

Re: [Tutor] (no subject)

2008-11-03 Thread Lie Ryan
On Sat, 01 Nov 2008 06:17:06 -0500, otu wrote: > Dear Friends, > I have just started learning python programming. I have no previous > programming knowledge. > I am presently using Python 2.6 windows version. I am struggling with > how to enable executable files. I copied the ff program on idlle >

Re: [Tutor] unsubscribing to tutor assistance

2008-11-03 Thread Lie Ryan
On Sun, 02 Nov 2008 20:53:41 -0600, Sean Fisher wrote: > please end y tutor e-mail assistance > Thank you You can unsubscribe from here: http://mail.python.org/mailman/listinfo/ tutor alternatively, you can also send some magic mail to a magic email address containing some magic subject line a

Re: [Tutor] request from john caldwell to get off the mailing list

2008-11-03 Thread Lie Ryan
On Sun, 02 Nov 2008 12:59:16 -0800, john caldwell wrote: > Please take me oof of the mailing list. thank you > [EMAIL PROTECTED] > > You can unsubscribe from here: http://mail.python.org/mailman/listinfo/ tutor alternatively, you can also send some magic mail to a magic email address con