On 22 Apr., 02:26, John Machin <[EMAIL PROTECTED]> wrote:
> On Apr 22, 6:59 am, Björn Keil <[EMAIL PROTECTED]> wrote:
>
> > Hello pythons,
>
> > I have little problem with understanding conversions in python. I've
> > written a little class - nothing much, just to try out Python a little
> > - cont
<[EMAIL PROTECTED]> wrote:
> I do not think I am understanding how to redefine the getitem function
> for string. Why does the following not work:
>
> class NStr(str):
> def __getitem__(self,idx):
> print "NStr:getitem",idx,type(idx)
> return str.__getitem__(self,idx)
>
> s=N
Prateek <[EMAIL PROTECTED]> wrote:
> I have a bit of a specialized request.
>
> I'm reading a table of strings (specifically fixed length 36 char
> uuids generated via uuid.uuid4() in the standard library) from a file
> and creating a set out of it.
> Then my program is free to make whatever modi
On Sat, 21 Apr 2007 20:13:44 -0700, Prateek wrote:
> I have a bit of a specialized request.
>
> I'm reading a table of strings (specifically fixed length 36 char
> uuids generated via uuid.uuid4() in the standard library) from a file
> and creating a set out of it.
> Then my program is free to ma
On Sat, 21 Apr 2007 22:36:42 -0400, Steven W. Orr wrote:
> When I go to create an object I want to be able to decide whether the
> object is valid or not in __init__, and if not, I want the constructor to
> return something other than an object, (like maybe None).
None is an object, like everyt
This may be more a cgi thing than a Python one, but I'm trying to get
this page:
http://adrian10.phpwebhosting.com/trial.html
consisting basically of this:
...to print out the contents of the textarea with this cgi script:
#!/usr/bin/python
import cgi
print "Content-type: text/html\n"
form
On Sat, 21 Apr 2007 18:09:01 -0700, Paul McGuire wrote:
> I am doing some simple timing of some elements of Python scripts, and
> the simplest is to just call time.time() before and after key elements
> of the script:
>
> t1 = time.time()
>
> # do lengthy operation
>
> t2 = time.time()
> print
I would like to validate sql strings, which are spread all over the
code, i.e. I run ("prepare") them against a database to see if it happy
with the statements. Spelling errors in sql have been a major pain for
me.
The statements will not be assembled from smaller pieces, but they will
not neccess
Here's my code. It's a teeny weeny little HTTP server. (I'm not really
trying to reinvent the wheel here. What I'm really doing is writing a
dispatching proxy server, but this is the shortest way to illustrate the
problem I'm having):
from SocketServer import *
from socket import *
from sele
101 - 109 of 109 matches
Mail list logo