Deformed Form

Stephen Hansen me+list/python at ixokai.io
Fri Jun 11 14:18:21 EDT 2010


[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 PM, Stephen Hansen
> <me+list/python at ixokai.io>wrote:
>>
>> And this comment ends my attempt at assisting you, for multiple reasons
>> (from the utter absurdity of you insisting we understand you when you
>> take insultingly little care to actually express your problems clearly,
>> to your arrogant and repeated refusal to take advice that is given, to
>> your abject rudeness here, and so on).
>>
>
> That comment was not addressed to you as you didn't bother to quote the
> other part just after it, where I stated I appreciate your help and
> understand how difficult it is to not misunderstand each other. Sorry you
> misunderstood. I am not being arrogant or rude.

"I think your criticisms are ridiculous and make you look like fools" is
what I object to. I didn't quote the rest, because it doesn't matter --
once you say something like that, you become an jerk. Once you're an
jerk, you don't get to backtrack and say, 'oh, except you'. I don't
really accept the appreciation from someone being an jerk. If you're an
jerk at all, you can't really expect any sort of help at all :P

That said, I'll answer once more:

>> 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, however. The two scripts can not communicate.
>>
> 
> I'm glad you have lots of experience and I respect that. However, I did not
> say that "two separate scripts import said file." To repeat:
> 
> 1) variable value generated is
> create_edit_passengers2.py<http://example.com/create_edit_passengers2.py>
> 2) create_edit_passengers2.py<http://example.com/create_edit_passengers2.py>calls
> create_edit_passengers3.py
> <http://example.com/create_edit_passengers2.py>via a <form...> and
> passes the value of the var thereunto.
> 3) theoretically! Yet for some reason I can't call it in
> create_edit_passengers3.py
> <http://example.com/create_edit_passengers2.py>but *can* call it in a
> script that is imported by
> create_edit_passengers3.py <http://example.com/create_edit_passengers2.py>
> 
> I think I'm being clear here, am I not? With all your knowledge and
> understanding, I still fail to understand how it is you don't understand and
> cannot answer my question.

You're not even *approaching* being clear.

"Variable value generated is" means WHAT?

What does "generated" mean?

If you have a line,

   x = MyFunction()

At the top level of some script, then everytime that script is called,
MyFunction is called, and it assigns its value to x. If MyFunction is
deterministic and doesn't rely on any sort of state, it'll be the same
value every time.

[For the rest of the analysis, I refuse to continue typing these
absurdly long names. create_edit_passengers2.py is bar1.py,
create_edit_passengers3.py is bar2.py]

Okay, at 1, you say.. you have Value generated. When you go
http://foo/bar1.py, then it will load, "generate" your value, dump the
resulting output, and then close.

And its done. That value ceases to exist.

Okay, so. Step 2. The output that bar1 returned contained a form. This
form, I assume (but you did not state), contains embedded in it the
value of "var". Yes? No? Either way

Now we're at step 2. In step 2, you have some form, and its calling back
to http://foo/bar2.py via a <form>, passing the value of "var" in it. I
can't quite make out what all is going on here, so its all a guess, as
you have this slightly crazy bar2.py<http://foo/bar1.py> thing going on
that I can't figure out. But, I'll just handwave that, and guess.

So, bar2 receives our "var".

Then you say:

> 3) theoretically! Yet for some reason I can't call it in
> create_edit_passengers3.py
> <http://example.com/create_edit_passengers2.py>but *can* call it in a
> script that is imported by
> create_edit_passengers3.py <http://example.com/create_edit_passengers2.py>

I can't even vaguely guess at what you're trying to express there, which
is why I didn't address this originally -- its utterly meaningless
gibberish to me.

"Yet for some reason I can't call it in bar2.py<http://foo/bar1.py>"

"but *can* call it in a script that is imported by
bar2.py<http://foo/bar1.py"

First of all, what is "it", and what are you "calling" -- using names
like 'calling' is so very damaging to clarity when you're talking about
CGI scripts interacting. As they don't call each-other. They return
output. That output may contain a link (or form, or whatever) to another
CGI script, or the same, or a different. That's not /calling/.

Either way: when last step 2 left us, bar2.py had received the "var" via
a <form>, and we aren't sure what happened then.

It returned some output. What output? Or.. its doing something. Or, its
the thing that's trying to do something. But can't. Because its..
"calling". What? How? What's that even mean?

-- 

   Stephen Hansen
   ... me+list/python (AT) ixokai (DOT) io

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100611/d09534c2/attachment.sig>


More information about the Python-list mailing list