Re: [Tutor] CGI problem

2005-01-10 Thread Patric Michael
Hi David... You need to explicitly name your form element to "inputkey" to make your current code work correctly. ( Based on what you have shown below.) Or, to make the code correct, change "inputkey" to "language". Remember that the name in each form element becomes the key in the key/value

Re: [Tutor] How to run a script file

2005-01-04 Thread Patric Michael
m assuming your python is in /usr/bin. And that is a hash mark > > followed by an exclamation point. This is called "hash bang" in > > uningo. > > > > John Purser > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

Re: [Tutor] How to run a script file

2005-01-04 Thread Patric Michael
Hi Bernard... The most basic form is to type "python" followed by the script you want to run. If your script is not in the system path, you'll either need to cd to the directory, or give a full pathname: (the pythonpath doesn't come into play until the interperter is running. python /usr/loca

Re: [Tutor] A not-so-basic question...

2005-01-03 Thread Patric Michael
abstracting, right? > > Whenever you are tempted to copy and paste code, look for a way to > abstract the code into a function or class so the copying is not > needed. > > Whenever you are tempted to copy and paste data, look for a way to > centralize the data so all clients

Re: [Tutor] A not-so-basic question...

2005-01-03 Thread Patric Michael
Hi Alan... > Thats a great question, and I hope we get a few responses. Me too! Thank you for taking the time to reply. Your response is far more complex than my original example, but its very illustrative. Not so much in what to do, but how to think about doing it, and that was my goal.

Re: [Tutor] dumping .pck files

2005-01-02 Thread Patric Michael
> I want to explore some mailman config files, e.g. > config.pck. Some quick searches informed me that these > contain pickled configuration info. > > My first naive attempt to dump what was in them failed: > > >>> import pickle > >>> pickle.load(open("config.pck")) > traceback > ImportError

[Tutor] A not-so-basic question...

2005-01-02 Thread Patric Michael
Hi folks... I was thinking about this the other day while prepping to write up another CGI thing. It occurred to me to wonder how other folks prepare an app, script, whatever. So the question is, and I am not looking for a "right answer" here. (I doubt ther eis one, to be honest.) How do you

Re: [Tutor] doctest

2005-01-01 Thread Patric Michael
> Also, anything I can do... Presently, since I'm running windows xp, I > would have to hunt for the command prompt and type in the command Click Start, click Run, type CMD, press Enter. Voila! :) Patric > > '"C:\python24\python.exe" "C:\documents and > settings\jacob\desktop\working python

Re: [Tutor] cgi.FieldStorage and dictionary.get(' ')

2004-12-31 Thread Patric Michael
Forwarded to the list... > On Thu, 30 Dec 2004 22:58:14 -0800, Patric Michael <[EMAIL PROTECTED]> > wrote: > > First off, make sure that you have the "Content-Type: > text/html\n\n" > line print before anything else whenever you send > output to the web

Re: [Tutor] O.T.

2004-12-30 Thread Patric Michael
Hi Jacob... > But who are you all, what are you're ages, what do you do, marriage > status, etc? You obviously don't have to answer, I'm just curious who > I'm boldly sending emails to. I figure since I bit the bullet and actually posted a reply, I best answer this as well in the faint hope of w

Re: [Tutor] cgi.FieldStorage and dictionary.get(' ')

2004-12-30 Thread Patric Michael
> Hi, > > I've passed this through the interperter line-by-line, yet still can't > get it to work right. > > The first time the cgi driver script initiates it runs the login > function which renders a zpt. Upon submission of their vitals, the I'm not sure what a zpt is, but it sounds like the

Re: [Tutor] CGI Video collection application File I/O troubles

2004-12-09 Thread Patric Michael
<> > Sorry for the delay but I was busy with soemthing else. > The script prints the values of the variables fine in the > browser so there must be a problem with the file writing part. > When I run the script from my bash shell it creates the videodb > database file, but when I run it from the b

Just Because (Was: Re: [Tutor] Global presets ?)

2004-12-05 Thread Patric Michael
<> Folks... I originally discovered this list while searching Google for the mathematical expression to convert yards to inches. Seems someone already did it in a python function. (I think maybe it was Kent?) At any rate, I subscribed to the list out of curiosity, partly because I like pyth