Re: [Tutor] Ongoing problems with Pam's new computer

2012-02-09 Thread Lowell Tackett
Doggonit!  I was half-way thru a really cool Python solution, too! From the virtual desk of Lowell Tackett  From: bob gailer To: tutor@python.org Sent: Thursday, February 9, 2012 7:48 PM Subject: Re: [Tutor] Ongoing problems with Pam's new computer On 2

Re: [Tutor] Ongoing problems with Pam's new computer

2012-02-09 Thread bob gailer
On 2/9/2012 6:56 PM, Steven D'Aprano wrote: bob gailer wrote: Today is the third time Pam (connecting to the web site for event publication) has run into an inexplicable Access error. I don't think this has anything to do with learning Python. You are right. I was surprised to discover I ha

Re: [Tutor] Ongoing problems with Pam's new computer

2012-02-09 Thread Steven D'Aprano
bob gailer wrote: Today is the third time Pam (connecting to the web site for event publication) has run into an inexplicable Access error. I don't think this has anything to do with learning Python. -- Steven ___ Tutor maillist - Tutor@python.or

Re: [Tutor] Character Buffer Object Error

2012-02-09 Thread Michael Lewis
On Thu, Feb 9, 2012 at 2:43 PM, bob gailer wrote: > Always reply-all so a copy goes to the tutor list. > > On 2/8/2012 11:04 PM, Michael Lewis wrote: > > Thanks Bob, > > Thanks for what if you did not follow my suggestions? > I partially followed your suggestions by getting rid of str.replace(old

Re: [Tutor] Character Buffer Object Error OOPS

2012-02-09 Thread bob gailer
On 2/8/2012 11:04 PM, Michael Lewis wrote: Thanks Bob, My Bad - I did not examine all your code - I broke my own rule. Your code is still a little buggy. The below code is what I came up with without using your suggestion. On a scale, how novice is mine compared to what you offered? I am cu

Re: [Tutor] Character Buffer Object Error

2012-02-09 Thread bob gailer
Always reply-all so a copy goes to the tutor list. On 2/8/2012 11:04 PM, Michael Lewis wrote: Thanks Bob, Thanks for what if you did not follow my suggestions? Your code is still pretty buggy. Please test it by running it, seeing that the result is not correct, then try the desk checking.

[Tutor] Ongoing problems with Pam's new computer

2012-02-09 Thread bob gailer
Today is the third time Pam (connecting to the web site for event publication) has run into an inexplicable Access error. Error 430 Class does not support Automation or does not support expected interface. H have googled this error. None of the explanations I found relate in any way to what I se

Re: [Tutor] bogus characters in a windows file

2012-02-09 Thread Garry Willgoose
> >> I'm reading a file output by the system utility WMIC in windows (so I can >> track CPU usage by process ID) and the text file WMIC outputs seems to have >> extra characters in I've not seen before. >> >> I use os.system('WMIC /OUTPUT:c:\cpu.txt PROCESS GET ProcessId') to output >> the fil

Re: [Tutor] exercise with classes

2012-02-09 Thread Joel Goldstick
On Thu, Feb 9, 2012 at 2:23 PM, Tonu Mikk wrote: > > > On Mon, Feb 6, 2012 at 12:58 PM, Dave Angel wrote: >> >> On 02/06/2012 01:24 PM, Tonu Mikk wrote: >>> >>> Now I get an error:  NameError: global name 'self' is not define. >>> >>> Tonu >>> >>> >> Put your remarks after the stuff you quote.  Y

Re: [Tutor] exercise with classes

2012-02-09 Thread Dave Angel
On 02/09/2012 02:23 PM, Tonu Mikk wrote: On Mon, Feb 6, 2012 at 12:58 PM, Dave Angel wrote: On 02/06/2012 01:24 PM, Tonu Mikk wrote: Now I get an error: NameError: global name 'self' is not define. Tonu Put your remarks after the stuff you quote. You're top-posting, which makes the r

Re: [Tutor] exercise with classes

2012-02-09 Thread Tonu Mikk
On Mon, Feb 6, 2012 at 12:58 PM, Dave Angel wrote: > On 02/06/2012 01:24 PM, Tonu Mikk wrote: > >> Now I get an error: NameError: global name 'self' is not define. >> >> Tonu >> >> >> Put your remarks after the stuff you quote. You're top-posting, which > makes the reply difficult to follow. >

Re: [Tutor] PyQT GUI Threading example

2012-02-09 Thread xDog Walker
On Wednesday 2012 February 08 06:46, R.S. wrote: > I can't find any full example of threading with many threads working and > updating GUI (precisely i need QTreeWidget). I can only find: not updating > GUI examples, updating GUI examples with one thread. But i just can't find > what i need. Could

Re: [Tutor] two-dimensional color map

2012-02-09 Thread Jose Amoreira
On Thursday, February 09, 2012 10:45:35 AM Nate Lastname wrote: > Have you considered pygame and its surfarray module? Thanks, Nate. I haven't, but I will. Ze___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://ma

Re: [Tutor] two-dimensional color map

2012-02-09 Thread Nate Lastname
Have you considered pygame and its surfarray module? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] two-dimensional color map

