Re: getfirst and re

2010-01-08 Thread Carsten Haese
Victor Subervi wrote: Code snippet: [...] Error: [...] What do? After eliminating the pieces of your post that have been copied or quoted from elsewhere, I am left with a total of five words of your own to ask this question, which seems to be approximately the same amount of effort you

Re: getfirst and re

2010-01-08 Thread Carsten Haese
Victor Subervi wrote: First I get scolded for not including enough information. Now I get scolded for including too much. Seems I can't win. I *am* putting effort into understanding this. I'm sorry I'm not as sharp as you are in these matters. I didn't scold you for including too much

Re: Another Screwy Problem

2010-01-08 Thread Carsten Haese
Victor Subervi wrote: Hi; I have this line of code: sql = 'select Name, Price from %sPackages where ID=%s;' % (store, pid) which prints to this: select Name, Price from productsPackages where ID=1; which when I enter it into the MySQL interpreter gives me this: mysql select Name, Price

Re: getfirst and re

2010-01-06 Thread Carsten Haese
Victor Subervi wrote: I have an automatically generated HTML form from which I need to extract data to the script which this form calls (to which the information is sent). Ideally, the script that receives the submitted fields should know how the form was generated, so it knows what fields to

Re: please help shrink this each_with_index() implementation

2010-01-05 Thread Carsten Haese
? Couldn't you just use the built-in enumerate() to replace the whole thing? -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: chown'ing by script

2010-01-05 Thread Carsten Haese
Victor Subervi wrote: Hi; I have a script that is called via the web. This script writes another script that is also called by the web, which in turn needs to have execution privileges. The problem is that the programmatically created file is owned by apache.apache and thus doesn't have

Re: MySQL Error

2010-01-01 Thread Carsten Haese
, the output you expected, and the output it produced instead. Blind guess: You're using except ProgrammingError when you should be using except MySQLdb.ProgrammingError. If this guess is incorrect, see above. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman

Re: Cookies

2009-12-30 Thread Carsten Haese
Victor Subervi wrote: On Tue, Dec 29, 2009 at 3:43 PM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: You apparently haven't followed the tutorials carefully enough. You do know that a cookie is a piece of information that's stored in your browser

Re: Cookies

2009-12-30 Thread Carsten Haese
. You're printing it where it doesn't belong, in the middle of your HTML output. You need to reorganize your print statements such that the Set-Cookie header is printed in the header of your script's output. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman

Re: Cookies

2009-12-30 Thread Carsten Haese
is printed as part of the page headers. I'll give you one last hint: The page header is where you're printing the Content-type line. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Cookies

2009-12-30 Thread Carsten Haese
, whereas you appear to be trying to earn a living writing programs. If you can't learn to think like a programmer, sooner or later you'll have to face the grim reality that you'll never earn a living as a programmer. Maybe you should try to earn a living as a poet instead. -- Carsten Haese http

Re: Cookies

2009-12-30 Thread Carsten Haese
. [Emphasis mine.] You even copy-and-pasted a snippet containing that very sentence into an earlier post on this thread, so how you can now claim that the tutorial didn't mention this is quite beyond me. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
think you need but don't, and lots of Python anti-idioms, all of which conspire to make it impossible for anybody who is not paid to do this work to put in the effort that's necessary to trace your logic and identify the bug. Please help us help you. -- Carsten Haese http://informixdb.sourceforge.net

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
an HTML table, but I can't tell how it differs from what you're expecting, because you didn't describe what you're expecting. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
Victor Subervi wrote: On Tue, Dec 29, 2009 at 12:54 PM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: Victor Subervi wrote: Since it is difficult to send the inputs but easy to provide the outputs, and as opposed to posting the printout, let me

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
it does. The desire to find out how something works is, in my opinion, an essential skill in a programmer, and your maybe I'll figure it out later attitude displays a disturbing lack of this skill. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
Victor Subervi wrote: On Tue, Dec 29, 2009 at 3:58 PM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: Victor Subervi wrote: You know I did this before, substituting f for field, and it honestly wouldn't print but threw a 500 error. Now it works. I

Re: Cookies

2009-12-29 Thread Carsten Haese
that a cookie is a piece of information that's stored in your browser, don't you? So tell me, which of the above lines of code do you suppose is responsible for informing your browser of the cookie's contents? -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo

Re: Missing Images

2009-12-26 Thread Carsten Haese
with the cgi module. I'll do the latter: http://webpython.codepoint.net/cgi_file_upload -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing Images

