Re: [Tutor] I'm stumped.

2005-07-27 Thread Nathan Pinno
It works. The program will be found on my webpage at it's new address http://falcon3166.tripod.com in the Downloads page. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Alan G" <[EMAIL PROTECTED]>; Sent: Wednesday, July 27, 2005 6:33 PM Subject: Re: [Tutor] I'm stumpe

Re: [Tutor] OT: we won't eat VB programmers for lunch [Was: How doI make Python draw?]

2005-07-27 Thread Nathan Pinno
Now that's worth the mention of VB. Glad I have Python, or many of my ideas would stay in my head...hehehe - Original Message - From: "luke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Tutor" Sent: Wednesday, July 27, 2005 6:28 PM Subject: Re: [Tutor] OT: we won't eat VB programmers fo

Re: [Tutor] I'm stumped.

2005-07-27 Thread Nathan Pinno
Thanks. Now it basically works. Now I just have to improve it. - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Wednesday, July 27, 2005 6:06 PM Subject: Re: [Tutor] I'm stumped. > Try the split method: > '1,2,3,4'.split(',') >

Re: [Tutor] OT: we won't eat VB programmers for lunch [Was: How do I make Python draw?]

2005-07-27 Thread luke
hehe. <3 malbolge. Yeah, I actually learned basic as my first language... I don't mind it. I just don't like it all that much. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How do I go about this? [was Re: Who uses input()? [was Re: question on "input"]]

2005-07-27 Thread Nathan Pinno
Here's part of what I'm looking for (got it from a Python program): a b a 2 a 5 a 6 1 b 1 2 1 5 1 6 3 b 3 2 3 5 3 6 4 b 4 2 4 5 4 6 I want to see also !=, ==, and, & nor combos also. 0 != 2 for an example. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMA

Re: [Tutor] Why does this NameError appear?

2005-07-27 Thread Alan G
> Subject: [Tutor] Why does this NameError appear? > lista = [x0, x1, x2, x3] > listb = [a0, a1, a2, a3] So what are x0, x1 etc? You haven't told Python, its never heard of them at this point, so... > lista = [x0, x1, x2, x3] > NameError: name 'x0' is not defined It tells you so. You need

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Alan G
> Don't ever resort to Visual Basic. > If you think something would be easier in VB then ask us > and we will tell you how to do it in Python. > VB is not a good language to learn because it > is the complete opposite of every other programming language. Not really true anymore. The original VB ha

Re: [Tutor] I'm stumped.

2005-07-27 Thread Alan G
Try the split method: >>> '1,2,3,4'.split(',') ['1', '2', '3', '4'] >>> Alan G - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: Sent: Thursday, July 28, 2005 12:17 AM Subject: [Tutor] I'm stumped. How do I split the list members up in the following code? What am I f

Re: [Tutor] How do I go about this? [was Re: Who uses input()? [wasRe: question on "input"]]

2005-07-27 Thread Alan G
>I first posted my question in this post, but no one seemed to answer >me. Didn't notice because of the subject. A good reason to use meaningful subject lines! >> for example. If there is, show me it, please. I'm getting confused >> writing >> my MasterMind and don't want to screw up bad, e.g.

Re: [Tutor] OT: we won't eat VB programmers for lunch [Was: How do I make Python draw?]

2005-07-27 Thread jfouhy
On Wed, 27 Jul 2005, luke wrote: > VB is not a good language to learn because it is the complete opposite > of every other programming language. If you think that's true, google some time for "esoteric programming languages" :-) Some examples: http://www.muppetlabs.com/~breadbox/bf/ --- an 8

Re: [Tutor] How do I go about this? [was Re: Who uses input()? [was Re: question on "input"]]

2005-07-27 Thread Danny Yoo
> I first posted my question in this post, but no one seemed to answer me. > > > > It sure did, though I wish there was an easier way of coding it than > > int(raw_input())! Any ideas would gladly be appreciated. Hi Nathan, About the question about int(raw_input()) being a bit verbose, Brian d

Re: [Tutor] I'm stumped.

2005-07-27 Thread Danny Yoo
On Wed, 27 Jul 2005, Nathan Pinno wrote: > How do I split the list members up in the following code? Hi Nathan, Try using a string's split() method. For example: ## >>> "hello world this is a test".split() ['hello', 'world', 'this', 'is', 'a', 'test'] >>> "hello world this is a test".spl

[Tutor] OT: we won't eat VB programmers for lunch [Was: How do I make Python draw?]

2005-07-27 Thread Danny Yoo
On Wed, 27 Jul 2005, luke wrote: > > Thanks. Will ask if I have any more questions. Maybe I won't have to > > go to Visual Basic to write my games. Maybe Python will do the trick. > > Oh my god. > Don't ever compare Python to Basic on a python mailing list. > > You'll get eaten alive ;-) [text

