Re: [Tutor] wanting to learn

2008-06-12 Thread Ken Oliver
>Don't be like most and put off the super timple tutorials. I had a lot >of fun (after reading the Core python books out there) with the kids >tutorial because it was just fun to play around and learn some python >/ work with some python in the process. Honestly I didn't learn >anything because

[Tutor] Turtle Triangles Problem

2008-06-12 Thread Dick Moores
The code is at < http://py77.python.pastebin.com/f3b6a6f3> The problem is shown at < http://www.rcblue.com/images/Turtle_Triangle_Problem.jpg>. I'd very much like to get rid of that last line, in this example the purple(?) one that heads northwest from the same-colored triangle. It's at this poi

Re: [Tutor] Copy file as root

2008-06-12 Thread Timo
John Fouhy schreef: > On 11/06/2008, Timo <[EMAIL PROTECTED]> wrote: > >> Hello, I'm writing a program in Python/pyGTK and I need to be root 2 >> times. The first time is to open a file, let's say menu.lst. I use >> os.system('gksudo gedit /boot/grub/menu.lst'), so that works. But what >> if

[Tutor] powerball

2008-06-12 Thread max baseman
hello and thank you everyone for your help. I apologize for my ignorance when it came to knowledge of what the powerball is it is not as wide spread as i had thought it was the powerball is a form of lottery their are 5 numbers between 1 and 55, and then their is the powerball between 1 and

Re: [Tutor] text editor for Windows?

2008-06-12 Thread Kent Johnson
On Thu, Jun 12, 2008 at 12:16 AM, Christopher Spears <[EMAIL PROTECTED]> wrote: > I just got Python installed on my Dell laptop running Windows Vista Business. > Can someone recommend a good text editor to use for Python programming? > Some people seem to like PythonWin. In the past I have use

Re: [Tutor] Turtle Triangles Problem

2008-06-12 Thread Dick Moores
At 03:04 AM 6/12/2008, Andre Engels wrote: Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/6/12 Dick Moores <[EMAIL PROTECTED]>: > The code is at > < http://py77.python.pastebin.com/f3b6a6f3> > > The problem is shown at < > http://www.rcblue.com/images/Turtle_Triangle_Problem.jp

Re: [Tutor] How to get a script to open a text file with Python?

2008-06-12 Thread Dick Moores
At 06:50 AM 6/11/2008, John Chandler wrote: Why not have python copy the text to the clipboard for you? You will need the win32 packages, which is hardly a turnoff since they are so useful. import win32clipboard win32clipboard.OpenClipboard() win32clipboard.EmptyClipboard() win32clipboard.SetC

Re: [Tutor] wanting to learn

2008-06-12 Thread bhaaluu
On Thu, Jun 12, 2008 at 3:12 AM, Ken Oliver <[EMAIL PROTECTED]> wrote: > >>http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/ > > This sounds interesting to me, but I have not been successful at downloading > the text at the link above. The dreaded 404. Does anyone have the Windows

[Tutor] Dictionary within a dictionary

2008-06-12 Thread [EMAIL PROTECTED]
Hi, I would like to understand how to generate dictionaries based on other dictionaries. For example, I have a 3 tables in ym SQL database - Groups, Categories and Sub-categories with a one-to-many relations between each. I am presuming that each of these tables is one of my dictionaries?!?! W

[Tutor] New to Python

2008-06-12 Thread Nkem Onyemachi
Hi all im new to programming so i decided 2 learn Python since it is easy to learn on ones own what really is the advantage can i know it is not "heavy" like java etc but really can it do apart 4rom being as a scripting language _ Sent from my phone using flurry - Get

Re: [Tutor] New to Python

2008-06-12 Thread bob gailer
Nkem Onyemachi wrote: Hi all im new to programming so i decided 2 learn Python since it is easy to learn on ones own what really is the advantage can i know it is not "heavy" like java etc but really can it do apart 4rom being as a scripting language Hi and welcome. As an aside I'd find yo

Re: [Tutor] powerball

2008-06-12 Thread Marilyn Davis
On Wed, June 11, 2008 9:42 pm, max baseman wrote: > hello and thank you everyone for your help. I apologize for my ignorance > when it came to knowledge of what the powerball is it is not as wide > spread as i had thought it was > > the powerball is a form of lottery their are 5 numbers between 1

Re: [Tutor] do I need f.close()

2008-06-12 Thread Terry Carroll
On Wed, 11 Jun 2008, dave selby wrote: > The whole topic came up because I just finished reading 'learning > python' 3rd edition OReilly as a refresher where there are multiple > instances of suggesting that you do the exact opposite eg ... > > [line.rstrip() for line in open('myfile')] ... p361

[Tutor] Pinging a service

2008-06-12 Thread Greg Lindstrom
Hello, I would like to write a routine to monitor services running on a remote box. My initial thought is to "ping" the remote box to monitor latency and then execute a query on the remote machine to monitor the database. What I would like is to gather data points and graph the delay to see if the

