Baume Mercier Hampton Ladies Watch 8440 Recommendation Discount
Watches
Baume Mercier Hampton Ladies Watch 8440 Site:
http://baume-mercier-watches.pxhelp.com/Baume-Mercier-wristwatch-165.html
Thank you for choosing http://www.pxhelp.com/
Quality Baume Mercier Watches:
-- Forwarded message --
From: Waldemar Osuch [EMAIL PROTECTED]
Date: Tue, Aug 26, 2008 at 7:59 PM
Subject: Re: [python-win32] Fwd: Renaming Excel Spreadsheets
To: Python-Win32 List [EMAIL PROTECTED]
On Tue, Aug 26, 2008 at 12:57 PM, James Matthews [EMAIL PROTECTED]
wrote:
I'm trying to understand reflection/introspection in Python. How can I
identify the the type of attribute (e.g. instance var) in a class?
The following returns all the class attributes (methods and instance
vars).
However I'm interested in identifying the type of value for each case
- (e.g. I'd
Hi all !
I'm trying to capture stderr of an external module I use in my python
program. I'm doing this
by setting up a class in my module overwriting the stderr file object
method write.
The external module outputs to stderr this way:
from sys import std err
print stderr, Some
Blubaugh, David A. schrieb:
Diez,
What you have said is extremely concerning.
I am now using VMware. With Linux as the Master and windows as the
guest operating system. I was wondering if you have ever had to develop
a share memory resource between Linux and windows within a Vmware setup?
nisp schrieb:
Hi all !
I'm trying to capture stderr of an external module I use in my python
program. I'm doing this
by setting up a class in my module overwriting the stderr file object
method write.
The external module outputs to stderr this way:
from sys import std err
print
nisp [EMAIL PROTECTED] wrote:
I've always been convinced of the equivalence of the two ways of using
the import statement but it's clear I'm wrong :-(
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type help, copyright, credits or license for more
hi
i am trying to write a controller that creates a Tkinter gui,takes
userevents from gui and calls another program to do some calculation
and finally returns the results to gui to be displayed.
I tried to separate these three like MVC pattern
however ,being a newbie i have some doubts
sample
Juan schrieb:
Hi
I am trying to write a little a script that can be configurable. This
script should access to a database, that can be of any type (MySQL,
Postgres, SQLite, MS, etc).It has only to perform 2 or 3 simple plain
SQL queries. Hi have tested SQLAlchemy, and it is great, but too much
alex23 schrieb:
nisp [EMAIL PROTECTED] wrote:
I've always been convinced of the equivalence of the two ways of using
the import statement but it's clear I'm wrong :-(
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type help, copyright, credits
On Wed, Aug 27, 2008 at 4:55 AM, alex23 [EMAIL PROTECTED] wrote:
Daniel [EMAIL PROTECTED] wrote:
Does anyone know about a module that acts as a database stub for
python unittests?
It's not database-specific, but the Mock module should help you here:
http://python-mock.sourceforge.net/
On Wed, Aug 27, 2008 at 4:55 AM, alex23 [EMAIL PROTECTED] wrote:
Daniel [EMAIL PROTECTED] wrote:
Does anyone know about a module that acts as a database stub for
python unittests?
It's not database-specific, but the Mock module should help you here:
http://python-mock.sourceforge.net/
On Tue, Aug 26, 2008 at 11:35 PM, Daniel [EMAIL PROTECTED] wrote:
Hello,
I'm writing an application that interacts with a database. As I think
about how to write the unittests, I want them to be able to run
without actually having to access a live database. The pattern that
best describes
On Wed, 27 Aug 2008 06:50:30 +0200, akineko [EMAIL PROTECTED] wrote:
Hello everyone,
I'm trying to create custom Tkinter/Pmw widgets for my project.
After testing my widgets under Unix (Solaris), I have tried them under
Windows and I got a surprise.
The widgets came out differently.
The
nisp wrote:
Hi all !
I'm trying to capture stderr of an external module I use in my python
program. I'm doing this
by setting up a class in my module overwriting the stderr file object
method write.
The external module outputs to stderr this way:
from sys import std err
On Aug 27, 11:24 am, W. eWatson [EMAIL PROTECTED] wrote:
John Machin wrote:
On Aug 27, 10:21 am, W. eWatson [EMAIL PROTECTED] wrote:
I'm using IDLE for Python 2.4, and put pfydate distribution in
C:\Python24\Lib\site-packages\pfydate, as required by the
I am using the cPickle module to serialization and de-serialization of heavy
python object (80 MB). When I try to save the object it gives the memory
Error. Any one can help me out of this problem.
I am pickling the object as:
def savePklFile(pickleFile, data):
pickledFile
On Tue, Aug 26, 2008 at 8:33 PM, frankrentef [EMAIL PROTECTED] wrote:
Would the second file need something akin to...
loginout.admin (ie,url,adminlogin)
Yes. Since you're importing the whole module.
--
Marco Bizzarri
http://iliveinpisa.blogspot.com/
--
Gabriel Genellina wrote:
En Tue, 26 Aug 2008 03:20:53 -0300, Gerhard Häring [EMAIL PROTECTED]
escribi�:
In a recent experiment I've done this:
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from wsgiref.simple_server import make_server, demo_app
from SocketServer import
On Aug 12, 9:57 pm, alito [EMAIL PROTECTED] wrote:
A wrapper on the level up works:
~/python$ cat importercaller.py
from testpackage import config
config.hello()
~/python$ python importercaller.py
hello
So, how do I run these modules without writing a wrapper script for
each one?
I
2008/8/27 alex23 [EMAIL PROTECTED]:
Daniel [EMAIL PROTECTED] wrote:
It's not database-specific, but the Mock module should help you here:
http://python-mock.sourceforge.net/
There's even an example on that page for mocking a database.
There's a number of mocking modules for Python - my
2008/8/27 Marco Bizzarri [EMAIL PROTECTED]:
I strongly disagree on using mocks for a database; checking sequences
of SQL statement is fragile, painful, and leads you to frustration
when the actual SQL and the generated SQL do not match.
Clearly you need integration tests as well as unit tests,
Kevin McKinley napisał(a):
So i've complete my first program with a GUI interface. I've noticed
that everytime i click a tab or button the amount of memory the program
takes up goes up by 50-200 kb. The program will start off at 4.5mb and
by the time i'm done it can get up over 10 or 15
On 27 Aug., 07:03, Paddy [EMAIL PROTECTED] wrote:
On Aug 23, 2:33 pm, Paddy [EMAIL PROTECTED] wrote:
Hi,
I am am falling at the first hurdle when trying to access a library
using ctypes.
I have a file libucdb.so which the file command says is shared object,
but I cannot get it to
On Wed, Aug 27, 2008 at 10:26 AM, Simon Brunning
[EMAIL PROTECTED] wrote:
2008/8/27 Marco Bizzarri [EMAIL PROTECTED]:
I strongly disagree on using mocks for a database; checking sequences
of SQL statement is fragile, painful, and leads you to frustration
when the actual SQL and the generated
On Aug 26, 10:36 am, Alexandru Mosoi [EMAIL PROTECTED] wrote:
why doesn'tloggingthrow any exception when it should? how do I
configureloggingto throw exceptions?
try:
... logging.fatal('asdf %d', '123')
... except:
... print 'this line is never printed'
...
Traceback (most recent
On 26 Aug, 23:22, bruce [EMAIL PROTECTED] wrote:
ok, i can somehow live with this, i can accommodate it. but tell me, when
the parse module/class for libxml2dom does its thing, why does it not go
forward on the tree when it comes to a /html, if there's more text in the
string to process???
I
Albertos wrote:
Hello, I've collected huge source codes collection of any kinds : work
with text files, database, GUI etc.
You can download it here http://freactor.com/get.php?file=Python+source+code
First: Learn English
Second: In how many news groups did you post (just changing the
Gabriel Genellina wrote:
Start the application in a separate console (using `start bat_file`
might be the easiest way) and then, within your Python script, wait
until the new process is ready. The wmi module by Tim Golden can help
http://tgolden.sc.sabren.com/python/wmi.html
e.g. wait until
BrendanC wrote:
I'm trying to understand reflection/introspection in Python. How can I
identify the the type of attribute (e.g. instance var) in a class?
The following returns all the class attributes (methods and instance
vars).
However I'm interested in identifying the type of value for
Haeyoung Kim wrote:
Hi.
I'm migrating a VBScript into python.
How should I convert Date type parameter in VBScript's COM interface
with win32com?
I couldn't find any answer yet...
Could you give an example of code you're trying
to translate? Normally it's quite simple, but
different
John Machin wrote:
On Aug 27, 11:24 am, W. eWatson [EMAIL PROTECTED] wrote:
John Machin wrote:
On Aug 27, 10:21 am, W. eWatson [EMAIL PROTECTED] wrote:
I'm using IDLE for Python 2.4, and put pfydate distribution in
C:\Python24\Lib\site-packages\pfydate, as required by the
On Aug 26, 8:05 pm, Thomas Heller [EMAIL PROTECTED] wrote:
I'm using theloggingmodule in my comtypes library to log
'interesting' things that happen. In other words, the idea
is if the user of the library is interested in the details that
happen in the package internally, he (she?) would
aditya shukla wrote:
I am writing a program(prog 1) in python , which requires to know the
path of another program(prog 2) in order to execute.I can get my prog1
to work when i hard code the path of the existing program(prog2).But
since the path of prog could be anywhere on the file system ,
Vinay Sajip napisał(a):
On Aug 26, 10:36 am, Alexandru Mosoi [EMAIL PROTECTED] wrote:
why doesn'tloggingthrow any exception when it should? how do I
configureloggingto throw exceptions?
try:
... logging.fatal('asdf %d', '123')
... except:
... print 'this line is never
George Sakkis wrote:
if you meant to write encode, you can indeed safely do
[s.encode('utf8') for s in strings] as long as all strings are returned
by an ET implementation.
I was replying to the general assertion that in 2.x ASCII byte
strings and unicode strings are compatible, not
Robert Kaplan wrote:
Actually, I found his response to the point, his sample code helpful,
and his solution similar to yours.
given how your original code looked and how pointless it was, are you
sure you're not just another alias for the same guy?
/F
--
how is Queue intended to be used? I found the following code in python
manual, but I don't understand how to stop consumers after all items
have been produced. I tried different approaches but all of them
seemed incorrect (race, deadlock or duplicating queue functionality)
def worker():
Frank Millman wrote:
Just out of interest, would the following, without a lock, be safe?
old, atomic_int = atomic_int, atomic_int+1
nope.
there's some information here (make sure you read the comments):
http://effbot.org/pyfaq/what-kinds-of-global-value-mutation-are-thread-safe.htm
and
Alexandru Mosoi wrote:
how is Queue intended to be used? I found the following code in python
manual, but I don't understand how to stop consumers after all items
have been produced. I tried different approaches but all of them
seemed incorrect (race, deadlock or duplicating queue
Hi,
I have a strange behaviour of python with pdb and import statement.
Here is the example code :
file my1.py:
import my2
file my2.py:
a=5
toto
I intentionnaly put a syntax error in file my2.py.
If I run python -i my2.py and run pdb I got :
NameError: name 'toto' is not defined
import pdb
Alexandru Mosoi wrote:
how is Queue intended to be used? I found the following code in python
manual, but I don't understand how to stop consumers after all items
have been produced. I tried different approaches but all of them
seemed incorrect (race, deadlock or duplicating queue functionality)
Medardo Rodriguez (Merchise Group) a écrit :
On Tue, Aug 26, 2008 at 4:10 PM, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
In Python, there's *no* relationship between classmethods and metaclasses.
In OOP the concept of meta-class has everything to do with class
methods, regardless if is in
Fredrik Lundh [EMAIL PROTECTED] writes:
Robert Kaplan wrote:
Actually, I found his response to the point, his sample code
helpful, and his solution similar to yours.
given how your original code looked and how pointless it was, are
you sure you're not just another alias for the same
Hey,
This is an example of a generator function:
=
def counter(start_at=0):
count = start_at
while True:
val = (yield count)
if val is not None:
count = val
else:
count += 1
==
count = counter(5)
count.next()
5
count.send(9)
9
Diez Put a sentinel into the queue that gets interpreted as terminate
Diez for the workers. You need of course to put it in there once for
Diez each worker.
Or make the consumers daemon threads so that when the producers are finished
an all non-daemon threads exit, the consumers do
On Aug 27, 9:56 am, Peter Otten [EMAIL PROTECTED] wrote:
nisp wrote:
Hi all !
I'm trying to capture stderr of an external module I use in my python
program. I'm doing this
by setting up a class in my module overwriting the stderr file object
method write.
The external module outputs
Vinay Sajip schrieb:
Suppose a user of logging configures it wrongly by mistake, so that
there are no handlers configured. In this case, if the logging system
were not to output anything at all, then you would have no information
at all about why - leading to a longer time to diagnose the
On 2008-08-26 23:35, Daniel wrote:
Hello,
I'm writing an application that interacts with a database. As I think
about how to write the unittests, I want them to be able to run
without actually having to access a live database. The pattern that
best describes this is here:
Hello,
it's still me, being unable to load certain modules (for instance,
odbc) in scripts that run though IDLE. I've now written a self-
containing script that illustrates the whole problem:
--
import sys, os
# find odbc module in Python distribution tree:
for
I am new to python,and am learning from the tutorials
i created 2 .py files like below and put the main in one of them
empmodule.py
--
from workmodule import Worker
class Employer:
def __init__(self,n):
self.name=n
self.worker=Worker()
def getemployerName(self):
skip Or make the consumers daemon threads so that when the producers
skip are finished an all non-daemon threads exit, the consumers do as
skip well.
Forget that I wrote this. If they happen to be working on the token they've
consumed at the time the other threads exit, they will as
Kevin McKinley napisał(a):
that everytime i click a tab or button the amount of memory the program
takes up goes up by 50-200 kb. The program will start off at 4.5mb and
by the time i'm done it can get up over 10 or 15 mb. The program will
start running
Hussein B [EMAIL PROTECTED] writes:
This is an example of a generator function [using coroutine
behaviour]:
[…]
I'm not able to understand how this generator function is working,
would you please me (what happens when calling next/send)?
The behaviour you're seeing was introduced in PEP
Hi,
There is a great set of slides on this topic
available here: http://www.dabeaz.com/generators/
They explain this concept quite well and
walk you through everything you need to
know about generators and how powerful
they can be.
Please read it.
cheers
James
On 8/27/08, Hussein B [EMAIL
On 2008-08-27 12:37, [EMAIL PROTECTED] wrote:
Hello,
it's still me, being unable to load certain modules (for instance,
odbc) in scripts that run though IDLE. I've now written a self-
containing script that illustrates the whole problem:
I don't think this is related to IDLE or your setup.
On Aug 27, 1:08 pm, M.-A. Lemburg [EMAIL PROTECTED] wrote:
I don't think this is related to IDLE or your setup. The odbc
module is very old and unmaintained, so it's possible that Windows
doesn't find some system DLLs needed for it to work.
Please note that
1) I can type import odbc directly
anyone know how I would find out how many rows are in a csv file?
I can't find a method which does this on csv.reader.
Thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
Guilherme Polo wrote:
On Mon, Aug 25, 2008 at 7:20 AM, Ken Seehart [EMAIL PROTECTED] wrote:
I'm using SocketServer to implement a local server that serves comet
long-polling connections.
How do I increase the maximum number of open connections? Currently it is
limited to about 8 I think.
2008/8/27 SimonPalmer [EMAIL PROTECTED]:
anyone know how I would find out how many rows are in a csv file?
I can't find a method which does this on csv.reader.
len(list(csv.reader(open('my.csv'
--
Cheers,
Simon B.
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
--
Robert Kaplan a écrit :
Bruno Desthuilliers a écrit :
...
2/ don't bother reading anything from someone named 'castironpi', it's
one of our currently active resident troll, and he is worse than
clueless.
Actually, I found his response to the point, his sample code helpful,
and his
On Aug 27, 12:16 pm, SimonPalmer [EMAIL PROTECTED] wrote:
anyone know how I would find out how many rows are in a csv file?
I can't find a method which does this on csv.reader.
Thanks in advance
You have to iterate each row and count them -- there's no other way
without supporting
On Aug 27, 12:29 pm, Simon Brunning [EMAIL PROTECTED]
wrote:
2008/8/27 SimonPalmer [EMAIL PROTECTED]:
anyone know how I would find out how many rows are in a csv file?
I can't find a method which does this on csv.reader.
len(list(csv.reader(open('my.csv'
--
Cheers,
Simon B.
2008/8/27 Jon Clements [EMAIL PROTECTED]:
len(list(csv.reader(open('my.csv'
Not the best of ideas if the row size or number of rows is large!
Manufacture a list, then discard to get its length -- ouch!
I do try to avoid premature optimization. ;-)
--
Cheers,
Simon B.
--
On Aug 27, 1:06 pm, Gerhard Häring [EMAIL PROTECTED] wrote:
Alexandru Mosoi wrote:
how is Queue intended to be used? I found the following code in python
manual, but I don't understand how to stop consumers after all items
have been produced. I tried different approaches but all of them
On Aug 27, 12:41 pm, Jon Clements [EMAIL PROTECTED] wrote:
On Aug 27, 12:29 pm, Simon Brunning [EMAIL PROTECTED]
wrote:
2008/8/27 SimonPalmer [EMAIL PROTECTED]:
anyone know how I would find out how many rows are in a csv file?
I can't find a method which does this on csv.reader.
Your solution works assuming that you know how many consumer threads
you have :). I don't :). More than that, it's not correct if you have
more than one producer :). Having a sentinel was my very first idea,
but as you see... it's a race condition (there are cases in which not
all items are
On Aug 27, 12:50 pm, SimonPalmer [EMAIL PROTECTED] wrote:
On Aug 27, 12:41 pm, Jon Clements [EMAIL PROTECTED] wrote:
On Aug 27, 12:29 pm, Simon Brunning [EMAIL PROTECTED]
wrote:
2008/8/27 SimonPalmer [EMAIL PROTECTED]:
anyone know how I would find out how many rows are in a csv
On Aug 27, 12:48 pm, Simon Brunning [EMAIL PROTECTED]
wrote:
2008/8/27 Jon Clements [EMAIL PROTECTED]:
len(list(csv.reader(open('my.csv'
Not the best of ideas if the row size or number of rows is large!
Manufacture a list, then discard to get its length -- ouch!
I do try to avoid
def counter(start_at=0):
count = start_at
while True:
val = (yield count)
A generator can accept a value from the consumer. So, If I have a
counter:
c = counter()
I can send it a value:
c.send(9)
if val is not None:
count = val
The generator
On Aug 27, 2:54 pm, Jeff [EMAIL PROTECTED] wrote:
Queue raises an Empty exception when there are no items left in the
queue. Put the q.get() call in a try block and exit in the except
block.
Wrong. What if producer takes a long time to produce an item?
Consumers
will find the queue empty and
On Aug 27, 12:54 pm, SimonPalmer [EMAIL PROTECTED] wrote:
On Aug 27, 12:50 pm, SimonPalmer [EMAIL PROTECTED] wrote:
On Aug 27, 12:41 pm, Jon Clements [EMAIL PROTECTED] wrote:
On Aug 27, 12:29 pm, Simon Brunning [EMAIL PROTECTED]
wrote:
2008/8/27 SimonPalmer [EMAIL PROTECTED]:
On Aug 27, 9:54 pm, SimonPalmer [EMAIL PROTECTED] wrote:
On Aug 27, 12:50 pm, SimonPalmer [EMAIL PROTECTED] wrote:
On Aug 27, 12:41 pm, Jon Clements [EMAIL PROTECTED] wrote:
On Aug 27, 12:29 pm, Simon Brunning [EMAIL PROTECTED]
wrote:
2008/8/27 SimonPalmer [EMAIL PROTECTED]:
On Aug 27, 12:45 pm, Alexandru Mosoi [EMAIL PROTECTED] wrote:
how is Queue intended to be used? I found the following code in python
manual, but I don't understand how to stop consumers after all items
have been produced. I tried different approaches but all of them
seemed incorrect (race,
On Aug 27, 1:15 pm, John Machin [EMAIL PROTECTED] wrote:
On Aug 27, 9:54 pm, SimonPalmer [EMAIL PROTECTED] wrote:
On Aug 27, 12:50 pm, SimonPalmer [EMAIL PROTECTED] wrote:
On Aug 27, 12:41 pm, Jon Clements [EMAIL PROTECTED] wrote:
On Aug 27, 12:29 pm, Simon Brunning [EMAIL
jimgardener wrote:
I am new to python,and am learning from the tutorials
i created 2 .py files like below and put the main in one of them
empmodule.py
--
from workmodule import Worker
class Employer:
def __init__(self,n):
self.name=n
self.worker=Worker()
def
Your solution works assuming that you know how many consumer threads
you have :). I don't :). More than that, it's not correct if you have
more than one producer :). Having a sentinel was my very first idea,
but as you see... it's a race condition (there are cases in which not
all items are
nisp wrote:
On Aug 27, 9:56 am, Peter Otten [EMAIL PROTECTED] wrote:
nisp wrote:
Hi all !
I'm trying to capture stderr of an external module I use in my python
program. I'm doing this
by setting up a class in my module overwriting the stderr file object
method write.
The external
Use csv.DictReader to get a list of dicts (you get one for each row,
with the values as the vals and the column headings as the keys) and
then do a len(list)?
--
http://mail.python.org/mailman/listinfo/python-list
On 27 Aug, 13:32, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
This _sometimes_ happens, yes, and that's why you just shouldn't trust
him : unless you have a good knowledge of the topic, you just can't tell
whether his answer is ok or total rubbish.
Can everyone just be done graduating
On Aug 27, 2:43 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
nisp wrote:
On Aug 27, 9:56 am, Peter Otten [EMAIL PROTECTED] wrote:
nisp wrote:
Hi all !
I'm trying to capture stderr of an external module I use in my python
program. I'm doing this
by setting up a class in my module
Pyrex 0.9.8.5 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
Various minor bug fixes and improvements.
What is Pyrex?
--
Pyrex is a language for writing Python extension modules.
It lets you freely mix operations on Python and C data, with
all
On Aug 27, 10:30 am, Rob Wolfe [EMAIL PROTECTED] wrote:
Vinay Sajip napisa³(a):
On Aug 26, 10:36 am, Alexandru Mosoi [EMAIL PROTECTED] wrote:
why doesn'tloggingthrow any exception when it should? how do I
configureloggingto throw exceptions?
try:
... logging.fatal('asdf %d',
Recently had a need to us a multimap container in C++. I now need to
write equivalent Python code. How does Python handle this?
k['1'] = 'Tom'
k['1'] = 'Bob'
k['1'] = 'Joe'
...
Same key, but different values. No overwrites either They all must
be inserted into the container
Thanks,
Brad
On Aug 27, 11:28 am, Thomas Heller [EMAIL PROTECTED] wrote:
Vinay Sajip schrieb:
I came up with a workaround that seems to do what I want. I add a NULL
handler
to my top-level logger which is not the root logger but a logger named
'comtypes',
other loggers are named
nisp wrote:
Thanks first of all ! I read the interesting Diez's link but something
still remains to me unclear, on the other hand it's clear the my
problem is concentrated there and on symbols.
Read it again. If you have two modules
module1.py
from sys import stderr
module2.py
from module1
There's always the naive option.
query = ('species', 'lifestyle', 'coolness', 'tentacles=8')
db.execute('SELECT %s, %s, %s % FROM creatures WHERE %s;' % query)
record = dict(zip((query), (db.fetchall()))
array = '''{
'''
for k,v in record:
array.append('(k):(v)')
array.append('''
dict.update({a:1}) SETS the dict item a 's value to 1.
i want to increase it by 1. isnt that possible in an easy way? I
should use a tuple for this?
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 27, 2:37 pm, TYR [EMAIL PROTECTED] wrote:
There's always the naive option.
query = ('species', 'lifestyle', 'coolness', 'tentacles=8')
db.execute('SELECT %s, %s, %s % FROM creatures WHERE %s;' % query)
record = dict(zip((query), (db.fetchall()))
array = '''{
'''
for k,v
On Aug 27, 2:40 pm, ssecorp [EMAIL PROTECTED] wrote:
dict.update({a:1}) SETS the dict item a 's value to 1.
i want to increase it by 1. isnt that possible in an easy way? I
should use a tuple for this?
dict[a] += 1
Iain
--
http://mail.python.org/mailman/listinfo/python-list
ssecorp wrote:
dict.update({a:1}) SETS the dict item a 's value to 1.
i want to increase it by 1. isnt that possible in an easy way? I
should use a tuple for this?
1) Don't use dict as name for a dictionary, it shadows the type dict
2) setdefault is your friend
d = {}
d['a'] =
Jon Clements wrote:
On Aug 27, 12:54 pm, SimonPalmer [EMAIL PROTECTED] wrote:
after reading the file throughthe csv.reader for the length I cannot
iterate over the rows. How do I reset the row iterator?
If you're sure that the number of rows is always less than 200.
Or 2000. Or 2...
On Aug 27, 9:35 am, brad [EMAIL PROTECTED] wrote:
Recently had a need to us a multimap container in C++. I now need to
write equivalent Python code. How does Python handle this?
k['1'] = 'Tom'
k['1'] = 'Bob'
k['1'] = 'Joe'
...
Same key, but different values. No overwrites either They
On Aug 26, 10:49 am, John Fabiani [EMAIL PROTECTED] wrote:
Alan Franzoni wrote:
zamil was kind enough to say:
[cut]
cut
See the following link on the Python website.
http://wiki.python.org/moin/GuiProgramming
Google this list for GUI
RC
--
brad wrote:
Recently had a need to us a multimap container in C++. I now need to
write equivalent Python code. How does Python handle this?
k['1'] = 'Tom'
k['1'] = 'Bob'
k['1'] = 'Joe'
...
Same key, but different values. No overwrites either They all must
be inserted into the
brad wrote:
Recently had a need to us a multimap container in C++. I now need to
write equivalent Python code. How does Python handle this?
k['1'] = 'Tom'
k['1'] = 'Bob'
k['1'] = 'Joe'
Same key, but different values. No overwrites either They all must
be inserted into the container
if i want to make a string downcase, is upper().swapcase() the onyl
choice? there is no downer() ?
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Aug 27, 2008 at 11:16 AM, ssecorp [EMAIL PROTECTED] wrote:
if i want to make a string downcase, is upper().swapcase() the onyl
choice? there is no downer() ?
There is no downer indeed, instead it is named lower.
--
http://mail.python.org/mailman/listinfo/python-list
--
--
On Aug 27, 1:17 pm, Alexandru Mosoi [EMAIL PROTECTED] wrote:
On Aug 27, 12:45 pm, Alexandru Mosoi [EMAIL PROTECTED] wrote:
how is Queue intended to be used? I found the following code in python
manual, but I don't understand how to stop consumers after all items
have been produced. I
On Aug 27, 3:16 pm, ssecorp [EMAIL PROTECTED] wrote:
if i want to make a string downcase, is upper().swapcase() the onyl
choice? there is no downer() ?
lower()
You need to be careful ssecorp, you might be at risk of being
considered a troll -- always give the benefit though (probably why I'm
1 - 100 of 286 matches
Mail list logo