[Tutor] I'm stumped.

2005-07-27 Thread Nathan Pinno
How do I split the list members up in the following code? What am I forgetting?   lista = []listb = []lista = raw_input("Enter lista, separated by commas: ")listb = raw_input("Enter listb, separated by commas: ")print listaprint listbfor item in lista:   for other in listb:  print item,o

Re: [Tutor] Problem with pgbd & datetime

2005-07-27 Thread Don Parris
On 7/27/05, Gabriel Farrell <[EMAIL PROTECTED]> wrote: > Are you using PyGreSQL? import pgdb works fine for me with PyGreSQL. > I'm on Debian but I assume there's a package for it for SUSE. > > gsf > > pg/pgdb are both part of the PyGreSQL distribution. You can choose whichever you want to us

Re: [Tutor] Python and Excel

2005-07-27 Thread Kent Johnson
Xabier Gonzalez wrote: > Hello! > > Honestly, I´m new in Python. I wanted to know about the possibility of > importing .txt text files from Excel and manage the contents (creating > graphics...) using Python. What kind of text files? If they are comma-separated-value files, you can read them

Re: [Tutor] How do I go about this? [was Re: Who uses input()? [was Re: question on "input"]]

2005-07-27 Thread Nathan Pinno
I first posted my question in this post, but no one seemed to answer me. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: ; "Terry Reedy" <[EMAIL PROTECTED]> Sent: Monday, July 18, 2005 7:36 AM Subject: Re: [Tutor] Who uses input()? [was

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Nathan Pinno
Pygame looks solid. I'm sold on it. Maybe I'll be able to code my Guess the Number Sequence Game with it using Python. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, July 27, 2005 3:04 PM Subject: Re: [Tutor] How do

Re: [Tutor] Select rows and columns in excel

2005-07-27 Thread jfouhy
Quoting David Holland <[EMAIL PROTECTED]>: > Dear Tutors, > > I know how to open files in python, however what I want to do is select > some information from an excel spreadsheet and save it as a .dat file. > The bit, I am stuck on is :- > How can I select all rows with a row number greater th

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Nathan Pinno
Luke, Thanks for the reminder. Though I might try Java, but having problems with errors left, right and center. G2G, Nathan - Original Message - From: "luke" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, July 27, 2005

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Adam Bark
Hey luke what kind of game is it? Can I have a look when at your source as well? Cheers. AdamOn 7/27/05, luke <[EMAIL PROTECTED]> wrote: > Thanks. Will ask if I have any more questions. Maybe I won't have to go to> Visual Basic to write my games. Maybe Python will do the trick.Oh my god.Don't ever

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread luke
> Thanks. Will ask if I have any more questions. Maybe I won't have to go to > Visual Basic to write my games. Maybe Python will do the trick. Oh my god. Don't ever compare Python to Basic on a python mailing list. You'll get eaten alive ;-) Seriously though, If you take the time to learn PyGame,

[Tutor] matplotlib (pylab) backends

2005-07-27 Thread Pujo Aji
Hello I write a program which launch pylab from windows GUI (using wxpython). I found some problem here. If I use the default backends program in matplotlibrc which is TkAgg I have this result: 1. I click button the plot is showed 2. I close the plot 3. I click the button to show the plot the se

[Tutor] Why does this NameError appear?

2005-07-27 Thread Nathan Pinno
Here is the code: lista = [x0, x1, x2, x3]listb = [a0, a1, a2, a3]print listaprint listbprint match (lista, listb)   And here is the error: Traceback (most recent call last):  File "D:\Python22\matches.py", line 1, in ?    lista = [x0, x1, x2, x3]NameError: name 'x0' is not defined Thanks in

Re: [Tutor] How do I go about this?

2005-07-27 Thread Danny Yoo
On Wed, 27 Jul 2005, Nathan Pinno wrote: > How do I go about the following: I want to write a program that will > print two lists one after another, then show all the available > possibilities for matches e.g a0 and x0. > lista = [x0, x1, x2, x3] > listb = [a0, a1, a2, a3] Hi Nathan, It sound

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Nathan Pinno
Thanks. Will ask if I have any more questions. Maybe I won't have to go to Visual Basic to write my games. Maybe Python will do the trick. Thanks again. Nathan Pinno - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, Ju

Re: [Tutor] How do I go about this?

2005-07-27 Thread Nathan Pinno
Luis and all,   I want to more than matching, I am trying to find all the available combos, e.g a1 == x1 or a1 == x2 or a1 != x1.   HTH, Nathan Pinno    I also noticed you forgot the a[1] == b[1]. (grin) :)   - Original Message - From: Luis N To: tutor@python.org Sent: Wedn

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Danny Yoo
On Wed, 27 Jul 2005, Nathan Pinno wrote: > How do I make Python draw a shape? e.g. a triangle Is there a specific > module that I have to call, or what is the command(s)? Hi Nathan, If you'd like to start doing graphical stuff, you might want to look at the Tkinter module. http://www.pyth