Re: [Tutor] IDE

2008-06-12 Thread Alan Gauld
"Tom" <[EMAIL PROTECTED]> wrote Does anyone know which of the IDE's mentioned above have a similar feature. (I'm on Vista,sorry!) Most will do it one way or another. We mentioned filtering the buiffer in vim, emacs has a shell bvuffer facility in which you can start python, other use the I

Re: [Tutor] do I need f.close()

2008-06-12 Thread Alan Gauld
"dave selby" <[EMAIL PROTECTED]> wrote The whole topic came up because I just finished reading 'learning python' 3rd edition OReilly as a refresher where there are multiple instances of suggesting that you do the exact opposite eg ... LP is a tutorial book so does not always teach industry st

Re: [Tutor] do I need f.close()

2008-06-12 Thread Marilyn Davis
On Thu, June 12, 2008 4:32 pm, Alan Gauld wrote: > "dave selby" <[EMAIL PROTECTED]> wrote > > >> The whole topic came up because I just finished reading 'learning >> python' 3rd edition OReilly as a refresher where there are multiple >> instances of suggesting that you do the exact opposite eg ...

Re: [Tutor] static methods and class methods

2008-06-12 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote> I am still unsure of the difference of static and class methods. You are not alone, it is confusing! A class method receives the class it was called on as the first argument. This can be useful with subclasses. A staticmethod doesn't get a a class

Re: [Tutor] wanting to learn

2008-06-12 Thread Alan Gauld
"Michael yaV" <[EMAIL PROTECTED]> wrote person. I have taught myself HTML and flash by reading manuals and a lot of trial and error over the last 11 years. I have always wanted to learn a language like php, asp, .net but I never took the time to learn them. I have recently found Python and

Re: [Tutor] New to Python

2008-06-12 Thread Alan Gauld
"Nkem Onyemachi" <[EMAIL PROTECTED]> wrote Hi all im new to programming so i decided 2 learn Python since it is easy to learn on ones own True. what really is the advantage can i know it is not "heavy" like java etc If by heavy you mean fully featured then one could argue that Python was

Re: [Tutor] Pinging a service

2008-06-12 Thread Alan Gauld
"Greg Lindstrom" <[EMAIL PROTECTED]> wrote A) Is this a sound strategy? Yes provided you keep the poll period sensible - say once per minute at the most Otherwise your pings become a significant overhead in themselves! B) Are there libraries for the "ping"ing aspect? If not, I can execute t

Re: [Tutor] static methods and class methods

2008-06-12 Thread Kent Johnson
On Thu, Jun 12, 2008 at 7:48 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "Kent Johnson" <[EMAIL PROTECTED]> wrote> > >> I am still unsure of the difference of static and class methods. No, that wasn't me, it was Christopher Spears. > > You are not alone, it is confusing! > >> A class method recei

Re: [Tutor] Dictionary within a dictionary

2008-06-12 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote I am presuming that each of these tables is one of my dictionaries?!?! What I don't understand is how to write this SQL statement in python code: SELECT id, category from Categories WHERE group_id = "1"; SQL is designed(and optimised) for doing complex data querie

Re: [Tutor] do I need f.close()

2008-06-12 Thread Alan Gauld
"Marilyn Davis" <[EMAIL PROTECTED]> wrote happy about letting the os close read only files, its really for writing that you want to be explicit. Alan, will the file close, even if it was opened for writing, when the program ends? I know it stays open if you're interactive, but otherwise

Re: [Tutor] static methods and class methods

2008-06-12 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Thu, Jun 12, 2008 at 7:48 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: "Kent Johnson" <[EMAIL PROTECTED]> wrote> I am still unsure of the difference of static and class methods. No, that wasn't me, it was Christopher

[Tutor] Unicode and fonts in Idle and Tkinter

2008-06-12 Thread Emmanuel Ruellan
Hi all, I'd like to display symbols from the international phonetic alphabet (IPA) in a Tkinter window, but I do not manage to have them displayed correctly, neither in a Tkinter window nor in Idle. For example, I'd like to print the following string and get the result below: *string* my_text =

Re: [Tutor] static methods and class methods

2008-06-12 Thread wesley chun
[static methods, class methods] > Both of these are rarely used; I don't think I have ever written a > class method in live code. I have used staticmethods as a convenient > way to put a function into a class namespace. this is someone out of the flow of the current thread now, but i forgot to me

Re: [Tutor] IDE

2008-06-12 Thread Wayne Oliver
Alan Gauld wrote: > > "Tom" <[EMAIL PROTECTED]> wrote >> Does anyone know which of the IDE's mentioned above have a similar >> feature. (I'm on Vista,sorry!) > > Most will do it one way or another. > > We mentioned filtering the buiffer in vim, emacs has a shell bvuffer > facility in which you can