[Tutor] First Try 1.1

2006-02-20 Thread John Connors
G'day, Thanks for the input on my lotto number selector program, very much appreciated and I learnt a lot. I've (hopefully) cleaned it up a little, and expanded it to write the numbers to a text file. I'm sure there must be a better way of doing it then the way I have. I understand that the

Re: [Tutor] simple list question

2006-02-20 Thread Ara Kooser
Thanks Kent for your help. Right now I am trying to get one room working with just a character and movement. Then on to creatures, multiple rooms and tracking. Ara On 2/20/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Ara Kooser wrote:>>> But really, what are you trying to do?>> Kent>>> I a

Re: [Tutor] simple list question

2006-02-20 Thread John Fouhy
On 21/02/06, John Fouhy <[EMAIL PROTECTED]> wrote: > Have you looked at QHack? Oops, I forgot the link: http://adom.de/misc/qhack.php3 -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] simple list question

2006-02-20 Thread John Fouhy
On 21/02/06, Ara Kooser <[EMAIL PROTECTED]> wrote: > I am trying to create rooms/tiles for a roguelike game in python. I have > some of the game coded out but I am having trouble with the map and > character movement. Have you looked at QHack? It's a set of C sources for a minimal roguelike, inten

Re: [Tutor] simple list question

2006-02-20 Thread Ara Kooser
But really, what are you trying to do?KentI am trying to create rooms/tiles for a roguelike game in python. I have some of the game coded out but I am having trouble with the map and character movement. Ara -- Fatti non foste per viver come bruti, ma per seguir virtute e canoscenza - Dante Aligh

Re: [Tutor] MySQLdb : I finally got it to work.

2006-02-20 Thread Danny Yoo
> 1. With my configuration, I need quotes around the values that are to be > placed into the database, otherwise an error is raised example: ( n= > blue --> Error 1054:n Unknown column 'blue' in 'field list' ) > n = raw_input("Please enter a Name: ") > c =raw_

Re: [Tutor] Generating small random integer

2006-02-20 Thread Danny Yoo
> I did try to read it from "cover to cover", but too quickly got into > places where I did not know what it talked about. Mind if we talk about some of those places? *grin* We might be able to help explain what the tutorial is trying to say, but you need to give us an opportunity. > So I am f

Re: [Tutor] simple list question

2006-02-20 Thread Kent Johnson
Ara Kooser wrote: > Hello all, > >First off thank you to all the folks that gave input on a smallpox > percolation model my students were working on last year. They won first > place in the computation division at the science fair and took home the > Intel Programming award. I can post or e

Re: [Tutor] question...