2009-12-26 Thread Carsten Haese
, by myself and others, not to embed values directly into the query string. Use parameter binding to transmit the values to the database. I'm sure you'll find an old post of mine somewhere in the archives of this list in which I showed you how to do that. -- Carsten Haese http

Re: getlist question

2009-12-25 Thread Carsten Haese
do you have a problem with? Checking whether no value is fetched or log the fact? -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: getlist question

2009-12-25 Thread Carsten Haese
Victor Subervi wrote: On Fri, Dec 25, 2009 at 11:35 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: Victor Subervi wrote: Well I've done that. What happens is the storeColNames registers the Availability field naturally enough; however, as I

Re: More On the Strange Problem

2009-12-23 Thread Carsten Haese
persistent inability or unwillingness to honor this request. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Manipulating MySQL Sets

2009-12-13 Thread Carsten Haese
Victor Subervi wrote: On Sat, Dec 12, 2009 at 6:35 PM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: The traceback helpfully shows us that colValue is a 1-tuple whose zeroth entry, colValue[0], is an actual bona-fide Python Set object. Such objects

Re: Manipulating MySQL Sets

2009-12-13 Thread Carsten Haese
' in aSet True 'Banana' in aSet False HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQL set and enum, calling values

2009-12-12 Thread Carsten Haese
Set type.) The above-mentioned article has a section called Why you shouldn't use SET. You should read it. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting Default Values Out of MySQL

2009-12-12 Thread Carsten Haese
other command to retrieve the result set. What command are you using, and what are the results? How do I retrieve them? In my version of MySQL, he default value is in the fifth column of the result set. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman

Re: Getting Default Values Out of MySQL

2009-12-12 Thread Carsten Haese
Victor Subervi wrote: On Sat, Dec 12, 2009 at 10:54 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: Victor Subervi wrote: Hi; I'm using MySQLdb. If I do a cursor.execute('describe myTable;') it gives me all sorts of data

Re: Manipulating MySQL Sets

2009-12-12 Thread Carsten Haese
a string to me. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Manipulating MySQL Sets

2009-12-12 Thread Carsten Haese
is, because you're once again not providing enough information. We'd need to see where colValue is coming from to find out what colValue[0] is. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Manipulating MySQL Sets

2009-12-12 Thread Carsten Haese
Python Set object. Such objects aren't indexable, because sets are unordered. That still doesn't tell us where colValue is coming from, though, so why it is a Python Set object when you expected it to be a string remains an unsolved mystery. -- Carsten Haese http://informixdb.sourceforge.net

Re: MySQL set and enum, calling values

2009-12-11 Thread Carsten Haese
an instance of string. How do I know if it's a set? That's a fantastic question. Python thinks it's a string. What makes you think it's a set? -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: My Darned Image Again

2009-12-08 Thread Carsten Haese
(colNamesPics, pics): query = (update %s set %s = %%s where SKU=%%s % (store, column_name) ) parameters = (MySQLdb.Binary(pic), sku) cursor.execute(query, parameters) There, that's much less cluttered. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http

Re: My Darned Image Again

2009-12-08 Thread Carsten Haese
is not in danger. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: unsupported operand type(s) for %: 'NoneType' and 'tuple'

2009-12-07 Thread Carsten Haese
:])) theTree = expand(cursor.fetchall()) which is the magical code supplied by the lister that does all the heavy lifting but that I don't understand :-} Suggestions? Start by understanding the code you're using. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org

Re: unsupported operand type(s) for %: 'NoneType' and 'tuple'

2009-12-07 Thread Carsten Haese
what the code does. This won't tell you *why* it does it, but it's your code, and you put it there to serve a particular purpose. If you don't understand its purpose, you shouldn't be using it at all. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo

Re: Nested Dicts

2009-12-05 Thread Carsten Haese
ValueError: too many values to unpack As far as what's causing this error, I already explained that two weeks ago: http://groups.google.com/group/comp.lang.python/msg/b9e02a9a9b550ad3 The fact that you're still struggling with this error is deeply disturbing to me. -- Carsten Haese http

Re: Nested Dicts

2009-12-05 Thread Carsten Haese
Victor Subervi wrote: Of course I knew about those indentation errors That may be so, but you cleverly disguised this fact by saying the exact opposite. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Insane Problem

