Re: Deformed Form

2010-06-16 Thread Victor Subervi
On Wed, Jun 16, 2010 at 2:09 PM, Dave Angel 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: Deformed Form

2010-06-16 Thread Dave Angel
Victor Subervi wrote: 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 differe

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 corr

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-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 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 Stephen Hansen
On 6/12/10 12:50 PM, Dennis Lee Bieber wrote: > On Sat, 12 Jun 2010 14:42:27 -0400, Victor Subervi > 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 that are

Re: Re: Deformed Form

2010-06-13 Thread Dave Angel
Victor Subervi wrote: 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. Th

Re: Deformed Form

2010-06-12 Thread Victor Subervi
On Sat, Jun 12, 2010 at 1:58 PM, Stephen Hansen wrote: > 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 -- http://mail.python.org/mailman/listinfo/python-list

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 a

Re: Deformed Form

2010-06-12 Thread Victor Subervi
On Sat, Jun 12, 2010 at 11:46 AM, Stephen Hansen wrote: > 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 b

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 i

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-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 impo

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": 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 sys.path.append(os.getcwd(

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 sys.path.append(os.get

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 " name='new_passengers_curr_customers' />" > > *** SEE IT? *

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 Dave Angel
Victor Subervi wrote: On Fri, Jun 11, 2010 at 12:24 PM, Stephen Hansen wrote: 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 state

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 a

Re: Deformed Form

2010-06-11 Thread Victor Subervi
On Fri, Jun 11, 2010 at 12:24 PM, Stephen Hansen wrote: > 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 > state. They are not, howe

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 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 Victor Subervi
On Thu, Jun 10, 2010 at 2:07 PM, Stephen Hansen wrote: > 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 cre

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 world

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-t

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 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 im

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) 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

Re: Deformed Form

2010-06-10 Thread Victor Subervi
On Thu, Jun 10, 2010 at 10:30 AM, Stephen Hansen (L/P) 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 create_edit_pa

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. -- http://mail.python.org/mailman/li

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 = New_Passengers_Curr_Cus

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 new_passengers_curr_customer