___
Python-Dev mailing list
python-...@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/barry%40python.org
--
http://mail.python.org/mailman/listinfo/python-announce-list
John Nagle na...@animats.com writes:
def editmoney(n) :
return((,.join(reduce(lambda lst, item : (lst + [item]) if
item else lst,
re.split(r'(\d\d\d)',str(n)[::-1]),[])))[::-1])
Too obscure. I usually use something like this:
def editmoney(n):
if n 0: return
On Wed, 04 Aug 2010 21:33:31 -0700, John Nagle wrote:
There's got to be a better way to do this:
def editmoney(n) :
return((,.join(reduce(lambda lst, item : (lst + [item]) if
item else lst,
re.split(r'(\d\d\d)',str(n)[::-1]),[])))[::-1])
What does the name
Also,
for bestandsnaam in dirs and files:
is probably not doing what you want. Use + to concatenate lists.
Daniel
On Wed, Aug 4, 2010 at 6:30 AM, Mike Kent mrmak...@cox.net wrote:
On Aug 4, 9:10 am, BobAalsma bob.aal...@aalsmacons.nl wrote:
I'm working on a set of scripts
John Nagle wrote:
There's got to be a better way to do this:
def editmoney(n) :
return((,.join(reduce(lambda lst, item : (lst + [item]) if
item else lst,
re.split(r'(\d\d\d)',str(n)[::-1]),[])))[::-1])
editmoney(0)
'0'
editmoney(13535)
'13,535'
On Wed, Aug 4, 2010 at 11:30 PM, Peter Otten __pete...@web.de wrote:
John Nagle wrote:
There's got to be a better way to do this:
def editmoney(n) :
return((,.join(reduce(lambda lst, item : (lst + [item]) if
item else lst,
Hello,
I'm building an elevator simulator for a class assignment. I recently
ran into a roadblock and don't know how to fix it. For some reason, in
my checkQueue function below, the call to self.goUp() is never executed.
It is on the last line of code I pasted in. I can put print statements
I was looking at the code, I dont have much time to go through it, but I might
have found a typo - yield (p.destination - self.currenteFloor) , I think it
should be currentFloor.Maybe thats your problem. Will look into the code more
later.
Regards,
Nav
On 05-Aug-2010, at 12:55 PM, Brandon
On 08/04/2010 09:27 AM, Chris Rebert wrote:
On Wed, Aug 4, 2010 at 12:21 AM, News123 news1...@free.fr wrote:
snip
3.) try following python
import os
print os.getcwd()
import shutil
shutil(YOUR_SOURCE_FILE_NAME,DESTINATION_DIRECTORY/DSTNTN_FILE_NAME)
WTF; modules aren't callable. Typo?
On Thu, 05 Aug 2010 00:22:57 -0700, geremy condra wrote:
locale.setlocale(locale.LC_ALL, )
'de_DE.UTF-8'
print locale.currency(13535, grouping=True)
13.535,00 €
print locale.format(%d, 13535, grouping=True)
13.535
Peter
I had literally no idea this existed. Thanks.
I knew it existed,
Jonathan Fine wrote:
Hi
I just discovered today a new syntax for writing tests. The basic
idea is to write a function that contains some statements, and run it
via a decorator. I wonder if anyone had seen this pattern before, and
how you feel about it. For myself, I quite like it.
Let's
samwyse wrote:
On Aug 3, 1:20 am, Steven D'Aprano steve-REMOVE-
t...@cybersource.com.au wrote:
On Mon, 02 Aug 2010 17:19:46 -0700, samwyse wrote:
Fortunately, I don't need the functionality of the object, I just want
something that won't generate an error when I use it. So, what is
Hi Andreas,
On 2010-08-03 12:15, Andreas Pfrengle wrote:
On 3 Aug., 03:22, Carl Banks pavlovevide...@gmail.com wrote:
Thinking about it, it might really be dangerous to coerce always to
int1, since sometimes I might want a normal int as result (I can't
tell yet for sure).
Yes, that way your
On 5 Aug, 08:25, Brandon McCombs n...@none.com wrote:
Hello,
I'm building an elevator simulator for a class assignment. I recently
ran into a roadblock and don't know how to fix it. For some reason, in
my checkQueue function below, the call to self.goUp() is never executed.
It is on the last
On Aug 2, 7:34 pm, John Nagle na...@animats.com wrote:
s2 = HELLO THERE
kresplit4 = re.compile(r'\W+', re.UNICODE)
kresplit4.split(s2)
['', 'HELLO', 'THERE', '']
I still get empty strings.
re.findall(r\w+, a b c )
['a', 'b', 'c']
--
On Wed, 28 Jul 2010 15:58:29 +0200, Ulrich Eckhardt
eckha...@satorlaser.com wrote:
wheres pythonmonks wrote:
Thanks ... I thought int was a type-cast (like in C++) so I
assumed I
couldn't reference it.
Firstly, int is a class. Python doesn't make a distinction
between builtin
types and
In message 7xocdi56cp@ruckus.brouhaha.com, Paul Rubin wrote:
I'd say the Ada standardizers went to a great deal of trouble to specify
and document stuff that other languages simply leave undefined, leaving
developers relying on implementation-specific behavior that's not part
of the
In message roy-6bcfa7.22564104082...@news.panix.com, Roy Smith wrote:
C++, for all its flaws, had one powerful feature which made it very
popular. It is a superset of C.
Actually, it never was.
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 28 Jul 2010 09:15:24 -0400, wheres pythonmonks
wherespythonmo...@gmail.com wrote:
A new python convert is now looking for a replacement for another
perl idiom.
A functional alternative:
l = ...
seqint = compose(map, int)
print f(seqint(l))
--
In message mailman.1601.1280974847.1673.python-l...@python.org, David
Robinow wrote:
Lawrence, you've been asking a lot of off-topic questions about
Microsoft Windows.
You’ve got to be kidding. Look at the number of Windows-specific questions
this groups is already full of.
--
Brandon McCombs wrote:
I'm building an elevator simulator for a class assignment. I recently
ran into a roadblock and don't know how to fix it. For some reason, in
my checkQueue function below, the call to self.goUp() is never executed.
[...]
sorry about the formatting
While I can certainly
Peter Otten wrote:
locale.setlocale(locale.LC_ALL, (en_US, UTF-8))
'en_US.UTF8'
print locale.currency(13535, grouping=True)
$13,535.00
Okay, so if I'm writing a wsgi app, and I want to format depending on
the choices of the currently logged in users, what would you recommend?
I can't do
Hi All,
I have a script that does the following:
from subprocess import Popen,PIPE,STDOUT
def execute(command,cwd):
return Popen(
command,
stderr=STDOUT,
stdout=PIPE,
universal_newlines=True,
cwd=cwd,
shell=True,
).communicate()[0]
Wolfgang Rohdewald wrote:
On Donnerstag 05 August 2010, Chris Withers wrote:
...then the output is indeed captured. So, what is svn doing
differently? How is it escaping its jail?
maybe it does not read from stdin but directly from /dev/tty
But why only the request for auth credentials?
On Donnerstag 05 August 2010, Chris Withers wrote:
...then the output is indeed captured. So, what is svn doing
differently? How is it escaping its jail?
maybe it does not read from stdin but directly from /dev/tty
--
Wolfgang
--
http://mail.python.org/mailman/listinfo/python-list
Chris Withers wrote:
Hi All,
I have a script that does the following:
from subprocess import Popen,PIPE,STDOUT
def execute(command,cwd):
return Popen(
command,
stderr=STDOUT,
stdout=PIPE,
universal_newlines=True,
cwd=cwd,
shell=True,
Jean-Michel Pichavant wrote:
You did not redirect stdin, so it is expected you can still read input
from the console.
Okay, so if I definitely wanted no input, what should I pass as the
stdin parameter to the POpen constructor?
And it looks like svn is writting the credentials
prompt on
On Aug 5, 7:06 pm, Chris Withers ch...@simplistix.co.uk wrote:
Peter Otten wrote:
locale.setlocale(locale.LC_ALL, (en_US, UTF-8))
'en_US.UTF8'
print locale.currency(13535, grouping=True)
$13,535.00
Okay, so if I'm writing a wsgi app, and I want to format depending on
the choices of the
C++ is actually not that bad.
Can't compare it to C, but nothing compares to C...
I think the bad reputation it got (and still has) is from Microsoft's visual
studio IDE (that was and still is horrible)
A lot of good applications are written in C++, but many bad ones as well.
Sorry for swearing
Hi,
I'm trying to call python (python 2.6) functions from C++ using MS VC+
+ 6.0 and any calls to PyInt_FromLong with numbers below 257 give me
exceptions, no problems with bigger numbers
PyObject *pValue;
pValue = PyInt_FromLong(1L); (or pValue = PyInt_FromLong(1);
Any ideas of what can I be
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:
In message roy-6bcfa7.22564104082...@news.panix.com, Roy Smith wrote:
C++, for all its flaws, had one powerful feature which made it very
popular. It is a superset of C.
Actually, it never was.
Wondering off topic a bit - I am
On Thu, 2010-08-05 at 12:58 +0100, Chris Withers wrote:
Jean-Michel Pichavant wrote:
You did not redirect stdin, so it is expected you can still read input
from the console.
Okay, so if I definitely wanted no input, what should I pass as the
stdin parameter to the POpen constructor?
On Donnerstag 05 August 2010, Chris Withers wrote:
But why only the request for auth credentials?
for security reasons I suppose - make sure a human enters
the password
--
Wolfgang
--
http://mail.python.org/mailman/listinfo/python-list
Chris Withers wrote:
Peter Otten wrote:
locale.setlocale(locale.LC_ALL, (en_US, UTF-8))
'en_US.UTF8'
print locale.currency(13535, grouping=True)
$13,535.00
Okay, so if I'm writing a wsgi app, and I want to format depending on
the choices of the currently logged in users, what would you
On Thu, 5 Aug 2010 05:04:36 -0700 (PDT)
Marcos Prieto mark...@gmail.com wrote:
Hi,
I'm trying to call python (python 2.6) functions from C++ using MS VC+
+ 6.0 and any calls to PyInt_FromLong with numbers below 257 give me
exceptions, no problems with bigger numbers
PyObject *pValue;
Wolfgang Rohdewald wrote:
On Donnerstag 05 August 2010, Chris Withers wrote:
But why only the request for auth credentials?
for security reasons I suppose - make sure a human enters
the password
Well yes, but what if you actually want to script it?
Chris
--
Simplistix - Content
http://www.youtube.com/watch?v=JYpkWbdOvrMfeature=related
http://www.youtube.com/watch?v=0y-Ct1NpxWAfeature=related
http://www.youtube.com/watch?v=u7dKl-T6ZFAfeature=related
http://www.youtube.com/watch?v=1DtUtvDrbIMfeature=related
http://www.youtube.com/watch?v=pOESV8kg1JEfeature=related
On 5 Aug, 10:17, Jean-Michel Pichavant jeanmic...@sequans.com wrote:
Jonathan Fine wrote:
Hi
I just discovered today anewsyntaxfor writing tests. The basic
idea is to write a function that contains some statements, and run it
via a decorator. I wonder if anyone had seen this pattern
On 2010-08-05, Chris Withers ch...@simplistix.co.uk wrote:
Wolfgang Rohdewald wrote:
On Donnerstag 05 August 2010, Chris Withers wrote:
But why only the request for auth credentials?
for security reasons I suppose - make sure a human enters
the password
Well yes, but what if you actually
Chris Withers wrote:
Jean-Michel Pichavant wrote:
You did not redirect stdin, so it is expected you can still read
input from the console.
Okay, so if I definitely wanted no input, what should I pass as the
stdin parameter to the POpen constructor?
You do want an input don't you ? 'cause
On Aug 5, 4:32 am, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
samwyse wrote:
On Aug 3, 1:20 am, Steven D'Aprano steve-REMOVE-
t...@cybersource.com.au wrote:
On Mon, 02 Aug 2010 17:19:46 -0700, samwyse wrote:
Fortunately, I don't need the functionality of the object, I just want
On 08/05/10 05:33, Lawrence D'Oliveiro wrote:
OK, I have a copy of KR 2nd Ed on a shelf within reach here. Can you point
out some behaviour that C programmers might need to rely on, that is not
specified in that document?
need to is considerably different from might. Size of an
int,
- Original message -
Wolfgang Rohdewald wrote:
On Donnerstag 05 August 2010, Chris Withers wrote:
But why only the request for auth credentials?
for security reasons I suppose - make sure a human enters
the password
Well yes, but what if you actually want to script it?
Hi all,
I'm trying to create a metaclass that keeps track of its objects, and
implement this as a collections.MutableMapping. That is, something
like this:
class type2(type, MutableMapping):
...
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/abc.pyc in
jfine wrote:
On 5 Aug, 10:17, Jean-Michel Pichavant jeanmic...@sequans.com wrote:
Jonathan Fine wrote:
Hi
I just discovered today anewsyntaxfor writing tests. The basic
idea is to write a function that contains some statements, and run it
via a decorator. I wonder if anyone
On 8/5/2010 12:33 AM, John Nagle wrote:
There's got to be a better way to do this:
def editmoney(n) :
return((,.join(reduce(lambda lst, item : (lst + [item]) if
item else lst,
re.split(r'(\d\d\d)',str(n)[::-1]),[])))[::-1])
Here's a more elegant variant, using regexp lookahead:
def
On Jul 24, 3:42 pm, Emmy Noether emmynoeth...@gmail.com wrote:
On Jul 23, 9:27 pm, TheFlyingDutchman zzbba...@aol.com wrote:
On Jul 23, 12:06 pm, Emmy Noether emmynoeth...@gmail.com wrote:
Title PortableLISPinterpreter
Creator/Author Cox, L.A. Jr. ; Taylor, W.P.
Publication Date
I have a database query result (see code below). In PHP, I would have said
list(var1,var2,var) = $result
and each element in the list would be assigned to each of the named variables.
I have my data coming out of the database, and I can see it is a list. so my
question is, instead of
On Jul 18, 4:48 am, Richard Heathfield r...@see.sig.invalid wrote:
Richard Heathfield http://www.cpax.org.uk
Email: -http://www. +rjh@
Usenet is a strange place - dmr 29 July 1999
Sig line vacant - apply within
http://www.youtube.com/watch?v=JYpkWbdOvrMfeature=related
Kushal Kumaran wrote:
- Original message -
Wolfgang Rohdewald wrote:
On Donnerstag 05 August 2010, Chris Withers wrote:
But why only the request for auth credentials?
for security reasons I suppose - make sure a human enters
the password
Well yes, but what if you
On 05/08/2010 15:38, Chris Withers wrote:
Kushal Kumaran wrote:
- Original message -
Wolfgang Rohdewald wrote:
On Donnerstag 05 August 2010, Chris Withers wrote:
But why only the request for auth credentials?
for security reasons I suppose - make sure a human enters
the
Tim Golden wrote:
See http://pexpect.sf.net for a python version.
...which doesn't work on Windows.
There is a winpexpect:
http://pypi.python.org/pypi/winpexpect/1.3
Are the two api-identical?
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
-
On 05/08/2010 15:49, Chris Withers wrote:
Tim Golden wrote:
See http://pexpect.sf.net for a python version.
...which doesn't work on Windows.
There is a winpexpect:
http://pypi.python.org/pypi/winpexpect/1.3
Are the two api-identical?
From the bitbucket page:
On Thu, Aug 5, 2010 at 7:26 AM, Chris Hare ch...@labr.net wrote:
I have a database query result (see code below). In PHP, I would have said
list(var1,var2,var) = $result
and each element in the list would be assigned to each of the named
variables. I have my data coming out of the
Tim Golden wrote:
On 05/08/2010 15:49, Chris Withers wrote:
Tim Golden wrote:
See http://pexpect.sf.net for a python version.
...which doesn't work on Windows.
There is a winpexpect:
http://pypi.python.org/pypi/winpexpect/1.3
Are the two api-identical?
From the bitbucket page:
On 05/08/2010 15:56, Chris Withers wrote:
Tim Golden wrote:
On 05/08/2010 15:49, Chris Withers wrote:
Tim Golden wrote:
See http://pexpect.sf.net for a python version.
...which doesn't work on Windows.
There is a winpexpect:
http://pypi.python.org/pypi/winpexpect/1.3
Are the two
On 08/05/10 09:26, Chris Hare wrote:
I have a database query result (see code below). In PHP, I
would have said
list(var1,var2,var) = $result
and each element in the list would be assigned to each of the
named variables. I have my data coming out of the database,
and I can see it is a list. so
On 5 Aug, 14:52, Jean-Michel Pichavant jeanmic...@sequans.com wrote:
jfine wrote:
On 5 Aug, 10:17, Jean-Michel Pichavant jeanmic...@sequans.com wrote:
Jonathan Fine wrote:
Hi
I just discovered today anewsyntaxfor writing tests. The basic
idea is to write a function that contains
Then start your Search here at JobPIMP
JobPIMP is a Customised Search Engine that is crawling over 800+ Local
and International Job Boards so you don't have to.
JobPIMP is searching well known mainstream, niche, and less well known
specialist job portals
(your search results on one page).
Click
Jon Clements wrote:
On 5 Aug, 08:25, Brandon McCombs n...@none.com wrote:
Hello,
I'm building an elevator simulator for a class assignment. I recently
ran into a roadblock and don't know how to fix it. For some reason, in
my checkQueue function below, the call to self.goUp() is never executed.
Ulrich Eckhardt wrote:
Brandon McCombs wrote:
I'm building an elevator simulator for a class assignment. I recently
ran into a roadblock and don't know how to fix it. For some reason, in
my checkQueue function below, the call to self.goUp() is never executed.
[...]
sorry about the formatting
On 8/2/2010 5:42 PM, Mark Lawrence wrote:
On 02/08/2010 00:08, candide wrote:
Python is an object oriented langage (OOL). The Python main
implementation is written in pure and old C90. Is it for historical
reasons?
C is not an OOL and C++ strongly is. I wonder if it wouldn't be more
suitable
On Aug 5, 2010, at 11:20 AM, Brandon McCombs wrote:
so I missed a few lines, so sue me.
The problem is that when you don't post a self contained example
there is no proper way to answer your question, since the problem
could be outside the part you posted.
already aware. I reformatted tabs to
How does x is not None make any sense? not x is None does make sense.
I can only surmise that in this context (preceding is) not is not a
unary right-associative operator, therefore:
x is not None === IS_NOTEQ(X, None)
Beside not in which seems to work similarly, is there other
syntactical
On 2010-08-05, Brandon McCombs n...@none.com wrote:
class Elevator(Process):
def __init__(self,name):
Process.__init__(self,name=name)
self.numPassengers = 0
self.passengerList = []
self.passengerWaitQ = []
self.currentFloor = 1
self.idle = 1
On Aug 5, 2010, at 5:42 PM, wheres pythonmonks wrote:
How does x is not None make any sense? not x is None does make
sense.
I can only surmise that in this context (preceding is) not is not a
unary right-associative operator, therefore:
x is not None === IS_NOTEQ(X, None)
Beside not in
wheres pythonmonks wrote:
How does x is not None make any sense? not x is None does make sense.
I can only surmise that in this context (preceding is) not is not a
unary right-associative operator, therefore:
x is not None === IS_NOTEQ(X, None)
Beside not in which seems to work similarly, is
wheres pythonmonks wherespythonmo...@gmail.com writes:
How does x is not None make any sense?
In two ways: partly from the fact that Python syntax is preferentially
designed to be reasonably readable to a native English reader; and
partly because it makes for more obvious semantics.
‘is not’
Well, I am not convinced of the equivalence of not None and true:
not None
True
3 is True;
False
3 is not None
True
P.S. Sorry for the top-post -- is there a way to not do top posts from
gmail? I haven't used usenet since tin.
On Thu, Aug 5, 2010 at 11:56 AM, Roald de Vries
On Thu, Aug 5, 2010 at 8:42 AM, wheres pythonmonks
wherespythonmo...@gmail.com wrote:
How does x is not None make any sense? not x is None does make sense.
I can only surmise that in this context (preceding is) not is not a
unary right-associative operator, therefore:
x is not None ===
On Thu, Aug 5, 2010 at 8:56 AM, Roald de Vries downa...@gmail.com wrote:
On Aug 5, 2010, at 5:42 PM, wheres pythonmonks wrote:
How does x is not None make any sense? not x is None does make sense.
I can only surmise that in this context (preceding is) not is not a
unary right-associative
Hello everyone,
thanks for all the suggestions. I did effort to redesign parts of the
data structure the last days, but not all (only those I could easily
keep track of in my code).
For the rest I add +1 before the presentation and comment it. Seems
the easiest way now.
Andreas
--
On Thu, Aug 5, 2010 at 8:42 AM, wheres pythonmonks
wherespythonmo...@gmail.com wrote:
How does x is not None make any sense? not x is None does make sense.
I can only surmise that in this context (preceding is) not is not a
unary right-associative operator, therefore:
x is not None ===
On 5 Αύγ, 11:55, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Wed, 4 Aug 2010 16:40:45 -0700 (PDT), Íßêïò
nikos.the.gr...@gmail.com declaimed the following in
gmane.comp.python.general:
for entry in row:
entry = datetime.datetime.strftime(
On Jul 24, 6:42 pm, Emmy Noether emmynoeth...@gmail.com wrote:
I have already spent 4 hours scanning/processing to a stage where I
got a decent OCR which needs hand-verification of pages. I need 4 or 8
volunteers depending on whether one want to do two pages each or 1
page each. Its an hour of
On Aug 5, 2010, at 6:11 PM, Chris Rebert wrote:
On Thu, Aug 5, 2010 at 8:56 AM, Roald de Vries downa...@gmail.com
wrote:
On Aug 5, 2010, at 5:42 PM, wheres pythonmonks wrote:
How does x is not None make any sense? not x is None does
make sense.
I can only surmise that in this context
John Posner wrote:
On 8/5/2010 12:33 AM, John Nagle wrote:
There's got to be a better way to do this:
def editmoney(n) :
return((,.join(reduce(lambda lst, item : (lst + [item]) if
item else lst,
re.split(r'(\d\d\d)',str(n)[::-1]),[])))[::-1])
Here's a more elegant variant, using regexp
Roald de Vries wrote:
div class=moz-text-flowed style=font-family: -moz-fixedOn Aug 5,
2010, at 5:42 PM, wheres pythonmonks wrote:
How does x is not None make any sense? not x is None does make
sense.
I can only surmise that in this context (preceding is) not is not a
unary right-associative
Roald de Vries wrote:
On Aug 5, 2010, at 5:42 PM, wheres pythonmonks wrote:
How does x is not None make any sense? not x is None does make
sense.
I can only surmise that in this context (preceding is) not is not a
unary right-associative operator, therefore:
x is not None === IS_NOTEQ(X,
Hi,
is it possible to pass pointer to a method using ctypes. Sample code:
...
G_set_error_routine(byref(self._print_error))
...
def _print_error(self, msg, type):
!Redirect stderr
self.log.write(msg)
gives me
G_set_error_routine(byref(self._print_error))
I'm building an elevator simulator for a class assignment. I recently ran
into a roadblock and don't know how to fix it. For some reason, in my
checkQueue function below, the call to self.goUp() is never executed. It is
on the last line of code I pasted in. I can put print statements before
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:
OK, I have a copy of KR 2nd Ed on a shelf within reach here. Can you point
out some behaviour that C programmers might need to rely on, that is not
specified in that document?
C has all kinds of undefined behavior. Might need to
Hi.
I am using a postinstall-script like this:
setup(
...
scripts=['scripts\install.py'],
options = {
...
bdist_wininst : {
install_script : install.py,
...
},
}
)
According to the docs in [1] this script is
a) called after install
On 8/5/2010 12:36 PM, MRAB wrote:
You don't need to reverse the string:
def thous_format(integer_string):
add comma thousands separator(s) to an integer-valued string
return re.sub(r(?=\d)(?=(?:\d\d\d)+$), ,, integer_string)
Nice! My first encounter with a look-behind! It
On 5 Aug., 20:26, Nils andresen.n...@googlemail.com wrote:
According to the docs in [1] [...]
and with [1] I meant
http://docs.python.org/distutils/builtdist.html#the-postinstallation-script
Nils
--
http://mail.python.org/mailman/listinfo/python-list
Hey i made it! :-)
dataset = cursor.fetchall()
for row in dataset:
print ( ''' tr ''' )
date = row[2].strftime( '%d %b, %H:%M' )
print ( ''' td %s /td td %s /td td %s /td ''' %
( row[0], row[1], date ) )
Unfortunately had to ditch the 'for entry in row' line because
couldn't
On 08/05/10 13:52, Νίκος wrote:
dataset = cursor.fetchall()
for row in dataset:
print ( '''tr ''' )
date = row[2].strftime( '%d %b, %H:%M' )
print ( '''td %s/td td %s/td td %s/td ''' %
( row[0], row[1], date ) )
Unfortunately had to ditch the 'for entry in
On Thu, 05 Aug 2010 12:23:35 +0100, Chris Withers wrote:
...then the output is indeed captured. So, what is svn doing
differently? How is it escaping its jail?
maybe it does not read from stdin but directly from /dev/tty
But why only the request for auth credentials?
So that you can do
On Thu, 05 Aug 2010 10:50:21 -0700, Martin Landa wrote:
is it possible to pass pointer to a method using ctypes.
I don't know about methods, but it works for functions.
Sample code:
...
G_set_error_routine(byref(self._print_error))
This won't work; you have to be more explicit,
On Aug 1, 9:34 pm, Albert Hopkins mar...@letterboxes.org wrote:
On Mon, 2010-08-02 at 01:08 +0200, candide wrote:
I would propose that in fact most programming languages are implemented
in C. Sun's (Oracle's) Java compiler and runtime are written in ANSI C.
The core of the Gnu Compiler
On 5 Αύγ, 22:09, Tim Chase python.l...@tim.thechases.com wrote:
On 08/05/10 13:52, Νίκος wrote:
dataset = cursor.fetchall()
for row in dataset:
print ( '''tr ''' )
As i have it the returned 'dataset' is stored line per line to 'row'.
So,
'dataset' in here is a 'list of tuples'
Steven D'Aprano wrote:
On Thu, 05 Aug 2010 00:22:57 -0700, geremy condra wrote:
locale.setlocale(locale.LC_ALL, )
'de_DE.UTF-8'
print locale.currency(13535, grouping=True)
13.535,00 €
print locale.format(%d, 13535, grouping=True)
13.535
Peter
I had literally no idea this existed.
I have a block of test code, where I am trying to raise and catch my own user
defined exception
class NetActiveError(RuntimeError):
def __init__(self,error):
self.args = error
def a():
try:
fh = open(me.txt, r)
except Exception as (errno, errText):
print
On Thu, Aug 5, 2010 at 9:07 AM, wheres pythonmonks
wherespythonmo...@gmail.com wrote:
Well, I am not convinced of the equivalence of not None and true:
not None
True
3 is True;
False
3 is not None
True
P.S. Sorry for the top-post -- is there a way to not do top posts from
gmail? I
What makes you think it has to do with user-defined exceptions?
try :
...raise Exception(hello)
... except Exception as (errno, errText) :
... print whatever
...
Traceback (most recent call last):
ValueError: need more than 1 values to unpack
An Exception is an object, not a tuple of
Paul Rubin:
C has all kinds of undefined behavior. Might need to rely on is not
relevant for this kind of issue. Ada's designers had the goal that that
Ada programs should have NO undefined behavior.
Ada achieves this by describing a long list of implementation defined
behaviour (Annex
On Thu, 05 Aug 2010 17:07:53 +0100, wheres pythonmonks
wherespythonmo...@gmail.com wrote:
Well, I am not convinced of the equivalence of not None and true:
not None
True
3 is True;
False
3 is not None
True
You're not testing for equivalence there, you're testing for identity.
is
okay - but why does the response come back like
No such file or directory
def b
('n', 'e', 't', ' ', 'a', 'l', 'r', 'e', 'a', 'd', 'y', ' ', 'r', 'u', 'n',
'n', 'i', 'n', 'g')
On Aug 5, 2010, at 5:49 PM, Benjamin Kaplan wrote:
What makes you think it has to do with user-defined exceptions?
On 08/05/10 16:01, Νίκος wrote:
On 5 Αύγ, 22:09, Tim Chasepython.l...@tim.thechases.com wrote:
dataset = cursor.fetchall()
for row in dataset:
print ( '''tr''' )
So, 'dataset' in here is a 'list of tuples' right? and 'row'
in here is a tuple form the above list of tuples right?
In article i3e43n$v7...@lust.ihug.co.nz,
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote:
In message roy-6bcfa7.22564104082...@news.panix.com, Roy Smith wrote:
C++, for all its flaws, had one powerful feature which made it very
popular. It is a superset of C.
Actually, it
1 - 100 of 271 matches
Mail list logo