Re: Deformed Form

2010-06-16 Thread Victor Subervi
Stephen Hansen suggests running this line before running or testing code: python -m compileall -f . Noted. Will do. Stephen also mentions, along with many others, that using CGI these days is silly (my word). Noted. I'll switch over, but not today. Got other things more pressing ;) DavidA

Re: Deformed Form

2010-06-16 Thread Dave Angel
Victor Subervi wrote: snip DavidA corrects me: Since you didn't name your modules (what you persist in calling scripts), I can only guess their names from the import statements: e.g.: from New_Passengers_Curr_Customers import New_Passengers_Curr_Customers I don't see any case

Re: Deformed Form

2010-06-16 Thread Victor Subervi
On Wed, Jun 16, 2010 at 2:09 PM, Dave Angel da...@ieee.org wrote: Fix any one of them, and I'd probably have kept quiet. Thanks for piping up ;) beno -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Deformed Form

2010-06-13 Thread Dave Angel
Victor Subervi wrote: snip DaveA suggested I not use the same name for my fn. as I do for my var; however, there is a difference in capitalization, and I'm trying to standardize this way. It makes it easy to recognize the difference (caps) and easy to recognize which vars go with which fns.

Re: Deformed Form

2010-06-13 Thread Stephen Hansen
On 6/12/10 12:50 PM, Dennis Lee Bieber wrote: On Sat, 12 Jun 2010 14:42:27 -0400, Victor Subervi victorsube...@gmail.com declaimed the following in gmane.comp.python.general: Interestingly, ls -al reveals *no* *.pyc files. Which would seem to indicate that you have no user modules

Re: Deformed Form

2010-06-13 Thread Ethan Furman
Stephen Hansen wrote: On 6/12/10 12:50 PM, Dennis Lee Bieber wrote: On Sat, 12 Jun 2010 14:42:27 -0400, Victor Subervi victorsube...@gmail.com declaimed the following in gmane.comp.python.general: Interestingly, ls -al reveals *no* *.pyc files. Which would seem to indicate that

Re: Deformed Form

2010-06-13 Thread Stephen Hansen
On 6/13/10 3:19 PM, Ethan Furman wrote: I thought python (well, cpython, at least) didn't use .pyc files for the main script? You're right, it doesn't. I forgot about that interaction with CGI*. -- Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ...

Re: Deformed Form

