fatal you
got, the OverflowError
sys.excepthook(*sys.exc_info())
# ...snip...
job.finalize(sresult) # UnboundLocalError here from missing sresult
You can submit these as a bug report to the author if you want - feel
free to copy-paste or link to this post :-)
- zeph
--
http
can get server environment data from the os.environ[5]
dictionary;
Good luck and keep on learning! :-)
- zeph
References:
1: http://docs.python.org/library/traceback.html
2: http://docs.python.org/library/cgitb.html
3: http://gnosis.cx/publish/programming/feature_5min_python.html
4: http
On Dec 11, 8:58 am, MRAB pyt...@mrabarnett.plus.com wrote:
output = ['htmlhead']
output.append('titleMy Page/title')
output.append('/headbody')
output.append('h1Powers of two/h1\nol')
for n in range(1, 11):
output.append('li%s/li' % (2 ** n))
output.append('/ol/body/html')
print
The wxPython wiki actually has a page on dealing with long running
tasks called from event handlers called (surprise surprise):
http://wiki.wxpython.org/LongRunningTasks
Hint: the second to last example on that page has the clearest example
- using a worker thread object to do your DoEfficiency()
Python and Perl often have different design idioms - learning to write
*well* in a language involves understanding those idioms, and being
able to translate between languages involves understanding the source
language well enough to understand the intent of the program's code
(even if its poorly
Even better (well, shorter!):
options = {a : do_a, b,do_b, c, do_c}
options.get(option, do_default)()
You can also make it something callable like so, which is a little
more compact if you need to reuse it a lot:
def do_a(x): print a:, x
...
def do_b(x): print b:, x
...
def do_c(x):
It sort of sounds like you want a templating system:
http://wiki.python.org/moin/Templating
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 6, 8:46 pm, Benjamin Kaplan benjamin.kap...@case.edu wrote:
On Sun, Dec 6, 2009 at 10:29 PM, W. eWatson wolftra...@invalid.com wrote:
See Subject.
def StackImages(self):
self.Upload(P)
self.after_id = self.master.after(1,self.GetFrameOne)
--
Here's what I came up with, though it only asks once question then
quits depending on the answer or lack thereof. And while, yes, you
can't interrupt a raw_input call from a timer, providing for a blank
line (user hitting enter) is a way around it:
import threading import Timer
from random
I highly recommend reading the Cocoa documentation, which has volumes
on all sorts of things like this. Here's a link that talks about
views in that context, and should give you more ideas about well-
designed GUI layouts: http://bit.ly/6b8PYh
--
also seems to put drive mount points in /cygdrive/ so you will
have for example /cygdrive/c/foo:/cygdrive/c/bar instead of C:
\foo;C:\bar.
For python *outside* of Cygwin, on Windows, I assume os.path.pathsep
is ';'.
- zeph
--
http://mail.python.org/mailman/listinfo/python-list
(), thread2 will
block until thread1 calls lock.release(), then thread2 will get a
chance to run its critical code section, then call lock.release().
- zeph
--
http://mail.python.org/mailman/listinfo/python-list
I'm pretty well of a mind to pick up Python. I like it because it seems
to have a fair degree of functionality and is accessible to someone
without a PhD in computer sciences. This is my second day of
investigation, and I'm astounded by the huge ecosystem that surrounds
it. I have a number of
ajaksu wrote:
Hoping this helps more than confuses,
Thanks, these were the sort of answers I was looking for. I've
programmed in Basic, AppleScript, Pascal and Usertalk (Userland
Frontier), I've got a sense for development, it's just been a very, very
long time ago.
I do intend to start
ajaksu wrote:
Zeph wrote:
And I'd research a bit about decompiling those executables,
might be easier (or harder, in my case) than you thought :)
Are you saying that generally python code is insecure? It hadn't
occurred to me, but I want to play in a fairly competitive field, and
I'd hate
Zeph wrote:
3) Can someone recommend a good framework that will enable me to keep
things well sorted out, and easy to maintain as my apps grow? (I'm
considering MVC, but have no idea how to apply it until I've gone
beyond Hello World).
Yu-Xi Lim wrote:
Framework for what kind of apps
16 matches
Mail list logo