On Wed, 03 Sep 2008 22:20:43 -0700, Mensanator wrote:
> On Sep 3, 8:30�pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Wed, 03 Sep 2008 16:20:39 -0700, Mensanator wrote:
>> sum([])
>> > 0
>>
>> > is a bug, just as it's a bug in Excel to evaluate blank cells as 0.
>>
Mensanator wrote:
No it isn't. Nothing is not 0, check with MS-Access, for instance:
Null + 1 returns Null. Any arithmetic expression involving a
Null evaluates to Null. Adding something to an unknown returns
an unknown, as it should.
It is a logical fallacy to equate unknown with 0.
http://
On Sep 4, 12:20�am, Mensanator <[EMAIL PROTECTED]> wrote:
> On Sep 3, 8:30 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > On Wed, 03 Sep 2008 16:20:39 -0700, Mensanator wrote:
> > sum([])
> > > 0
>
> > > is a bug, just as it's a bug in Excel to evaluate blank cells a
On 3 Sep., 18:34, Michael Palmer <[EMAIL PROTECTED]> wrote:
> As anyone knows, the state of Python GUI programming is a little
> fractured at this time, with many toolkits, wrappers and meta-wrappers
> dead and alive, with or without documentation.
A few thoughts.
1) This topic is discussed here
On Sep 3, 8:30�pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 03 Sep 2008 16:20:39 -0700, Mensanator wrote:
> sum([])
> > 0
>
> > is a bug, just as it's a bug in Excel to evaluate blank cells as 0. It
> > should return None or throw an exception like sum([None,1])
Download movies
http://gpirate.com
http://www.gpirate.com/search?hl=en&q=naruto+shippuden&btnG=Search
--
http://mail.python.org/mailman/listinfo/python-list
www.hrconsultant.tk
--
http://mail.python.org/mailman/listinfo/python-list
Quoting Laszlo Nagy <[EMAIL PROTECTED]>:
> [EMAIL PROTECTED] wrote:
> > Empty Python lists [] don't know the type of the items it will
> > contain, so this sounds strange:
> >
> >
> sum([])
>
> > 0
> >
> > Because that [] may be an empty sequence of someobject:
> >
>
> Y
On Sep 4, 12:26 am, bukzor <[EMAIL PROTECTED]> wrote:
> I'm trying to optimize my number of connections by not fully
> initializing (read: not connecting) my connection until it's used in
> some way.
I had the same use case and I solved with a simple property. Here is
the code
I have for pymssql:
En Wed, 03 Sep 2008 07:36:30 -0300, Corrado Gioannini <[EMAIL PROTECTED]>
escribi�:
On Tue, Sep 02, 2008 at 04:50:15PM -0300, Gabriel Genellina wrote:
> messg = email.message.Message()
Replace this line with:
messg = email.mime.multipart.MIMEMultipart()
*OR*
Set the Content-Type header to "m
On Sep 3, 10:46 pm, Ripter <[EMAIL PROTECTED]> wrote:
> I found this script
> athttp://www.pygame.org/wiki/LazyImageLoading?parent=CookBook
> And I can't quite figure out how it works. I was wondering if someone
> could clarify it for me.
> The Code is:
>
> import pygame
> import weakref
>
> class
I found this script at
http://www.pygame.org/wiki/LazyImageLoading?parent=CookBook
And I can't quite figure out how it works. I was wondering if someone
could clarify it for me.
The Code is:
import pygame
import weakref
class ResourceController(object):
def __init__(self, loader):
se
On Sep 3, 7:13 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Wed, 03 Sep 2008 21:51:59 -0300, Sean DiZazzo <[EMAIL PROTECTED]>
> escribi :
>
> > I'm trying to find a way to get a list of all the installed programs
> > on a Windows box via Python. I thought of a few hacks that might
> >
Steven D'Aprano wrote:
> On Thu, 04 Sep 2008 01:22:22 +0100, Alexander Schmolck wrote:
>
>> It seems to me that the right choice for thousands seperator is the
>> apostrophe.
>
> You mean the character already used as a string delimiter?
Hey - I just found a new use for the backtick!
123`456`7
Rex wrote:
Hello,
I am working on an academic research project where I need to log in to
a website (www.lexis.com) over HTTPS and execute a bunch of queries to
gather a data set. I just discovered the mechanize module, which seems
great because it's a high-level tool. However, I can't find any d
En Wed, 03 Sep 2008 21:51:59 -0300, Sean DiZazzo <[EMAIL PROTECTED]>
escribi�:
I'm trying to find a way to get a list of all the installed programs
on a Windows box via Python. I thought of a few hacks that might
partially work, and then thought about "Add/Remove Programs" Seems
like the rig
Sean DiZazzo wrote:
Hi all,
I'm trying to find a way to get a list of all the installed programs
on a Windows box via Python. I thought of a few hacks that might
partially work, and then thought about "Add/Remove Programs" Seems
like the right way to go. I looked over the pywin32 docs a bit,
En Wed, 03 Sep 2008 21:34:35 -0300, Derek Martin <[EMAIL PROTECTED]>
escribi�:
On Wed, Sep 03, 2008 at 03:16:00PM -0700, Dennis Lee Bieber wrote:
On Wed, 3 Sep 2008 03:09:18 -0400, Derek Martin <[EMAIL PROTECTED]>
declaimed the following in comp.lang.python:
> struct run {
>int speed;
>
Hello,
I am working on an academic research project where I need to log in to
a website (www.lexis.com) over HTTPS and execute a bunch of queries to
gather a data set. I just discovered the mechanize module, which seems
great because it's a high-level tool. However, I can't find any decent
documen
Michael Palmer wrote:
So far, development of PyGUI seems to be a one-man effort, and it may
be slowed down by the attempt to develop the API and the
implementations concurrently. Could it be useful to uncouple the two,
such that the API would be specified ahead of the implementation?
I'm not s
En Wed, 03 Sep 2008 07:16:12 -0300, Tim Golden <[EMAIL PROTECTED]>
escribi�:
Gabriel Genellina wrote:
En Wed, 03 Sep 2008 06:16:03 -0300, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> escribi�:
When I try to run the same thing on windows I get
IOError: [Error 9] Bad file descriptor
How can I make
On Thu, 04 Sep 2008 01:22:22 +0100, Alexander Schmolck wrote:
> It seems to me that the right choice for thousands seperator is the
> apostrophe.
You mean the character already used as a string delimiter?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 03 Sep 2008 16:20:39 -0700, Mensanator wrote:
sum([])
> 0
>
> is a bug, just as it's a bug in Excel to evaluate blank cells as 0. It
> should return None or throw an exception like sum([None,1]) does.
You're wrong, because 99.9% of the time when users leave a blank cell in
Excel, t
Alexander Schmolck:
> It also reads well, unlike the underscore
> which is visually obstrusive and ugly (compare 123'456'890 to 123_456_789).
I like that enough, in my language that symbol is indeed the standard
one to separate thousands, in large numbers. It's light, looks
natural, and as you say
Hi all,
I'm trying to find a way to get a list of all the installed programs
on a Windows box via Python. I thought of a few hacks that might
partially work, and then thought about "Add/Remove Programs" Seems
like the right way to go. I looked over the pywin32 docs a bit, but
nothing slapped me
On Wed, Sep 03, 2008 at 03:16:00PM -0700, Dennis Lee Bieber wrote:
> On Wed, 3 Sep 2008 03:09:18 -0400, Derek Martin <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> >
> > struct run {
> > int speed;
> > direction_type direction;
> > };
> >
> > Not a function. Desc
On Wed, Sep 3, 2008 at 8:57 PM, Kevin McKinley <[EMAIL PROTECTED]> wrote:
> Below i've put the code for a program that i wrote. I need help on lines
> 384-403. If you run this program you will notice on the first tab when have
> it produce an answer the $ is surrounded with {$}. How can i get
Ben Finney <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] writes:
>
>> For Python 2.7/3.1 I'd now like to write a PEP regarding the
>> underscores into the number literals, like: 0b_0101_, 268_435_456
>> etc.
>
> +1 on such a capability.
>
> -1 on underscore as the separator.
>
> When you pro
Below i've put the code for a program that i wrote. I need help on lines
384-403. If you run this program you will notice on the first tab when have it
produce an answer the $ is surrounded with {$}. How can i get rid of that?
from Tkinter import *
class MyApp:
def __init__(self, paren
On Sep 3, 7:48 am, [EMAIL PROTECTED] wrote:
> Empty Python lists [] don't know the type of the items it will
> contain, so this sounds strange:
>
> >>> sum([])
>
> 0
>
> Because that [] may be an empty sequence of someobject:
>
> >>> sum(s for s in ["a", "b"] if len(s) > 2)
>
> 0
>
> In a staticall
On Sep 4, 3:11 am, Mudcat <[EMAIL PROTECTED]> wrote:
[snip]
> However, now that I've got all that working I'd like to simply take
> the unicode data from the xml parser and then pass it directly into
> the database (which is currently set up for unicode data). I've run
What database? What does "s
On Sep 3, 2:18 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Empty Python lists [] don't know the type of the items it will
> > contain, so this sounds strange:
>
> sum([])
>
> > 0
>
> > Because that [] may be an empty sequence of someobject:
>
> You are right in th
Le Wednesday 03 September 2008 19:38:13 Bruno Desthuilliers, vous avez écrit :
> FWIW, if there's no computation on getting or setting value, you can
> make it a plain attribute.
Yes, this is the problem with these tiny examples, we don't know at which
point we must simplify them...
>
> But whil
Laszlo Nagy:
> I believe that there have been excessive discussions about this
> decision, and the current implementation is very good, if not the best.
I see. But note that my post is mostly about the max()/min()
functions :-)
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-lis
On Sep 3, 8:18 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Empty Python lists [] don't know the type of the items it will
> > contain, so this sounds strange:
>
> sum([])
>
> > 0
>
> > Because that [] may be an empty sequence of someobject:
>
> You are right in th
Any interest in pursuing/developing/working together on a mmaped-xml
class? Faster, not readable in text editor.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 3, 8:09 pm, Scott <[EMAIL PROTECTED]> wrote:
> Let's say I have an object:
>
> class foo():
> def create_another()
> return foo()
>
> def blah():
> x = self.create_another()
> ... do something with X
>
> Now I create a inherited class of this object:
>
> class bar(
On Sep 3, 1:02 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> bukzor a écrit :
> (snip)
>
> > Thanks for the reply. Just to see it not work, I tried to remove
> > __getattribute__ from LateInitMixIn, but couldn't get it to work.
>
> ??? Sorry, I don't get what you mean...
Since you said __ge
On Wed, 2008-09-03 at 13:36 -0700, bruce wrote:
> morning
>
> i apologize up front as this is really more of an xpath question..
>
> in my python, i'm using the xpath function to iterate/parse some html. i can
> do something like
>
> s=d.xpath("//tr/td/text()")
> count=len(s)
>
> and get th
On Tue, Sep 02, 2008 at 04:50:15PM -0300, Gabriel Genellina wrote:
> > messg = email.message.Message()
>
> Replace this line with:
> messg = email.mime.multipart.MIMEMultipart()
> *OR*
> Set the Content-Type header to "multipart/mixed" *before* anything else.
thanks Gabriel!
i coudn't have thou
Berco Beute:
> I wonder what it would take to implement Python in JavaScript so it
> can run on those fancy new JavaScript VM's such as Chrome's V8 or
> Firefox' tracemonkey. Much the same as Python implementations in C#
> (IronPython) and Java (Jython). It would certainly bring back the fun
> in w
bukzor a écrit :
(snip)
Thanks for the reply. Just to see it not work, I tried to remove
__getattribute__ from LateInitMixIn, but couldn't get it to work.
??? Sorry, I don't get what you mean...
My Base class is a C class (_mysql.connection from MySQLdb) that
sometimes segfaults if you try t
On Sep 3, 8:41 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> SimonPalmer a écrit :
>
> > Apologies in advance if this is either a) the wrong board or b) been
> > answered a million times elsewhere, but...
>
> > I have been given an assignment to get a python module up and running
> > behind
Roy Smith:
> But, along those lines, I've often thought that split() needed a way to not
> just limit the number of splits, but to also throw away the extra stuff.
> Getting the first N fields of a string is something I've done often enough
> that refactoring the slicing operation right into the sp
I wonder what it would take to implement Python in JavaScript so it
can run on those fancy new JavaScript VM's such as Chrome's V8 or
Firefox' tracemonkey. Much the same as Python implementations in C#
(IronPython) and Java (Jython). It would certainly bring back the fun
in web application developm
On Wed, 3 Sep 2008, bruce wrote:
[...]
and get the number of total nodes...
by subtracting, i can get the number of nodes, without text.. is there an
easier way??!!
[...]
Yes -- don't use XPath :-)
John
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2 Sep 2008, bruce wrote:
[...]
using mechanize/Browser, i can easily do a url/get, and process submitting a
form that uses a GET as the action. however, I'm not quite sure how to
implement the submittal of a form, that uses the POST action.
[...]
Same way as any other form.
The HTTP me
On Sep 3, 12:19 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> bukzor a écrit :
>
> > I want to make a MixIn class that waits to initialize its super-
> > classes until an attribute of the object is accessed. Not generally
> > useful, but desirable in my case. I've written this, and it works,
On Mon, 1 Sep 2008, bruce wrote:
[...]
how can i
[...]
libxml2dom
[...]
Just a general point: try lxml.etree instead? Friendlier API.
John
--
http://mail.python.org/mailman/listinfo/python-list
SimonPalmer a écrit :
Apologies in advance if this is either a) the wrong board or b) been
answered a million times elsewhere, but...
I have been given an assignment to get a python module up and running
behind an existing web site. At the moment the rest of the site is
developed in PHP but the
bukzor a écrit :
I want to make a MixIn class that waits to initialize its super-
classes until an attribute of the object is accessed. Not generally
useful, but desirable in my case. I've written this, and it works, but
would like to take any suggestions you guys have.
You shouldn't mess with
Michael Palmer wrote:
> As anyone knows, the state of Python GUI programming is a little
> fractured at this time, with many toolkits, wrappers and meta-wrappers
> dead and alive, with or without documentation.
How about Dabo? http://www.dabodev.com/
--
--OKB (not okblacke)
Brendan Ba
Apologies in advance if this is either a) the wrong board or b) been
answered a million times elsewhere, but...
I have been given an assignment to get a python module up and running
behind an existing web site. At the moment the rest of the site is
developed in PHP but the hosts have said they wi
I want to make a MixIn class that waits to initialize its super-
classes until an attribute of the object is accessed. Not generally
useful, but desirable in my case. I've written this, and it works, but
would like to take any suggestions you guys have. I've commented out
the "delattr" call because
In article <[EMAIL PROTECTED]>,
Peter Otten <[EMAIL PROTECTED]> wrote:
> Roy Smith wrote:
>
> > In article <[EMAIL PROTECTED]>,
> > Peter Otten <[EMAIL PROTECTED]> wrote:
> >
> >> > I might take it one step further, however, and do:
> >> >
> >> >> fields = line.split()[:2]
> >> >>
morning
i apologize up front as this is really more of an xpath question..
in my python, i'm using the xpath function to iterate/parse some html. i can
do something like
s=d.xpath("//tr/td/text()")
count=len(s)
and get the number of nodes that have text
i can then do something like
s=d.xpa
On Aug 26, 10:21 pm, Casey <[EMAIL PROTECTED]> wrote:
> 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
>
>
Scott a écrit :
Let's say I have an object:
s/object/class/
class foo():
def create_another()
return foo()
class Foo(object):
def create_another(self):
return Foo()
def blah():
def blah(self):
x = self.create_another()
... do something with X
ToPostMustJoinGroup22 a écrit :
I'm coming from a .NET, VB, C background.
C was good, and VB was better (with all of its libraries). Than .NET
came along and all the libraries you can require are ready to go. I
have no preference with MySQL or SQL, stored procedures or ad-hoc
queries.
SO, I'm
On Sep 3, 12:09 pm, Scott <[EMAIL PROTECTED]> wrote:
> Let's say I have an object:
>
> class foo():
> def create_another()
> return foo()
>
> def blah():
> x = self.create_another()
> ... do something with X
>
> Now I create a inherited class of this object:
>
> class bar
Steven D'Aprano wrote:
On Tue, 02 Sep 2008 18:56:48 -0500, Robert Kern wrote:
ssecorp wrote:
or why does this take so god damn long time?
Several reasons. One of which is that try: except: is slow.
I beg to differ. Setting up a try...except block is very fast. Here's an
example in Python
Maric Michaud a écrit :
Le Wednesday 03 September 2008 17:40:43 mk, vous avez écrit :
Note that if one property can really be computed from another, this kind
of thing could be considered as bad design (except if the computation is
heavy).
Hmm, why? Is the line of thinking smth like: because th
iu2 wrote:
Hi guys
I do
os.system('ls &> e')
On one linux machine it emits ls output to the file e as expected.
On another linux machine it emits ls to the standard output, and
nothing to e!
Both machines run Fedora linux.
The command "ls &> e" entered at the shell (no python) behaves ok on
b
On Sep 3, 1:30 pm, LB <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to freeze a numpy based script in order to have an
> application which could run without having to install numpy and cie.
>
> Indeed, I'm not root on the targeted computer and I can't easily
> make a complete install of numpy
Michael Palmer schrieb:
I disagree with that. Meta-wrappers like this will always suffer from
problems, as they have difficulties providing a consistent api. For
example wx is said to be very windows-toolkit-centric in it's API. Yes I
know that it works under Linux with GTK, but it does not come
[EMAIL PROTECTED] wrote:
Empty Python lists [] don't know the type of the items it will
contain, so this sounds strange:
sum([])
0
Because that [] may be an empty sequence of someobject:
You are right in that sum could be used to sum arbitrary objects.
However, in 99.99% of
Let's say I have an object:
class foo():
def create_another()
return foo()
def blah():
x = self.create_another()
... do something with X
Now I create a inherited class of this object:
class bar(foo):
...
If I call bar.create_another(), it will return a foo() inst
On Sep 3, 2:40 pm, [EMAIL PROTECTED] wrote:
> Hi,
>
> I looking for a file comparison utility in Python that works like
> 'diff' command in Unix and 'comp' in Windows.
> The present 'cmd' in filecmp module only presents output in the form
> of 1 or 0 i.e whether the 2 files differ or not?
>
> So,
On Sep 3, 12:57 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Michael Palmer schrieb:
>
> > The other, PyGUI, has an even nicer API and more docs but has
> > relatively few widgets implemented at this time. It also strives for
> > compatibility with several toolkits (two at this time), which
On Wed, 3 Sep 2008 19:40:40 +0100, [EMAIL PROTECTED] wrote:
> I looking for a file comparison utility in Python that works like
> 'diff' command in Unix and 'comp' in Windows.
> The present 'cmd' in filecmp module only presents output in the form
> of 1 or 0 i.e whether the 2 files differ or not?
Hi,
I looking for a file comparison utility in Python that works like
'diff' command in Unix and 'comp' in Windows.
The present 'cmd' in filecmp module only presents output in the form
of 1 or 0 i.e whether the 2 files differ or not?
So, I'm lookin for something that generates actual differences
process wrote:
is this faster btw? I guess big doesn't help, it's only retrieved once
anyway? But is rows retrieved in every loop? the python interpreter
aint too smart?
>
def getPixels(fileName):
im = PIL.Image.open(fileName)
colors = []
r, c = im.size
big = range(0, c)
ro
The reason it takes so long is you are not using xrange
The range function iterates through the entire data set EVERY time,
regardless of whether it needs to
This increases processer use EXPONENTIALLY as that number gets larger.
I am not quite sure how xrange works, but it keeps only one number in
You can try
Import time
mytimeymd = time.strftime('%y%m%d')
print mytimeymd
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
frankrentef
Sent: Wednesday, September 03, 2008 1:21 PM
To: python-list@python.org
Subject: Using strftime
I have one line of c
Hi,
I would like to freeze a numpy based script in order to have an
application which could run without having to install numpy and cie.
Indeed, I'm not root on the targeted computer and I can't easily
make a complete install of numpy and scipy.
So I decided to test the freeze.py tool shipped
I have one line of code that put's an old date in my code.
ie.textBoxSet('_ct10_PlaceHolder_txtEnd', '8/15/2008')
What I wish to do in another similiar line is have the field populated
with the current system date? How best to do this? I've read some of
the strftime documentation but as of y
In short what I'm trying to do is read a document using an xml parser
and then upload that data back into a database. I've got the code more
or less completed using xml.etree.ElementTree for the parser and dbi/
odbc for my db connection.
To fix problems with unicode I built a work-around by mappin
On Wed, 03 Sep 2008 03:09:18 -0400, Derek Martin wrote:
> On Wed, Sep 03, 2008 at 06:40:10AM +, Marc 'BlackJack' Rintsch
> wrote:
>> On Tue, 02 Sep 2008 19:54:12 -0400, Derek Martin wrote:
>>
>> >> And if they model an action there must be some way to activate the
>> >> action
>> >
>> > That
> Using Python. I found "Dive Into Python" which I will be reading shortly
The title of the book is good advice all by itself. Especially with
prior programming experience, you'll get started very quickly. What
will take longer is the assimilation of some of python's neater and
more idiomatic
2008/9/3 ToPostMustJoinGroup22 <[EMAIL PROTECTED]>:
> Any suggestions for someone new to the scene like me?
Welcome!
There's a number of resources that you might find useful here:
http://wiki.python.org/moin/BeginnersGuide
--
Cheers,
Simon B.
--
http://mail.python.org/mailman/listinfo/python-li
Michael Palmer schrieb:
As anyone knows, the state of Python GUI programming is a little
fractured at this time, with many toolkits, wrappers and meta-wrappers
dead and alive, with or without documentation.
I've come across two projects that have the appeal of striving for
simple, pythonic APIs:
I'm coming from a .NET, VB, C background.
C was good, and VB was better (with all of its libraries). Than .NET
came along and all the libraries you can require are ready to go. I
have no preference with MySQL or SQL, stored procedures or ad-hoc
queries.
SO, I'm interested in using my Google App
As anyone knows, the state of Python GUI programming is a little
fractured at this time, with many toolkits, wrappers and meta-wrappers
dead and alive, with or without documentation.
I've come across two projects that have the appeal of striving for
simple, pythonic APIs: PyGUI and wax. The latte
Le Wednesday 03 September 2008 17:40:43 mk, vous avez écrit :
> > Note that if one property can really be computed from another, this kind
> > of thing could be considered as bad design (except if the computation is
> > heavy).
>
> Hmm, why? Is the line of thinking smth like: because the variables
On Sep 2, 12:34 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Ben Finney wrote:
> > I would argue that the precedent, already within Python, for using a
> > space to separate pieces of a string literal, is more important than
> > precedents from other programming languages.
>
> that precedent also
Thanks to everyone for answers..
*but*, if you want to add more logic in the setters, you could want to add two
extra methods :
def _setsquare(self, v) :
# some extra logic here
self._square = s
def fsetsquare(self,s):
self
Ben Finney:
> … for numbers with many digits the digits may be divided into
> groups of three by a thin space, in order to facilitate reading.
> Neither dots nor commas are inserted in the spaces between groups
> of three.
> http://www.bipm.org/en/si/si_brochure/chapter5/5-3-2.h
Xavier schrieb:
Hi,
I try to access to a Bluetooth GPS data-logger with Python. I use
pySerial.
Sending and receiving little messages (~100 char) works fine. However,
when I ask the GPS to dump the trails, it returns some Mbytes and here
is the problem : in the stream of bytes, I randomly losts
Hi guys
I do
os.system('ls &> e')
On one linux machine it emits ls output to the file e as expected.
On another linux machine it emits ls to the standard output, and
nothing to e!
Both machines run Fedora linux.
The command "ls &> e" entered at the shell (no python) behaves ok on
both machines.
I tried under Linux... same problem.
So... it may comes from my little lines of code... or from my GPS.
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-09-03, Ben Finney <[EMAIL PROTECTED]> wrote:
> Another reason in support of spaces (rather than underscores) to
> separate digit groups: it's the only separator that follows the SI
> standard for representing numbers:
>
> ??? for numbers with many digits the digits may be divided into
Le Wednesday 03 September 2008 16:44:10 Maric Michaud, vous avez écrit :
> def _setsquare(self, v) :
> # some extra logic here
> self._square = s
>
> def fsetsquare(self,s):
> self._setsquare(s)
> self._setvalue =
mk a écrit :
Hello everyone,
I try to set two properties, "value" and "square" in the following code,
and arrange it in such way that setting one property also sets another
one and vice versa. But the code seems to get Python into infinite loop:
>
>>> import math
>>> class Squared2(object)
mk schrieb:
Hello everyone,
I try to set two properties, "value" and "square" in the following code,
and arrange it in such way that setting one property also sets another
one and vice versa. But the code seems to get Python into infinite loop:
>>> import math
>>> class Squared2(object):
Le Wednesday 03 September 2008 15:57:50 mk, vous avez écrit :
> I try to set two properties, "value" and "square" in the following code,
> and arrange it in such way that setting one property also sets another
> one and vice versa. But the code seems to get Python into infinite loop:
>
> >>> impor
On Wed, 3 Sep 2008 14:31:17 + (UTC), Wojtek Walczak wrote:
> class Square(object):
>def __init__(self, val):
> self._square = pow(val, 2)
> self._value = math.sqrt(self.square)
^^
or just:
self._value = val
:-)
--
Regards,
W
On Wed, 03 Sep 2008 15:57:50 +0200, mk wrote:
> I try to set two properties, "value" and "square" in the following code,
> and arrange it in such way that setting one property also sets another
> one and vice versa. But the code seems to get Python into infinite loop:
> Is there a way to achiev
Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> Peter Otten <[EMAIL PROTECTED]> wrote:
>
>> > I might take it one step further, however, and do:
>> >
>> >> fields = line.split()[:2]
>> >> a, b = map(int, fields)
>> >
>> > in fact, I might even get rid of the very generic,
On 2008-09-03, Ben Finney <[EMAIL PROTECTED]> wrote:
> Ben Finney <[EMAIL PROTECTED]> writes:
>
>> I don't see any good reason (other than your familiarity with the D
>> language) to use underscores for this purpose, and much more reason
>> (readability, consistency, fewer arbitrary differences in
On 2008-09-02, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh wrote:
>> Peter Pearson wrote:
>>
>>> (startled noises) It is a delight to find a reference to
>>> that half-century-old essay (High Finance) by the wonderful
>>> C. Northcote Parkinson, but how many readers will catch the
1 - 100 of 144 matches
Mail list logo