2010-06-12 Thread Victor Subervi
Stephen Hansen suggests I move the line: new_passengers_curr_customers = int(form.getfirst('new_passengers_curr_customers', 0)) from Script 3 (as he dubs it) to Script 2. Naturally (though he wouldn't have known) that's how I had it at first. After sending the post that finally cleared up the

Re: Deformed Form

2010-06-12 Thread Stephen Hansen
On 6/12/10 6:19 AM, Victor Subervi wrote: You will note those very first lines. This also addresses two other responders who believed perhaps I had called the variable from the form in question more than once and that it had been used up/consummed in the first call. Here, the first call is the

Re: Deformed Form

2010-06-12 Thread Victor Subervi
On Sat, Jun 12, 2010 at 11:46 AM, Stephen Hansen me+list/pyt...@ixokai.iowrote: On 6/12/10 6:19 AM, Victor Subervi wrote: You will note those very first lines. This also addresses two other responders who believed perhaps I had called the variable from the form in question more than once

Re: Deformed Form

2010-06-12 Thread Stephen Hansen
On 6/12/10 9:01 AM, Victor Subervi wrote: You're doing something that you're not telling us. There's something else going on. There's no way that form.getfirst() being in another file will in and of itself (notwithstanding possibilities of the second invocation actually not working at all due

Re: Deformed Form

2010-06-12 Thread Victor Subervi
On Sat, Jun 12, 2010 at 1:58 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote: The only suggestion I have is: try dumping all the .pyc's. Interestingly, ls -al reveals *no* *.pyc files. Yeah, that problem caught me once as well. TIA, beno --

Re: Deformed Form

2010-06-11 Thread Victor Subervi
On Thu, Jun 10, 2010 at 2:07 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote: On 6/10/10 10:48 AM, Victor Subervi wrote: Now, create_edit_passengers3() is called by the form/submit button in (you guessed it) create_edit_passengers2.py, the latter containing a var in it which *should* be

Re: Deformed Form

2010-06-11 Thread Emile van Sebille
On 6/11/2010 4:46 AM Victor Subervi said... Now you guys can make fun of me all you want, but until you actually READ and UNDERSTAND what I'm writing, I'm afraid I think your criticisms are ridiculous and make you look like fools. I think the point is exactly as you state -- until you actually

Re: Deformed Form

2010-06-11 Thread Stephen Hansen
On 6/11/10 4:46 AM, Victor Subervi wrote: You know, if this were the first time I'd worked with passing variables around through cgi, I'd think you may be right. But answer me this: if what you assume is correct, I do not assume. I know. With CGI, each web request is independent. This is

Re: Deformed Form

2010-06-11 Thread Victor Subervi
On Fri, Jun 11, 2010 at 12:24 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote: Sure, if you have some file that two separate scripts import, and in said file you generate some value-- as long as that value will be the same at all times, it'll appear that the two scripts are sharing some

Re: Deformed Form

2010-06-11 Thread Stephen Hansen
[reordering the message a bit] On 6/11/10 10:40 AM, Victor Subervi wrote: Now you guys can make fun of me all you want, but until you actually READ and UNDERSTAND what I'm writing, I'm afraid I think your criticisms are ridiculous and make you look like fools. On Fri, Jun 11, 2010 at 12:24

Re: Deformed Form

2010-06-11 Thread Dave Angel
Victor Subervi wrote: On Fri, Jun 11, 2010 at 12:24 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote: Sure, if you have some file that two separate scripts import, and in said file you generate some value-- as long as that value will be the same at all times, it'll appear that the two

Re: Deformed Form

2010-06-11 Thread Victor Subervi
Ok. Starting over. Here is the script that generates the variable new_passengers_curr_customers: #!/usr/bin/python import cgitb; cgitb.enable() import cgi import sys,os sys.path.append(os.getcwd()) import MySQLdb from login import login from Curr_Passengers_Table import Curr_Passengers_Table

Re: Deformed Form

2010-06-11 Thread Stephen Hansen
... This is the first time you've actually clearly expressed what you're doing. On 6/11/10 12:11 PM, Victor Subervi wrote: I dub thee Script1.py: *** RIGHT HERE! *** print input type='text' size='2' maxlength='2' name='new_passengers_curr_customers' /br /

Re: Deformed Form

2010-06-11 Thread MRAB
Victor Subervi wrote: Ok. Starting over. Here is the script that generates the variable new_passengers_curr_customers: [snip] Now, here's the form that *should* be able to access that variable: !/usr/bin/python import cgitb; cgitb.enable() import cgi import sys,os

Re: Deformed Form

2010-06-11 Thread Dave Angel
Victor Subervi wrote: Ok. Starting over. Here is the script that generates the variable new_passengers_curr_customers: snip Now, here's the form that *should* be able to access that variable: !/usr/bin/python import cgitb; cgitb.enable() import cgi import sys,os

Re: Deformed Form

2010-06-11 Thread Stephen Hansen
On 6/11/10 1:09 PM, Dave Angel wrote: Your question would have been much easier to understand if you had referred to form field rather than variable, since I assumed you really meant Python variable. Also, this script is a CGI script, written in Python. But the other files that you import

Re: Deformed Form

2010-06-11 Thread Bruno Desthuilliers
Stephen Hansen a écrit : On 6/10/10 8:35 AM, Bruno Desthuilliers wrote: Stephen Hansen (L/P) a écrit : On 6/10/10 7:14 AM, Victor Subervi wrote: (snip) +1 for absolutely worst framed question of the day :) IMHO you're wasting your time. Some guys never learn, and I guess we do have a

Deformed Form

2010-06-10 Thread Victor Subervi
Hi; I have a script that calls values from the form that calls it. This script imports another script: from New_Passenger import New_Passenger def create_edit_passengers3(): ... new_passengers_curr_customers = New_Passengers_Curr_Customers(customers, flights) if

Re: Deformed Form

2010-06-10 Thread Stephen Hansen (L/P)
On 6/10/10 7:14 AM, Victor Subervi wrote: Hi; I have a script that calls values from the form that calls it. This script imports another script: from New_Passenger import New_Passenger def create_edit_passengers3(): ... new_passengers_curr_customers =

Re: Deformed Form

2010-06-10 Thread Bruno Desthuilliers
Stephen Hansen (L/P) a écrit : On 6/10/10 7:14 AM, Victor Subervi wrote: (snip) +1 for absolutely worst framed question of the day :) IMHO you're wasting your time. Some guys never learn, and I guess we do have a world-class all-times champion here. --

Re: Deformed Form

2010-06-10 Thread Victor Subervi
On Thu, Jun 10, 2010 at 10:30 AM, Stephen Hansen (L/P) me+list/ pyt...@ixokai.io wrote: On 6/10/10 7:14 AM, Victor Subervi wrote: Hi; I have a script that calls values from the form that calls it. This script imports another script: from New_Passenger import New_Passenger def

Re: Deformed Form

2010-06-10 Thread Stephen Hansen
On 6/10/10 10:11 AM, Victor Subervi wrote: On Thu, Jun 10, 2010 at 10:30 AM, Stephen Hansen (L/P) me+list/ pyt...@ixokai.io wrote: But what does cannot be called mean? Cannot usually means an error happened -- in which case you shouldn't really even mention it unless you're gonna back it up

Re: Deformed Form

2010-06-10 Thread Victor Subervi
No, I think you've misunderstood because while I thought I was being clear I probably was not. So here is the complete code of create_edit_passengers3.py: #!/usr/bin/python import cgitb; cgitb.enable() import cgi import sys,os sys.path.append(os.getcwd()) import MySQLdb from login import login

Re: Deformed Form

2010-06-10 Thread Stephen Hansen
On 6/10/10 10:48 AM, Victor Subervi wrote: Now, create_edit_passengers3() is called by the form/submit button in (you guessed it) create_edit_passengers2.py, the latter containing a var in it which *should* be accessible to create_edit_passengers3.py, one would think. Wait, wait, wait. If a

Re: Deformed Form

2010-06-10 Thread Stephen Hansen
On 6/10/10 8:35 AM, Bruno Desthuilliers wrote: Stephen Hansen (L/P) a écrit : On 6/10/10 7:14 AM, Victor Subervi wrote: (snip) +1 for absolutely worst framed question of the day :) IMHO you're wasting your time. Some guys never learn, and I guess we do have a world-class all-times