ined
since the
# execution was unwound because, presumable, the first 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
On Dec 11, 8:58 am, MRAB wrote:
> output = ['']
> output.append('My Page')
> output.append('')
> output.append('Powers of two\n')
> for n in range(1, 11):
> output.append('%s' % (2 ** n))
>
> output.append('')
> print ''.join(output)
Agreed (I might join on '\n' though), I was just trying to
e[4] and FormStorage
object, and you 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/fea
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 wr
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()
>
> 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
..
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 wrote:
> On Sun, Dec 6, 2009 at 10:29 PM, W. eWatson wrote:
> > See Subject.
> > def StackImages(self):
> > self.Upload("P")
> > self.after_id = self.master.after(1,self.GetFrameOne)
> > --
> >http://mail.python.org/mailman/listinfo/python-l
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
--
http://mail.python.org/mailman/listinfo/python-lis
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 import
ls lock.acquire(), 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
ts from the Windows command shell's PATH env
variable, and you'll see the path sep is indeed ':'.
Cygwin 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
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").
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 fiel
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 smal
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 q
16 matches
Mail list logo