Re: [Tutor] Why this error ?

2007-02-01 Thread Alan Wardroper
Other than outdenting the whole thing, are you using a 'non-standard' character set? Are you sure that '(' isn't an alternative encoding variant that python isn't recognising as a parenthesis? I've see nthat sometimes with Japanese or unicode encoding. Just a thought... (Just to check, I tried

[Tutor] Python 2.5 and PHP 5.2.0

2007-02-01 Thread OkaMthembo
Hi Guys, I need some wisdom from you. Is it possible to have PHP pages posting to python scripts on the server side and returning values back to the calling PHP files? Like, if my enterval.php form's action=think.py, would the two scripts be able to talk to each other? Thanks and Best Regards,

Re: [Tutor] Python 2.5 and PHP 5.2.0

2007-02-01 Thread Luke Paireepinart
OkaMthembo wrote: Hi Guys, I need some wisdom from you. Is it possible to have PHP pages posting to python scripts on the server side and returning values back to the calling PHP files? Like, if my enterval.php form's action=think.py, would the two scripts be able to talk to each other? A

Re: [Tutor] Python 2.5 and PHP 5.2.0

2007-02-01 Thread Christopher Arndt
Luke Paireepinart schrieb: I can think of a roundabout way to do what you want: PHP file returns a form to the client. when this form is submitted to the py file, all of the data your py script needs is sent in the query string or whatever. the py file does whatever it does, and then

Re: [Tutor] Python 2.5 and PHP 5.2.0

2007-02-01 Thread OkaMthembo
Thank you s much gentlemen, you have come to my aid very promptly indeed :-) I have to say, this is why i love Open Source; For the People, By the People! Thankee Shortash On 2/1/07, Christopher Arndt [EMAIL PROTECTED] wrote: Luke Paireepinart schrieb: I can think of a roundabout way

[Tutor] The best way to implement a config file ???

2007-02-01 Thread Magnus Wirström
Hi everyone I'm learning to program python with wxpython gui. I have a application i made with several modules and i want to implement a configfile that applies to all those modules. Is there an easy way to do this ? Can anyone point me in the right direction ? Thanks Magnus

Re: [Tutor] The best way to implement a config file ???

2007-02-01 Thread Andreas Kostyrka
* Magnus Wirström [EMAIL PROTECTED] [070201 14:38]: Hi everyone I'm learning to program python with wxpython gui. I have a application i made with several modules and i want to implement a configfile that applies to all those modules. Is there an easy way to do this ? Can anyone point

[Tutor] VOT - Similar list for Ruby?

2007-02-01 Thread Steve Nelson
Hello all, I may be about to switch jobs to an environment in which the main utility language is Ruby. I've found this group to be brilliant in the last few years, and wondered if anyone on the list is also a Ruby user, and could recommend a similarly helpful, patient and informative list?

Re: [Tutor] VOT - Similar list for Ruby?

2007-02-01 Thread Mike Hansen
-Original Message- Hello all, I may be about to switch jobs to an environment in which the main utility language is Ruby. I've found this group to be brilliant in the last few years, and wondered if anyone on the list is also a Ruby user, and could recommend a similarly

[Tutor] Printing txt files in landscape from python

2007-02-01 Thread János Juhász
Hi All, do you have any idea, how I can send a txt file to the default printer in landscape view with python on windows. I wanted to set up just the char size and the orientation of the printout. thinking about os.system('notepad.exe /pt %%%s' % filename) Yours sincerely,

Re: [Tutor] Get variable values

2007-02-01 Thread Danny Yoo
On Thu, 1 Feb 2007, Mário Gamito wrote: I'm new to Python, so forgive me the lame question. I have this code (following my signature) and i'm trying to get the value of content and insert it into a MySQL database. Hi Mario, Wait, wait, before we continue here: did you finally get things

Re: [Tutor] Printing txt files in landscape from python

2007-02-01 Thread Christopher Arndt
János Juhász schrieb: do you have any idea, how I can send a txt file to the default printer in landscape view with python on windows. I assume that by txt file, you mean a file containing ASCII text? I wanted to set up just the char size and the orientation of the printout. Printers

Re: [Tutor] Get variable values

2007-02-01 Thread Mário Gamito
Hi Danny, Wait, wait, before we continue here: did you finally get things working from your last question? Yes, i got things working. That was just a test for python-MySQldb. Now, i'm trying to get info from a python file, but i'm unable to get the variable values to insert in MySQL. For

Re: [Tutor] Printing txt files in landscape from python

2007-02-01 Thread Tim Golden
Hi All, do you have any idea, how I can send a txt file to the default printer in landscape view with python on windows. I wanted to set up just the char size and the orientation of the printout. thinking about os.system('notepad.exe /pt %%%s' % filename) Doesn't completely answer

Re: [Tutor] Get variable values

2007-02-01 Thread Danny Yoo
Wait, wait, before we continue here: did you finally get things working from your last question? Yes, i got things working. That was just a test for python-MySQldb. Hi Mario, Ok, good. Next time, make it more clear to the group that things worked out fine, to close the thread.

Re: [Tutor] Get variable values

2007-02-01 Thread Mário Gamito
Hi, Danny Yoo wrote: Ok, good. Next time, make it more clear to the group that things worked out fine, to close the thread. Remember, we can't read your mind: make it explicit. Otherwise, people will continue to try to help you with something that you don't have problems with anymore.

