It must be easier than I am making it.
sql = "UPDATE sa2.outfalls SET photo_content = %s WHERE
pppoint_id ='"+record[0].strip()+"';"
newsql = sql%pstuff
print newsql[:150]
cursor.execute(newsql)
__
the print newsql[:
That was it all right! Thanks, Kent! Ron___Ron Phillips wrote:
> I am trying to write a script that adds data to a table using
> MySQLdb.py. For some reason, "INSERT" seems to work temporarily. I
> run a command to insert a row, and then do a select query, and it's
> there. Aft
I am trying to write a script that adds data to a table using MySQLdb.py. For some reason, "INSERT" seems to work temporarily. I run a command to insert a row, and then do a select query, and it's there. After the program shuts down, though, it's gone. No rows are permanently created. SELECT wor
>>> Emily Fortuna < [EMAIL PROTECTED] > 6/8/2006 9:19 AM >>>
Hola everyone,
I'm working on creating a webpage in which a user can submit data into
fields to be held in a database (there are other details, but this is
the gist of the idea), and I need to use python. I am unfamiliar with
manipulat
I like Karrigell ...http://www.karrigell.com/ for being flexible, complete, lightweight, and easy to learn. I don't know how it scales, but that's not really a consideration for the applications you describe.
Ron>>> "Chad Crabtree" <[EMAIL PROTECTED]> 5/8/2006 6:29 PM >>>While everything that A
Regex aside, just for a moment the subject line gets my vote for "Most Succinct Description of Programmer Mindset", if there's a competition on.
Ron
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
You might also consider JSON (http://www.json.org), which is generally
lighter weight than XML, fairly human-readable, and useful in several
languages (most, anymore) . Python, Javascript, and ECMAScript use it
natively through Eval(), if you don't have security concerns; or through
a wrapper if se
>>> "John Corry" < [EMAIL PROTECTED] > 12/24/2005 12:28 PM >>>Hi + Season's Greetings!I have put together a program that queries and modifies a Gadfly database.I have captured my output. I now want to print it to paper.I have written the output to a text file. I have searched the tutor mailinglist
>>> Ismael Garrido <[EMAIL PROTECTED]> 11/14/2005 11:55 PM >>>
Kent Johnson wrote:
>Maybe we should start a thread of favorite addons. For me, Jason
Orendorff's path module is definitely #1 on the list, probably followed
by Fredrik Lundh's ElementTree.
> http://www.jorendorff.com/articles/python/p
Thanks to everyone who responded to my "Prevent Coder's Remorse"
posting;
the result of combining the ideas that you contributed is below.
It's a little long, but I'm delighted with it so far, and maybe someone
else can use it.
It's nice for representing a sparse table, where all the records sha
Ok, I have three diverse answers from three of the tutors that I respect
most.
Kent Johnson's approach: subclass dict and overloads the __getitem__ ,
__setitem__, and __delitem__ methods.
Alan G's idea:
". . .
Get the init method to update a global (or class based)
list of instances and writ
Kent Johnson wrote:
I'm curious about why you want to do this, it is kind of a
strange requirement.
Yeah, that was bothering me, too. I was a little unsure if I'd even
defined the problem properly; that's what I meant by: "Am I even asking
the right questions?"
I'll play around with the class
hat forces all members to have the same
keys?
Is there an object structure that will let updates to one instance
affect all instances?
Am I even asking the right questions?
I suspect there's an elegant solution, but it's beyond me right now. If
not, fine; I'll happily go on w
Well, I won't argue with anyone who chooses otherwise, but CherryPy http://www.cherrypy.org/ is easy to use, lightweight, quick, and pythonic. I write everything as plain old python, then webify it the very last thing.
It's also the basis of a new, promising framework called TurboGears http://
I am expecting users to cut-and-paste DMS data into an application like: +40 30 15 E40 15 34.56, -81 0 0, 81 57 34.27E, W 40° 13 27.343, 40° 13 27.343 S, 140° 13 27.343S, S40° 13 27.34454, 81:57:34.27E
I've been able to write a regex that seems to work in redemo.py, but it doesn
Mustafa Abbasi asked:
i want to create a simple page which has a formand takes in persons date of birth and give out exact age.how do i add python codeto an html page.i don't have any dreamweaver or frontpage.this is basically cuz some freinds advised me to create this isnce i am learning prog
Yes, I believe you are right -- I posted a reply to the list indicating that I suspect IIS is at fault; not Python. Or perhaps I should say "my installation of IIS"; I have no confidence whatsoever in my abilities to administer IIS properly.
Thanks for looking at the documentation -- I was stuc
Kent wrote:
CGI requires a running HTTP server in front of it. The server receives the HTTP request, sees that it is a CGI request, starts a new process with the environment set according to the CGI protocol, and runs the CGI handler. Do you understand this relationship? (I mean that kindly, yo
##Run a simple CGI server by opening a command line to the parent dir of cgi-bin and runningpython -c "import CGIHTTPServer; CGIHTTPServer.test()"
##
Oh, dear -- I responded before I read your post, Kent. It turns out it was option b), after all. But I had NO idea I would need to do anything
rs -- thanks again for responding!) was about xmlrpclib on the client side, not CGIXMLRPCRequestHandler on the server side, I can now conclude that it is terribly difficult, and slink off to publish using SOAP.
Ron
On 6/23/05, Ron Phillips <[EMAIL PROTECTED]> wrote:> > I believe I'
I believe I've tried every setting known to man, in every script in every little scrap of documentation available. XMLRPC requests using SimpleXMLRPCRequestHandler -- no problem. But try to run them as a CGI script, and I get system lock ups and that's all. No error codes; no response whatsoever.
Ron Phillips wrote:>> short version: I need a way to get max and min E and N out of >> [(E0,N0),(E1,N1)...(En,Nn)] without reordering the list>>> Kent Johnson [EMAIL PROTECTED]> 5/25/2005 10:19 AM >>>For Python < 2.4 you need another set of [ ] e.g. min([e
;t know if that what you want.good luckpujoOn 5/25/05, Ron Phillips <[EMAIL PROTECTED]> wrote:> > short version: I need a way to get max and min E and N out of> [(E0,N0),(E1,N1)...(En,Nn)] without reordering the list > > long version: > > I would like a list of geogra
short version: I need a way to get max and min E and N out of [(E0,N0),(E1,N1)...(En,Nn)] without reordering the list
long version:
I would like a list of geographic coordinates (Easting, Northing) to maintain a "bounding box" [(minEasting,minNorthing),(maxEasting,maxNorthing)] attribute.
Thank you, Andrei, that's just what I was hoping for -- I wondered about some of those issues, but was a little unsure how to approach a solution.
Ron
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
'shareable' python. Everything else I've done so far is either a quick-and-dirty for my own use, or a simple illustration for instructional purposes.
The script produces expected results, but if anyone is so inclined, I'd appreciate review/evaluation/critique of the 'python
And now for something only slightly different: education research shows
that people process "positives" far more quickly and accurately than
"negatives", so for readability I often code like:
if os.path.exists('filename')
#no-operation
else
#operation
YMMV, of course.
Ron
At 08:5
54 years old -- father of 3, grandfather of 4 (and counting.)
I started Pythoning because I work for a governmental agency that does
Civil Engineering. To support mapping, I needed a wrapper for ESRI products
(Python, AML, VBA), to support drafting, I needed a wrapper for AutoDesk
products
Can't get it running -- it keeps saying:
Traceback (most recent call last): File
"C:/source/RUR/RURmain.py", line 28, in ?
messenger.loadImages() # load them up here after initialising
Handlers File "C:\source\RUR\messenger.py", line 27, in
loadImages HIT_WALL_IMAGE =
wxImage('
This looks like a very nice effort -- I am trying to get it running, since
I am working with some other newbies to learn more Python.
I wish there were a link from http://rur-ple.sourceforge.net/index.html
to the download page! And I am not sure which of the downloaded files to run. I
thou
sCE. WindowsCE has a fairly
plain-vanilla Python build, so it's better if I stick to the core modules as far
as possible.
Ron Phillips
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor
I just happened across an answer yesterday. PIL writes PDF s.
http://www.pythonware.com/products/pil/
Ron
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor
-code, but I don't want to
reinvent the wheel if there are existing modules that do
almost (or even better, exactly) what I need.
I work on WinXp, Linux, and WindowsCE. WindowsCE has a fairly
plain-vanilla Python build, so it's better if I stick to the core modules as far
as possible.
33 matches
Mail list logo