[Tutor] Re: Presentation

2005-02-01 Thread Wolfram Kraus
Paul Hartley wrote: [...] When I was a member of the Forth Interest Group in the USA we learned that Forth was used on the buggy that went to mars, that it started life controlling huge radio telescopes which only had 4k (yes 4k) of memory for both language and application. Well, the rover used For

Re: [Tutor] Better structure?

2005-02-01 Thread Danny Yoo
On Mon, 31 Jan 2005, Jacob S. wrote: > BTW, it was a few months ago, not days... but the thought still counts. > At least you remember. Hi Jacob, Wait, was it really a few months ago? Let me check the archive... http://mail.python.org/pipermail/tutor/2004-December/033728.html You're ri

Re: [Tutor] Presentation

2005-02-01 Thread Kent Johnson
Eric Raymond's "Why Python?" essay is a classic: http://pythonology.org/success&story=esr Bruce Eckel's "Why I love Python" presentation is here: http://64.78.49.204/pub/eckel/LovePython.zip This page has lots of links you might be interested in: http://www.ferg.org/python_presentations/index.html

Re: [Tutor] Better structure?

2005-02-01 Thread Kent Johnson
Danny Yoo wrote: On Mon, 31 Jan 2005, Jacob S. wrote: ### Pseudocode commandDispatchTable = {'clear' : clearCommand 'quit' : quitCommand 'remove' : removeCommand 'return' : returnCommand 'gatl'

[Tutor] Programming Challenge C++ and Python

2005-02-01 Thread Ali Polatel
I need a favor.I play chess at a chess server with the name ICC(www.chessclub.com). I want to write a plugin for their interface using Python. I don't have any idea about how to write a plugin but I found out that the server administrator has written a Plugin Development Kit in C++ for those who

Re: [Tutor] Better structure?

2005-02-01 Thread Liam Clarke
> http://www.cs.bell-labs.com/cm/cs/pearls/ That link seems to be dead. Pity. My whole programming experience is comprised of Ah-Ha's followed by Um's... -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to tak

[Tutor] Re: Better structure?

2005-02-01 Thread Jorge Luiz Godoy Filho
Liam Clarke wrote: >> http://www.cs.bell-labs.com/cm/cs/pearls/ > That link seems to be dead. Pity. My whole programming experience is > comprised of Ah-Ha's followed by Um's... It worked here. -- Godoy. <[EMAIL PROTECTED]> ___ Tutor mailli

Re: [Tutor] How does import work?

2005-02-01 Thread Michael Janssen
On Fri, 28 Jan 2005 18:40:53 +0100, Johan Nilsson <[EMAIL PROTECTED]> wrote: > >>> from scipy.signal.signaltools import * > > /Traceback (most recent call last): > File "", line 1, in -toplevel- > from scipy.signal.signaltools import * > ImportError: No module named signaltools/ > > So I

Re: [Tutor] carriage return on windows

2005-02-01 Thread Michael Janssen
On Mon, 31 Jan 2005 18:01:59 -0600, Victor Rex <[EMAIL PROTECTED]> wrote: > I played around with this output issue and I love the way it works. > Now, how do you do this in *nix? I tried the same approach and I get a > blank line for 5 seconds (or whatever number of cycles you have on your > examp

[Tutor] Test

2005-02-01 Thread Mark Brown
Test, please disregard. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] carriage return on windows