2009-12-03 Thread Carsten Haese
works. In order to help you diagnose the problem, we need to see the *exact* code you're running, we need to see the *exact* inputs going into it, and we need to see the *exact* output coming out of it. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo

Re: Insane Problem

2009-12-03 Thread Carsten Haese
that the above output helps you arrive at the correct conclusion. No, it doesn't, because you've only provided one third of what I asked for. I also asked for the code and the inputs that go into it. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Insane Problem

2009-12-03 Thread Carsten Haese
to construct the FieldStorage object once and refer to that one object in every pass of the loop. As you can see, and as I suspected, it's not a bug in the cgi module. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Moving from Python 2 to Python 3: A 4 page cheat sheet

2009-12-02 Thread Carsten Haese
' % (8,456) ' 456' -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Exec Statement Question

2009-11-30 Thread Carsten Haese
the entire options module as its own separate namespace. 2) I use getattr on that separate namespace to look up the desired function object from the options module. I assign the local name tablefunc to the resulting function object. 3) I call that function using the local name tablefunc. HTH, -- Carsten

Re: Can't Encode Pic

2009-11-27 Thread Carsten Haese
, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: why do I get this behavior from a while loop?

2009-11-27 Thread Carsten Haese
/tutorial/floatingpoint.html . Then, change print t to print repr(t) to see what's going on. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't Encode Pic

2009-11-27 Thread Carsten Haese
Victor Subervi wrote: On Fri, Nov 27, 2009 at 12:13 PM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: Victor Subervi wrote: The difficulty I am having is that for some reason it's not inserting. The form inserts the first image

Re: Can't Encode Pic

2009-11-26 Thread Carsten Haese
to be filled into the query by the database engine. This query needs only one parameter, so I'm making a 1-tuple containing the picture contents, wrapped inside a MySQLdb.Binary object to tell the database that this is a binary object. Hope this helps, -- Carsten Haese http

Re: Can't Encode Pic

2009-11-26 Thread Carsten Haese
spend trying to figure out what that error message is telling you? What thought processes, if any, have you followed? -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw strings as input from File?

2009-11-24 Thread Carsten Haese
, and show us the exact contents of the file you're processing. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Switching Databases

2009-11-23 Thread Carsten Haese
the last 3 lines with this: cursor.execute('use %s;' % db) but it didn't like that, either. Do not paraphrase error messages. Copy and paste the actual error message and traceback. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: print function in python3.1

2009-11-23 Thread Carsten Haese
Anjanesh Lekshminarayanan wrote: As of now, there is no mysql adaptor for Python3. Hence cant use escape_string() Maybe it would help if you explained what you are actually trying to accomplish. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo

Re: Switching Databases

2009-11-23 Thread Carsten Haese
Victor Subervi wrote: On Mon, Nov 23, 2009 at 9:17 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: You thought you did, but did you? The code snippet above doesn't show any code that closes a database connection. Would you be so kind as to tell me

Re: Switching Databases

2009-11-23 Thread Carsten Haese
Victor Subervi wrote: On Mon, Nov 23, 2009 at 10:08 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: As I said, the best way we can help you is if you copy the actual error message so that we may diagnose the actual problem and suggest a solution

Re: Don't Understand Error

2009-11-23 Thread Carsten Haese
, and Apache is complaining about that. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Too Many Values To Unpack

2009-11-21 Thread Carsten Haese
on this thread. (http://mail.python.org/pipermail/python-list/2009-November/1227008.html) -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Will Not Send Email!!

2009-11-20 Thread Carsten Haese
us a copy-and-paste of your command line window contents that result from executing python testMail.py and then executing python -c import email; print email immediately thereafter. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Too Many Values To Unpack

2009-11-20 Thread Carsten Haese
keys is not used anywhere in your function. So, this would indicate that changing the offending line to for nm in levelDict should fix this particular error. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Will Not Send Email!!

2009-11-20 Thread Carsten Haese
Victor Subervi wrote: On Fri, Nov 20, 2009 at 11:14 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: Please show us a copy-and-paste of your command line window contents that result from executing python testMail.py and then executing python -c

Re: Too Many Values To Unpack

2009-11-20 Thread Carsten Haese
. Look at the function definition. It'll tell you what the function does. Could someone please explain what this code does? Maybe you should ask the person that wrote the code. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Will Not Send Email!!

2009-11-19 Thread Carsten Haese
directory or anywhere else on Python's path outside of the standard library? If so, it's hiding the real email module from your script and you'll need to get rid of your email.py by renaming or moving it. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman

Re: Code for finding the 1000th prime

2009-11-17 Thread Carsten Haese
. Once it compares equal, you can print the result and you're done. Just do a brute-force search: for i in range(1): if i==7919: # Found it! print i ;-) -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling Python functions from Excel

2009-11-14 Thread Carsten Haese
to Implementing a COM Server.) -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't Write File