Re: [Tutor] Get variable values

2007-02-01 Thread Kent Johnson
Mário Gamito wrote: Hi, I'm new to Python, so forgive me the lame question. I have this code (following my signature) and i'm trying to get the value of content and insert it into a MySQL database. I've been reading the docs in www.python.org, but i can't find a solution. Can

Re: [Tutor] The best way to implement a config file ???

2007-02-01 Thread Magnus Wirström
Andreas Kostyrka skrev: * Magnus Wirström [EMAIL PROTECTED] [070201 14:38]: Hi everyone I'm learning to program python with wxpython gui. I have a application i made with several modules and i want to implement a configfile that applies to all those modules. Is there an easy way to do

Re: [Tutor] Get variable values

2007-02-01 Thread Mário Gamito
Hi, I keep looking at this and your other posts and I just don't understand what you are trying to do. What do you mean by content? Is this code part of some class? It looks like it is from a class that subclasses dict. Anyway more context both of code and of what you are trying to do

Re: [Tutor] The best way to implement a config file ???

2007-02-01 Thread Kent Johnson
Magnus Wirström wrote: / think i want win.ini style, I'm designing a configuration module that is going to write this file. I have not heard of shlex so i can really not judge if it suits my needs. I do like the kind of config file that can be editable with a editor if nessary. Anyone have

Re: [Tutor] Get variable values

2007-02-01 Thread Danny Yoo
For now, i'd just like to pull out the variables values, and i don't know how. For those who may be interested it's about file __init.py__ from planetplanet code. Hi Mario, Have you read either of the following yet? http://www.amk.ca/python/writing/DB-API.html

Re: [Tutor] Get variable values

2007-02-01 Thread Danny Yoo
Please tell me if you've read those and yet don't understand what they are saying. Alternatively, if you've read them but still feel that they are relevant to you, say that, and we'll try to elaborate why they should be applicable. Errr.. substitute relevant with irrelevant. Sorry.

Re: [Tutor] Get variable values

2007-02-01 Thread Mário Gamito
Hi, http://www.amk.ca/python/writing/DB-API.html http://mail.python.org/pipermail/tutor/2003-April/022010.html Yes, i've read the two docs. But my problem is more related with Python. If you read my previous post with the links to the code, my doubt is how to get the values for

[Tutor] Python 2.5 Quick Reference

2007-02-01 Thread Dick Moores
http://rgruet.free.fr/PQR25/PQR2.5.html Is this reliable? (Looks good to me, but...) Thanks, Dick Moores ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Get variable values

2007-02-01 Thread Alan Gauld
I have this code (following my signature) and i'm trying to get the value of content and insert it into a MySQL database. From where are you trying to get the value of content? Its not clear from your code. -- def get_date(self, key): ... The fact that this has a self param,eter suggets

Re: [Tutor] Get variable values [Introduction to Planet RSS news aggregator]

2007-02-01 Thread Danny Yoo
Yes, i've read the two docs. But my problem is more related with Python. If you read my previous post with the links to the code, my doubt is how to get the values for url, content, name, etc. Hi Mario, After taking a much closer look at the code you mentioned here:

[Tutor] adding columns of numbers

2007-02-01 Thread Christopher Spears
I've been reading an old copy of Programming Python and started to work on one of its challenges. I have a text file called table.txt: 1 5 10 2 1.0 2 10 20 4 2.0 3 3 15 30 8 3 2 1 4 20 40 16

Re: [Tutor] adding columns of numbers

2007-02-01 Thread John Fouhy
On 02/02/07, Christopher Spears [EMAIL PROTECTED] wrote: I've been reading an old copy of Programming Python and started to work on one of its challenges. I have a text file called table.txt: 1 5 10 2 1.0 2 10 20 4 2.0 3 3 15 30

Re: [Tutor] Printing txt files in landscape from python

2007-02-01 Thread Terry Carroll
On Thu, 1 Feb 2007, [ISO-8859-1] J?nos Juh?sz wrote: do you have any idea, how I can send a txt file to the default printer in landscape view with python on windows. I wanted to set up just the char size and the orientation of the printout. I've gotten a crush on wxPython, now that it's

Re: [Tutor] adding columns of numbers

2007-02-01 Thread Kent Johnson
Christopher Spears wrote: I've been reading an old copy of Programming Python and started to work on one of its challenges. I have a text file called table.txt: 1 5 10 2 1.0 2 10 20 4 2.0 3 3 15 30 8 3 2 1 4

Re: [Tutor] Get variable values [Introduction to Planet RSS news aggregator] (fwd)

2007-02-01 Thread Danny Yoo
-- Forwarded message -- Date: Fri, 02 Feb 2007 00:52:49 + From: [ISO-8859-1] Mário Gamito [EMAIL PROTECTED] To: Danny Yoo [EMAIL PROTECTED] Subject: Re: [Tutor] Get variable values [Introduction to Planet RSS news aggregator] Hi Danny, Thank you for your insightful

Re: [Tutor] The best way to implement a config file ???

2007-02-01 Thread Johan Geldenhuys
I've used two options in the past. The one is as Kent suggested, by using a module that is imported by all others and share the values. This doesn't allow for users to change the values, without changing the code. The second is to make use of a other file format. I used xml with all the info in