twistedduck9 wrote:
Hi all
I've been trying to set up sockets on my server (running Apache/2.2.3)
using python and I'm confused as to why it doesn't work.
I set up a simple listening script which runs without error, and works
if a connecting script is run on the same server. However, if I try t
Ben Kaplan wrote:
On Jan 14, 2009, at 9:44 AM, "Gary M. Josack" wrote:
garywood wrote:
def ask_ok(prompt, retries=4, complaint="Yes or no, please!"):
while True:
password = input("enter something")
if password in ('y', 'ye
garywood wrote:
def ask_ok(prompt, retries=4, complaint="Yes or no, please!"):
while True:
password = input("enter something")
if password in ('y', 'ye', 'yes'): return True
if password in ('n', 'no', 'nope'): return False
retries = retries - 1
if retri
---
--
http://mail.python.org/mailman/listinfo/python-list
'NAME' is the value, and 'key' is the key. Your dictionary has two keys
mapped to two values:
'value' -> 'Route66'
'key' -> 'NAME'
int c.bufferp
--
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
--
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
--
http://mail.python.org/mailman/listinfo/python-list
Do you know that there is a csv module in the standard library already?
Thanks,
Gary M. Josack
--
http://mail.python.org/mailman/listinfo/python-list
/listinfo/python-list
Is sys.argv[0] what you want? If so, then os.path.basename(sys.argv[0])
is probably what you want.
Thanks,
Gary M. Josack
--
http://mail.python.org/mailman/listinfo/python-list
you've got ?self.send_header('Server', self.version_string()) in the
send_response method of the BaseHTTPRequestHandler class in the
BaseHTTPServer module. Long story, short, it's going to be a lot of work
to get rid of.
[EMAIL PROTECTED] wrote:
Hello.
I'm using SimpleHTTPServer (work well)
sc wrote:
clp:
Thanx to a recent thread I am able to have a print string
with a variable number of formatters -- what I now lack for
the creation of an elegant print statement is a tuple --
following is the code, the last line of which does not work:
#!/usr/bin/python
import xml.sax
import e
William Purcell wrote:
I want to use eval to evaluate wx.TextCtrl inputs. How can I keep
python from adding the __builtins__ key to mydict when I use it with
eval? Other wise I have to __delitem__('__builtins__') everytime I use
eval?
>>> mydict = {'a':2,'b':3}
>>> eval('a*b',mydict)
6
>>> my
Gary M. Josack wrote:
Aaron "Castironpi" Brady wrote:
On Sep 28, 2:59 pm, sotirac <[EMAIL PROTECTED]> wrote:
Wondering if there is a better way to generate string of numbers with
a length of 5 which also can have a 0 in the front of the number.
random_number
Aaron "Castironpi" Brady wrote:
On Sep 28, 2:59 pm, sotirac <[EMAIL PROTECTED]> wrote:
Wondering if there is a better way to generate string of numbers with
a length of 5 which also can have a 0 in the front of the number.
random_number = random.sample([0,1,2,3,4,5,6,7,8,9], 5) # choose 5
Chris Rebert wrote:
On Sun, Sep 28, 2008 at 12:59 PM, sotirac <[EMAIL PROTECTED]> wrote:
Wondering if there is a better way to generate string of numbers with
a length of 5 which also can have a 0 in the front of the number.
random_number = random.sample([0,1,2,3,4,5,6,7,8,9], 5) # choose
12 matches
Mail list logo