2012-02-09 Thread Jose Amoreira
I'm so, so sorry! When editing my script before posting it, I accidently deleted a line activating matplotlib interactive mode. The correct listing is the one below. Hello I'm trying to plot a false-color map of a two dimensional function. My main problem is that the function I want to plot dep

[Tutor] two-dimensional color map

2012-02-09 Thread Jose Amoreira
Hello I'm trying to plot a false-color map of a two dimensional function. My main problem is that the function I want to plot depends also on time, and I wish to show the plot as the function evolves, in real time. My first (and only, so far) idea on how to achieve this was to iterate the comput

Re: [Tutor] What the difference between the two RE?

2012-02-09 Thread Brett Ritter
On Thu, Feb 9, 2012 at 1:15 AM, daedae11 wrote: > import re > re.match("^hello", "hello") > re.match("hello", "hello") > > Please give a string that matches RE "^hello" but does not match RE "hello", > or matches RE "hello" but does not match RE "^hello". In addition to the other answers, it's im

Re: [Tutor] How to make def where arguments are either stated when called or entered via raw_input

2012-02-09 Thread Brian van den Broek
On 9 Feb 2012 13:34, "David Craig" wrote: > > Hi, > I'm trying to write a function that will either take arguments when the function is called, such as myFunc(x,y,z) or if the user does not enter any arguments, myFunc() the raw_input function will ask for them. But I dont know how to check how man

Re: [Tutor] How to make def where arguments are either stated when called or entered via raw_input

2012-02-09 Thread Peter Otten
David Craig wrote: > I'm trying to write a function that will either take arguments when the > function is called, such as myFunc(x,y,z) or if the user does not enter > any arguments, myFunc() the raw_input function will ask for them. But I > dont know how to check how many arguments have been ent

Re: [Tutor] How to make def where arguments are either stated when called or entered via raw_input

2012-02-09 Thread Steven D'Aprano
David Craig wrote: Hi, I'm trying to write a function that will either take arguments when the function is called, such as myFunc(x,y,z) or if the user does not enter any arguments, myFunc() the raw_input function will ask for them. But I dont know how to check how many arguments have been ent

Re: [Tutor] What the difference between the two RE?

2012-02-09 Thread Steven D'Aprano
daedae11 wrote: import re re.match("^hello", "hello") re.match("hello", "hello") Please give a string that matches RE "^hello" but does not match RE "hello", or matches RE "hello" but does not match RE "^hello". re.match always matches the beginning of the string, so re.match("^hello", so

[Tutor] How to make def where arguments are either stated when called or entered via raw_input

2012-02-09 Thread David Craig
Hi, I'm trying to write a function that will either take arguments when the function is called, such as myFunc(x,y,z) or if the user does not enter any arguments, myFunc() the raw_input function will ask for them. But I dont know how to check how many arguments have been entered. My code is be

Re: [Tutor] (no subject)

2012-02-09 Thread Steven D'Aprano
ken brockman wrote: I have been trying to post all afternoon to no avail. I keep getting bounced back... Ken, I don't suppose you have another email address that you sometimes use? Because if you do, that may be the problem. If you are subscribed to this list as krush1...@yahoo.com, and you

Re: [Tutor] general basic question

2012-02-09 Thread Andreas Perstinger
On Wed, 8 Feb 2012 23:54:58 -0800 (PST) ken brockman wrote: > I'm back on the list again, and if not too late, here is the asked > for trace. i've managed to replicate the original error msg, by > removing the pickled file Genfacts.p, from the directory. > Traceback (most recent call last): > File

Re: [Tutor] bogus characters in a windows file

2012-02-09 Thread Peter Otten
Garry Willgoose wrote: > I input the data with the lines > > infile = open('c:\cpu.txt','r') > infile.readline() > infile.readline() > infile.readline() > > the readline()s yield the following output > > '\xff\xfeP\x00r\x00o\x00c\x00e\x00s\x00s\x00I\x00d\x00 \x00 \x00\r\x00\n' > '\x000\x00 \x00

Re: [Tutor] 回复: Re: What the difference between the two RE?

2012-02-09 Thread Christian Witts
On 2012/02/09 10:17 AM, daedae11 wrote: So doesn't it means the follow two sentences can achieve the same goal? re.match("^hello", "hello") re.match("hello", "hello") daedae11 *发件人:* Christian Witts

[Tutor] general simply question

2012-02-09 Thread ken brockman
Without sight of code it's only a guess but are you creating the file with the 'wb' mode - ie. write binary? :- myPickleFile = open("somefilename.dat", "wb") oops. Not as in object orientated programming, just as in oops, i messed up. pasted wrong bit of code. Here is the relative bit. def Gen

Re: [Tutor] What the difference between the two RE?

2012-02-09 Thread Christian Witts
On 2012/02/09 09:44 AM, daedae11 wrote: However, re.match("hello", "And they said hello" ) will also return None. So "And they said hello" also won't be matched by the regex pattern "hello". daedae11 *From:* Christian Witt