2009-11-11 Thread Carsten Haese
in the picture number and product ID, you should have just one static getpic script that takes parameters from the URL that tell it which image number and product ID to use. This will fix your problem indirectly because then your script won't have to write out any files at all. -- Carsten Haese http

Re: Can't Write File

2009-11-11 Thread Carsten Haese
Victor Subervi wrote: I will do that after I fix the problem Doing that is the fix. No, this doesn't fix the problem! How do you know? You obviously haven't tried it, since you say you have yet to do it. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman

Re: Calling a method with a variable name

2009-11-04 Thread Carsten Haese
that it is callable. You just need to call it. Like this: method(). HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Calendar Problem

2009-11-04 Thread Carsten Haese
Victor Subervi wrote: That's what I initially had. My server, that I am in the process of leaving, rejected that syntax. What version of Python does that server use? The calendar.Calendar class first appeared in Python 2.5. I suspect your server is using an older version. -- Carsten Haese http

Re: regexp help

2009-11-04 Thread Carsten Haese
Nadav Chernin wrote: Thanks, but my question is how to write the regex. See http://www.amk.ca/python/howto/regex/ . -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Sqlite3. Substitution of names in query.

2009-11-03 Thread Carsten Haese
Lawrence D'Oliveiro wrote: In message mailman.2504.1257216390.2807.python-l...@python.org, Carsten Haese wrote: With all due respect, but if your experience is exclusive to MySQL/MySQLdb, your experience means very little for database programming practices in general. I wonder about

Re: Sqlite3. Substitution of names in query.

2009-11-01 Thread Carsten Haese
a BYTE column on an Informix database. The only way to pass a BYTE value to an Informix database is by parameter binding. Since parameter binding is in general much more than string substitution, it is indeed necessary to mix the two. -- Carsten Haese http://informixdb.sourceforge.net -- http

Re: Sqlite3. Substitution of names in query.

2009-11-01 Thread Carsten Haese
can't insert and retrieve binary data values? You CAN insert and retrieve binary data values. You just have to use the right tool for the job, and that is parameter binding. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Sqlite3. Substitution of names in query.

2009-10-31 Thread Carsten Haese
. As long as you understand what you're doing, there should be no confusion. (And if you don't understand what you're doing, you shouldn't be doing it!) -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Sqlite3. Substitution of names in query.

2009-10-31 Thread Carsten Haese
Lawrence D'Oliveiro wrote: In message mailman.2376.1257005738.2807.python-l...@python.org, Carsten Haese wrote: Lawrence D'Oliveiro wrote: In message mailman.2357.1256964121.2807.python-l...@python.org, Dennis Lee Bieber wrote: This way regular string interpolation operations

Re: Capturing a var from JavaScript

2009-10-19 Thread Carsten Haese
Victor Subervi wrote: It doesn't work. What I want is to capture winX and winY and use them in python. How? Since you're still not heeding the advice from this article, please allow me to refer you to it again: http://catb.org/~esr/faqs/smart-questions.html -- Carsten Haese http

Re: The Never-Ending Saga Continues

2009-10-19 Thread Carsten Haese
Victor Subervi wrote: Can you give me an example of this? That depends. How much of your client's money are you offering us for doing your work? -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: More More Fun w/ Pics MySQL

2009-10-18 Thread Carsten Haese
, then your server isn't executing the code that you think it's executing. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: More More Fun w/ Pics MySQL

2009-10-17 Thread Carsten Haese
Victor Subervi wrote: in line... On Sat, Oct 17, 2009 at 11:33 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: Why would turning a comment into a statement NOT make a difference?!? You misunderstood. Leaving in the __commented__ line __commented__

Re: More More Fun w/ Pics MySQL

2009-10-16 Thread Carsten Haese
Victor Subervi wrote: [snip...] print 'Content-type: image/jpeg' print 'Content-Encoding: base64' print print pic().encode('base64') print '/body/html' [snip...] Why are you printing /body/html at the end of a page that is supposed to be a base64-encoded JPEG file? -- Carsten Haese http