2005-02-01 Thread Victor Rex
Michael Janssen wrote: On Mon, 31 Jan 2005 18:01:59 -0600, Victor Rex <[EMAIL PROTECTED]> wrote: I played around with this output issue and I love the way it works. Now, how do you do this in *nix? I tried the same approach and I get a blank line for 5 seconds (or whatever number of cycles you h

[Tutor] Matching with beginning of the line in the character set

2005-02-01 Thread Smith, Jeff
I want to match a string which is preceeded by a space or occurs at the beginning of the line. I also don't want to catch the preceeding character as a group. I have found both of the following to work re.compile('(?:^|\s)string') re.compile('(?:\A|\s)string') But would prefer to

[Tutor] Tkinter questions

2005-02-01 Thread Mark Kels
Hello, I got some Tkinter questions that I need the answer for to complete a little project of mine: 1. How can I make the program to open in a X*Y sized window ? 2. How can I open another window from the first one (without closing it) ? 3. How can I add a file browser for my app (like the one you

Re: [Tutor] Matching with beginning of the line in the character set

2005-02-01 Thread Kent Johnson
Smith, Jeff wrote: I want to match a string which is preceeded by a space or occurs at the beginning of the line. I also don't want to catch the preceeding character as a group. I have found both of the following to work re.compile('(?:^|\s)string') re.compile('(?:\A|\s)string') H

RE: [Tutor] Matching with beginning of the line in the character set

2005-02-01 Thread Smith, Jeff
Kent, I think \b will work for me since I was really looking for [\A\W] anyway. That still doesn't answer the generalized question about something like [\A\d] for instance. Thanks, Jeff BTW, I was using raw strings although I forgot to put that in. -Original Message- From: Kent Johnson

Re: [Tutor] Matching with beginning of the line in the character set

2005-02-01 Thread Kent Johnson
Smith, Jeff wrote: Kent, I think \b will work for me since I was really looking for [\A\W] anyway. That still doesn't answer the generalized question about something like [\A\d] for instance. I know :-) The docs say [] is "Used to indicate a set of characters." So it kind of makes sense that it wor

Re: [Tutor] Matching with beginning of the line in the character set

2005-02-01 Thread Mike Bell
Alternatively, you could .split() your string and not invoke the mechanisms dealing with regular expressions. Is this considered stylistically sloppy in the event that the split results in a very long array? Sloppier than REs are to begin with? I think that the problem with [\A\d] is that \A is

Re: [Tutor] Append function

2005-02-01 Thread kumar s
Hi Danny: I have ~50 files in this format: File1: 680:209 3006.3 266:123 250.5 62:393 117.3 547:429 161.5 341:311 546.5 132:419 163.3 98:471 306.3 File 2: 266:123 168.0 62:393 119.3 547:429 131.0 341:311 162.3 132:419 149.5 98:471 85.0 289:215 207.0 75:553 517.0 I am generating these fi

Re: [Tutor] Better structure?

2005-02-01 Thread Alan Gauld
> What, like > global radiusaxis, radiusaxis2 exactly. > > And since there is no input parameter and no return statement > > and you only call start() once... > > Not true. If y == 'clear', then start is called to "redraw" the window. > Very important part. OK, I missed that, but its still bette

Re: [Tutor] Presentation

2005-02-01 Thread Alan Gauld
> Any help I can get would be much appreciated - such as > language comparisons, companies and systems that use python, > debates about what python is good for Most of that can be found under the General FAQ on the python web site. And links to other similar material. Alan G ___

Re: [Tutor] Append function

2005-02-01 Thread kumar s
Hi Kent, Thank you for your suggestion. I keep getting IOError permission denied every time I try the tips that you provided. I tried to lookup on this error and did not get reasonable answer. Is this error something to do with Windows OS? Any suggestions. Thank you K >>> allColumns = [readC

Re: [Tutor] Better structure?

2005-02-01 Thread Alan Gauld
> ever get the chance, you may want to take a look at a book called > Programming Pearls: > > http://www.cs.bell-labs.com/cm/cs/pearls/ > I'll second that. Personally I try to read both books (I have the original 2 volume version!) every couple of years - they are that valuable. Most newbi

Re: [Tutor] Programming Challenge C++ and Python

2005-02-01 Thread Alan Gauld
>I don't have any idea about how to write a plugin but I found out > that the server administrator has written a Plugin Development Kit in > C++ for those who wish to write plugins for the interface.I don't know > C++ so I cannot convert this kit into python scripts. Caveat: I've never done th

[Tutor] Introductory Links

2005-02-01 Thread jhomme
-Original message- From: "Alan Gauld" [EMAIL PROTECTED] Date: Tue, 1 Feb 2005 16:15:14 -0500 To: "jhomme" [EMAIL PROTECTED] Subject: Re: [Tutor] Dictionary Nesting > > Um, thanks for reminding me about the prompt. > > work my way through some other stuff before wasting people's > tim

Re: [Tutor] Append function

2005-02-01 Thread Kent Johnson
You seem to be giving a path to a directory rather than a single file. Also you are putting it in the wrong place, you should edit the allFiles list. Kent kumar s wrote: Hi Kent, Thank you for your suggestion. I keep getting IOError permission denied every time I try the tips that you provided

Re: [Tutor] Introductory Links

2005-02-01 Thread Brian van den Broek
jhomme said unto the world upon 2005-02-01 17:15: Hi, Is it possible to get a copy of the message sent to us when we first join? I want to follow the links in it so I can learn how to do the research and ask questions on the list. Thanks. Jim Hi Jim, I don't still have a copy of my Welcome msg. Bu

Re: [Tutor] Introductory Links

2005-02-01 Thread Alan Gauld
> > Then if you do send a mail you can be much more specific too, > > because you know what doesn't work! :-) > > > Is it possible to get a copy of the message sent to us when we first join? >I want to follow the links in it so I can learn how to do the research > and ask questions on the list. I'

[Tutor] Classes

2005-02-01 Thread Ismael Garrido
Hello. I was just wondering, what magic can you do with classes? I mean, things like "class Name(Exception)" or "class Name(threading.Thread), which other classes are interesting to subclass? I've seen Object too, but I don't understand what it does. Thanks Ismael __

Re: [Tutor] Classes

2005-02-01 Thread Max Noel
On Feb 1, 2005, at 23:08, Ismael Garrido wrote: Hello. I was just wondering, what magic can you do with classes? I mean, things like "class Name(Exception)" or "class Name(threading.Thread), which other classes are interesting to subclass? I've seen Object too, but I don't understand what it doe

[Tutor] permutations, patterns, and probability

2005-02-01 Thread kevin parks
Greetings, I am working on a program to produce patterns. What would like is for it to exhaustively produce all possible permutations of a sequence of items but for each permutation produce variations, and also a sort of stutter based on probability / weighted randomess. Let us say we have til

Re: [Tutor] Presentation

2005-02-01 Thread Victor Rex
This is a great series of links. I found the following on Pythology too: Python Spotting http://pythonology.org/spotting Best of luck. Kent Johnson wrote: Eric Raymond's "Why Python?" essay is a classic: http://pythonology.org/success&story=esr Bruce Eckel's "Why I love Python" presentation is her

Re: [Tutor] permutations, patterns, and probability

2005-02-01 Thread Kent Johnson
kevin parks wrote: Greetings, I am working on a program to produce patterns. What would like is for it to exhaustively produce all possible permutations of a sequence of items but for each permutation produce variations, and also a sort of stutter based on probability / weighted randomess. Let

Re: [Tutor] carriage return on windows

2005-02-01 Thread Alan Gauld
> I played around with this output issue and I love the way it works. > Now, how do you do this in *nix? I tried the same approach and I get a > blank line for 5 seconds (or whatever number of cycles you have on your > example) and the a final line with the last value of the iterable. On Unix it i

Re: [Tutor] Better structure?

2005-02-01 Thread Jacob S.
I don't know who's going crazy here... but I checked that straight from the python 2.4 interpreter... Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. a = "go on long buddy" a.lstrip("gonl") ' on lo

Re: [Tutor] Tkinter questions

2005-02-01 Thread Jacob S.
I suggest looking at Introduction to Tkinter. http://www.pythonware.com/library/tkinter/introduction/index.htm HTH, Jacob Hello, I got some Tkinter questions that I need the answer for to complete a little project of mine: 1. How can I make the program to open in a X*Y sized window ? 2. How can I o

Re: [Tutor] Better structure?

2005-02-01 Thread Jeff Shannon
Jacob S. wrote: I don't know who's going crazy here... but I checked that straight from the python 2.4 interpreter... >>> a = "go on long buddy" >>> a.lstrip('gonl') ' on long buddy' >>> a.lstrip('gonl ') 'buddy' >>> Note that in the second case, I've included a space in the lstrip() parameter.

Re: [Tutor] Better structure?

2005-02-01 Thread Jacob S.
So, how would one go about this in a non broken code way? Don't they have something like what I'm requesting. It seems to me that a few things are flawed in the standard distribution. Little things like the overlooking of adding a method or function to decimal for returning an instance with x pl

Re: [Tutor] Better structure?

2005-02-01 Thread Jeff Shannon
Jacob S. wrote: So, how would one go about this in a non broken code way? Don't they have something like what I'm requesting. No, but it's pretty easy to do: def exact_lstrip(astring, stripstring): if astring.startswith(stripstring): astring = astring[len(stripstring):] return astr

Re: [Tutor] permutations, patterns, and probability

2005-02-01 Thread kevin parks
Tremendously helpful One question though. How can i pluck a unique item from my exhaustive list of permutations without repeats making sure that each one is used once? Like filling a bag, shaking it, and then picking from the bag and removing that item from the bag so it isn't used again...

Re: [Tutor] Presentation

2005-02-01 Thread Paul Hartley
Thank you for all your feedback on this - powerpoint presentations and all!!   Not only is the language amazing but the community is fantastic!! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Presentation

2005-02-01 Thread Terry Carroll
On Wed, 2 Feb 2005, Paul Hartley wrote: > Not only is the language amazing but the community is fantastic!! The community is one of the things I particularly like about Python. I always hated asking a question in the Perl newsgroups; although you usually got an answer, you were almost certain to

Re: [Tutor] permutations, patterns, and probability

2005-02-01 Thread Kent Johnson
kevin parks wrote: Tremendously helpful One question though. How can i pluck a unique item from my exhaustive list of permutations without repeats making sure that each one is used once? Like filling a bag, shaking it, and then picking from the bag and removing that item from the bag so it i

[Tutor] how to separate hexadecimal

2005-02-01 Thread jrlen balane
i have a 4 digit hex number (2 bytes) and i want to separate it into 2 digit hex (1 byte each) meaning i want to get the upper byte and the lower byte since i am going to add this two. how am i going to do this? should i treat it just like a normal string? please help, thanks. ex. hexa = '0x87BE"