Re: [Tutor] How do I go about this?

2005-07-27 Thread Luis N
On 7/27/05, Luis N <[EMAIL PROTECTED]> wrote: On 7/27/05, Nathan Pinno <[EMAIL PROTECTED] > wrote: Hi all,   How do I go about the following: I want to write a program that will print two lists one after another, then show all the available possibilities for matches e.g a0 and x0.   Here

Re: [Tutor] How do I go about this?

2005-07-27 Thread Luis N
On 7/27/05, Nathan Pinno <[EMAIL PROTECTED]> wrote: Hi all,   How do I go about the following: I want to write a program that will print two lists one after another, then show all the available possibilities for matches e.g a0 and x0.   Here is what I have so far:   lista = [x0, x1, x2, x3

Re: [Tutor] Python and Excel

2005-07-27 Thread Danny Yoo
On Wed, 27 Jul 2005, Xabier Gonzalez wrote: > Honestly, I�m new in Python. I wanted to know about the possibility of > importing .txt text files from Excel and manage the contents (creating > graphics...) using Python. I�ve read about the win32com module and I > would like to find a good example

Re: [Tutor] Select rows and columns in excel

2005-07-27 Thread Danny Yoo
On Wed, 27 Jul 2005, David Holland wrote: > I know how to open files in python, however what I want to do is select > some information from an excel spreadsheet and save it as a .dat file. Hi David, Excel spreadsheets are a bit more difficult to work with. They're not plain text files, but ha

[Tutor] How do I go about this?

2005-07-27 Thread Nathan Pinno
Hi all,   How do I go about the following: I want to write a program that will print two lists one after another, then show all the available possibilities for matches e.g a0 and x0.   Here is what I have so far:   lista = [x0, x1, x2, x3]listb = [a0, a1, a2, a3]print listaprint listb Thanks

[Tutor] How do I make Python draw?

2005-07-27 Thread Nathan Pinno
How do I make Python draw a shape? e.g. a triangle Is there a specific module that I have to call, or what is the command(s)?   Thanks, Nathan Pinno   P.S. Knowing this will help me make my shape_calc program better. ___ Tutor maillist - Tutor@pyth

Re: [Tutor] anything to do???

2005-07-27 Thread Gabriel Farrell
I assume you have checked out http://wiki.python.org/moin/VolunteerOpportunities . I've improved a lot by just reading this list and following along with the successes and failures (always temporary, I hope) of others. gsf On Wed, Jul 27, 2005 at 10:20:43PM +0500, Mustafa wrote: > i hav just fi

Re: [Tutor] Problem with pgbd & datetime

2005-07-27 Thread Gabriel Farrell
Are you using PyGreSQL? import pgdb works fine for me with PyGreSQL. I'm on Debian but I assume there's a package for it for SUSE. gsf On Wed, Jul 27, 2005 at 10:13:22AM -0400, Don Parris wrote: > O.k., I'm running SUSE Linux 9.2, Python 2.3.4, > > I have changed my DB back-end from MySQL t

[Tutor] anything to do???

2005-07-27 Thread Mustafa
i hav just finished learning pythob from "A byte of python"(an online book) so i wanted to apply my new skills. to learn and to have some fun. is there any place which lists jobs to be done...you know minor jobs and requests thats nobody has found time to do. i would point out that i am not looki

[Tutor] Python and Excel

2005-07-27 Thread Xabier Gonzalez
Hello! Honestly, I´m new in Python. I wanted to know about the possibility of importing .txt text files from Excel and manage the contents (creating graphics...) using Python. I´ve read about the win32com module and I would like to find a good example just to take the right way. Thank you! _

[Tutor] Python and Excel

2005-07-27 Thread Xabier Gonzalez
Hello! Honestly, I´m new in Python. I wanted to know about the possibility of importing .txt text files from Excel and manage the contents (creating graphics...) using Python. I´ve read about the win32com module and I would like to find a good example just to take the right way. Thank you! _

[Tutor] Select rows and columns in excel

2005-07-27 Thread David Holland
Dear Tutors,   I know how to open files in python, however what I want to do is select some information from an excel spreadsheet and save it as a .dat file.  The bit, I am stuck on is :-  How can I select all rows with a row number greater than x for a certain column ?   Thanks in advance   Davi

[Tutor] Problem with pgbd & datetime

2005-07-27 Thread Don Parris
O.k., I'm running SUSE Linux 9.2, Python 2.3.4, I have changed my DB back-end from MySQL to Postgres for the larger feature set. However, in attempting to load the pgdb module for use in my script, I got this message (same when I try it at the command-line): >>> pgdb.connect('localhost:chaddb_a