Re: More More Fun w/ Pics MySQL

2009-10-16 Thread Carsten Haese
to get helpful answers. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: More More Fun w/ Pics MySQL

2009-10-16 Thread Carsten Haese
know your server is executing, and not just some code that somewhat resembles the code that the server might be executing), a detailed description of the result you're expecting, and a detailed description of the result you're getting instead. -- Carsten Haese http://informixdb.sourceforge.net

Re: executing a function/method from a variable

2009-10-16 Thread Carsten Haese
): self.todo = print+arg def printa(self): print 'a' def printb(self): print 'b' def doit(self): func = getattr(self, self.todo) func() o = dummy(sys.argv[1]) o.doit() HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo

Re: Error en el bus from python

2009-10-12 Thread Carsten Haese
impossible to tell what exactly the problem is if you don't show us your code. hanoi.pl is part of your code, but you haven't posted it. Please post it. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem Displaying Pics

2009-10-07 Thread Carsten Haese
Victor Subervi wrote: [...] print '''Content-Type: image/jpeg Content-Encoding: base64 ''' [...] You have a spurious blank line between those header lines. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: store encrypted data in sqlite ?

2009-10-02 Thread Carsten Haese
in the parameters. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Carsten Haese
the code that does this transformation. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing dictionary keys

2009-10-01 Thread Carsten Haese
point = points[0] py print point.x, point.y 1 2 HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing Variables WITHOUT Dynamic URLs

2009-09-17 Thread Carsten Haese
between server and client. You should look into the concept called session variables. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Confessions of a Python fanboy

2009-07-30 Thread Carsten Haese
r wrote: Of course in python you would do... vector.reverse -- in-place vector.reversed -- in-place You do know that only one of those works in-place, right? The above example works pretty good, but this doesn't always sound good. Take for example this... point3d.offset -- return a

Re: problem with import path on a python C extension

2009-02-09 Thread Carsten Haese
, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with import path on a python C extension

2009-02-09 Thread Carsten Haese
can simply import diomodule and refer to the module by the name diomodule. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Reuse of DB-API 2.0 cursors for multiple queries?

2009-01-28 Thread Carsten Haese
). You might want to check on a list dedicated to adodbapi whether there are module-specific quirks or caveats to watch out for. Or wait for somebody with adodbapi-specific knowledge to chime in. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python

Re: How to get first/last day of the previous month?

2009-01-20 Thread Carsten Haese
this helps, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get first/last day of the previous month?

2009-01-20 Thread Carsten Haese
Marco Mariani wrote: dateutil can do this and much, much more. Using dateutil for this is like using a sledgehammer to kill a fly. The task at hand can (and IMHO should) be solved with the standard datetime module. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org

Re: how to remove 'FFFD' character

2009-01-09 Thread Carsten Haese
through. You must be doing something wrong, then: py u'Hello,\ufffd World'.encode('ascii', 'ignore') 'Hello, World' HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: can the sequence of entries in a dictionary be depended on?

2008-11-23 Thread Carsten Haese
: If items(), keys(), values(), iteritems(), iterkeys(), and itervalues() are called with no intervening modifications to the dictionary, the lists will directly correspond. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: can the sequence of entries in a dictionary be depended on?

2008-11-23 Thread Carsten Haese
of iteration will not change? Neither of those convey the above guarantee. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Unyeilding a permutation generator

2008-11-02 Thread Carsten Haese
-inefficient) replacement is to accumulate a list and return the list. Initialize a result variable to an empty list, and instead of yielding elements, append them to the result variable. Then return the result variable at the end of the function. HTH, -- Carsten Haese http

Re: Finding the instance reference of an object

2008-10-16 Thread Carsten Haese
Astley Le Jasper wrote: Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob' Why do you need to find that? You know that its name is 'bob'. -- Carsten Haese http

Re: Pure Python interface to MySQL?

2008-10-06 Thread Carsten Haese
Roy Smith wrote: Does there exist a pure Python version of a MySQL module? A quick google search turns up this: http://github.com/mopemope/pure-python-mysql/tree/master/pymysql I've never used it, though, so I have no idea whether it works or how well it works. HTH, -- Carsten Haese http

Re: rpath

2008-09-30 Thread Carsten Haese
, and why? -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread Carsten Haese
/io/control.dat relative to its current working directory. That will only work if the current working directory of the program is C:\myprogramfolder\run. Is it? -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   >