2006-02-20 Thread Danny Yoo
On Mon, 20 Feb 2006, Samantha Warbey wrote: > I have blocks of text (in notebook files currently) that I need to read > 3 and analyse 3 characters at a time. [This is because I'm studying > genes and codons are three characters in length]. How do I do this using > python? I've currently only bee

Re: [Tutor] C++ tutor

2006-02-20 Thread Danny Yoo
On Mon, 20 Feb 2006, Jason Wise wrote: > I am a grad student at Berkeley looking for a C++ tutor. Might you offer > any suggestions? Thank you, jason wise Hi Jason. I think you may want to ask on a C++ oriented forum rather than Python-tutor, as you'll probably get better help there. Because

[Tutor] question...

2006-02-20 Thread Samantha Warbey
I have blocks of text (in notebook files currently) that I need to read 3 and analyse 3 characters at a time. [This is because I'm studying genes and codons are three characters in length]. How do I do this using python? I've currently only been able to find ways of analysing text line by line,

[Tutor] C++ tutor

2006-02-20 Thread Jason Wise
I am a grad student at Berkeley looking for a C++ tutor. Might you offer any suggestions? Thank you, jason wise ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] simple list question

2006-02-20 Thread John Fouhy
On 21/02/06, Ara Kooser <[EMAIL PROTECTED]> wrote: > Why is that? I thought that adding , after the print command would allow > the format to stay the same. Is there a better way of doing this (I like > lists because I can edit them easily)? Thanks. A comma after a print statement basically repla

[Tutor] simple list question

2006-02-20 Thread Ara Kooser
Hello all,    First off thank you to all the folks that gave input on a smallpox percolation model my students were working on last year. They won first place in the computation division at the science fair and took home the Intel Programming award. I can post or e-mail the code if anyone wants it

Re: [Tutor] Debugging method

2006-02-20 Thread Alan Gauld
> I had looked the code over. I knew to look on that line, but was > totally > baffled because I could not distinguish the > comma from the period. You are using IDLE right? It sounds like you might need to change the font if the difference is not clear because that's a pretty important differ

Re: [Tutor] import of source code still not working

2006-02-20 Thread Alan Gauld
>>If you don't want to have to put the factor30 in front of all your >>function >> names you can do this: >> >> from factor30 import * But this is generally considered bad practice since the same function name can appear in many modules so the last module imported will hide all the others. The sm

Re: [Tutor] Printing the Carriage return character

2006-02-20 Thread Hans Dushanthakumar
Thanks Alan for clearing that up...I was trying to see why my "\r\n" does not print 2 empty lines when I stumbled across this 'gotcha'. -Original Message- From: Alan Gauld [mailto:[EMAIL PROTECTED] Sent: Monday, 20 February 2006 9:22 p.m. To: Hans Dushanthakumar; tutor@python.org Subject

[Tutor] Debugging method

2006-02-20 Thread Kermit Rose
    Kermit have you actually bothered going through any tutorials? You just seem to be asking every time you get an error, I know the list is here for people to ask questions but you really should try and work some things out for yourself. Traceback (most recent call last):  File "", line 1,

Re: [Tutor] import of source code still not working

2006-02-20 Thread Adam
On 20/02/06, Kermit Rose <[EMAIL PROTECTED]> wrote:     From: Jason Massey Date: 02/20/06 12:20:03 To: Kermit Rose Cc: tutor@python.org Subject: Re: [Tutor] import of source code still not working   If you don't want to have to put the factor30 in front of all your function names you can d

Re: [Tutor] import of source code still not working

2006-02-20 Thread Kermit Rose
    From: Jason Massey Date: 02/20/06 12:20:03 To: Kermit Rose Cc: tutor@python.org Subject: Re: [Tutor] import of source code still not working   If you don't want to have to put the factor30 in front of all your function names you can do this:from factor30 import *Which will put all of you

Re: [Tutor] pdf syntax

2006-02-20 Thread Hugo González Monteverde
Hi, Syntax for composing a PDF is ugly PostScript. However, there are a couple of ways to use Python libraries to avoid the details. You can draw a canvas in Tkinter and then print it, then use something linke ps2pdf to do the conversion. http://effbot.org/tkinterbook/canvas.htm You can use Re

Re: [Tutor] import of source code still not working

2006-02-20 Thread Jason Massey
The problem here is that you need to reference the factor30 namespace to get to your functions: Your calls to your functions would then look like: factor30.factor(109) & factor30.factor0(109) If you don't want to have to put the factor30 in front of all your function names you can do t

[Tutor] import of source code still not working

2006-02-20 Thread Kermit Rose
IDLE 1.1.2 >>> import factor30 >>> factor(109) Traceback (most recent call last): File "", line 1, in -toplevel- factor(109) NameError: name 'factor' is not defined >>> factor0(109) Traceback (most recent call last): File "", line 1, in -toplevel- factor0(109) Na

Re: [Tutor] Proxy

2006-02-20 Thread lumbricus
I like this one: "http://home.wtal.de/stampa/httpMonitor/"; It provides an interface to set up your own Filters. So you can easily block/modify requests/responses. HTH, J"o! -- Freedom, Freedom, Freedom, Oi! -- Zoidberg Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Sat

Re: [Tutor] First program -- would like comments and criticisms

2006-02-20 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Here is my first stab at putting together a working program. It is a > glossary that you can add words and definitions to, or look up words and > their definitions. There are a couple of problems here and there, but > it basically does what I set out for it to do. All

Re: [Tutor] G'day

2006-02-20 Thread Joal Heagney
John Connors wrote: > I'm now using an ebook I found called Dive Into Python. I much prefer using > a book so I can duck back a few pages to refresh my memory and reading on > the monitor is a real pain. It seems an excellent reference though so I'll > get around to printing it out sooner or l

Re: [Tutor] Printing the Carriage return character

2006-02-20 Thread Alan Gauld
>Not sure if this is a python thing or a Operating system peculiarity, An IDLE thing specifically - or maybe even a Tkinter thing... > Why does the line > print "FirstLine" + "\rSecondLine" > produce different output when run via IDLE and when run in the python > prompt (both under Windows X

[Tutor] Fw: File handling: open a file at specified byte?

2006-02-20 Thread Alan Gauld
Forwarding for list visibility - Original Message - From: "Brian Gustin" <[EMAIL PROTECTED]> To: "Alan Gauld" <[EMAIL PROTECTED]> Sent: Monday, February 20, 2006 2:23 AM Subject: Re: [Tutor] File handling: open a file at specified byte? > > > look at the file tell() and seek() methods.