Re: [Tutor] Google App Engine

2008-04-08 Thread Andreas Kostyrka
To summerize, it's Python 2.5.2, gutted to remove any chance of storing anything local. Plus you can define patterns that get mapped to Python CGI scripts. Included are also a number of APIs e.g. for data storage (that look at first glance visually similiar to Django models), an API to authenticate

[Tutor] Google App Engine

2008-04-08 Thread Dinesh B Vadhia
Hi! Google announced an app server that allows pure Python developed applications/services to use their infrastructure. This maybe of use to many on this list. Further details can be found at: http://appengine.google.com/ The SDK include a modified Python 2.5.2 and Django 0.96.1, WebOb 0.9 a

Re: [Tutor] Writing dictionaries to a file

2008-04-08 Thread Kent Johnson
W W wrote: > I was toying around with dictionaries/files/etc, and it's possible to > loop over the dictionary, writing each key/value pair to the file on > one line with a comma between them > And if you knew certain values might be ints, you could use > > try: mydict[int(row[0])] = row[1] This

Re: [Tutor] Creating Sudoku

2008-04-08 Thread Kent Johnson
Luke Paireepinart wrote: > >> That's not quite right. It is the open brace/bracket/parenthesis that >> tells Python to continue the line; the comma is not part of it. [snip] > Thanks for the correction, Kent. You're welcome; here is a reference: http://docs.python.org/ref/implicit-joining.html

Re: [Tutor] Writing dictionaries to a file

2008-04-08 Thread W W
On Mon, Apr 7, 2008 at 2:50 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > Jerrold Prothero wrote: > > > > I've been trying to understand how writing a dictionary to a file & reading > > it back should work. > > > > It's been suggested that if I had a clue, I'd use pickle, but since I > > star

Re: [Tutor] capturing exceptions from an exec statement

2008-04-08 Thread Garry Willgoose
Andreas, Alan, Oops ... I'm embarassed to admit the problem seems to have gone away. I don't know maybe in my testing I fed it some valid python. But anyway I made sure to feed it something that was invalid it now works fine. Its been a long day Sorry to bother you. Alan thanks for the

Re: [Tutor] capturing exceptions from an exec statement

2008-04-08 Thread Alan Gauld
"Andreas Kostyrka" <[EMAIL PROTECTED]> wrote >>> try: >... exec("raise ValueError") >... except: >... print "raised some exception" >... import sys >... print sys.exc_info() >... >raised some exception >(, instance at >0xb7d6738c>, ) > >Something like this? I think the Gary means

[Tutor] capturing exceptions from an exec statement

2008-04-08 Thread Garry Willgoose
I'm writing a (very simple) command line window for use within my Tkinter GUI menu driven program (Aside: I want to provide a Matlab like command line capability within an otherwise menu driven program ... but where the script language is Python). The guts of executing the command are (wher

Re: [Tutor] capturing exceptions from an exec statement

2008-04-08 Thread Andreas Kostyrka
Python 2.4.5 (#2, Mar 12 2008, 00:15:51) [GCC 4.2.3 (Debian 4.2.3-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> try: ... exec("raise ValueError") ... except: ... print "raised some exception" ... import sys ... print sys.exc_info() ... ra

Re: [Tutor] Creating Sudoku

2008-04-08 Thread Luke Paireepinart
> That's not quite right. It is the open brace/bracket/parenthesis that > tells Python to continue the line; the comma is not part of it. [snip] Thanks for the correction, Kent. -Luke ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailm