2008/9/3 Dennis Lee Bieber <[EMAIL PROTECTED]>:
> non-relational DBMS (if any such are still in use),
There certainly are...
>> SO, I'm interested in using my Google App space (free 500MB) to
>> develop a quick database application. Using Python. I found "Dive
>> Into Python" which I will be
Hi,
you should really read about XPath. There are also newsgroups specifically for
this topic, please use them.
bruce wrote:
> 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
castironpi wrote:
> Any interest in pursuing/developing/working together on a mmaped-xml
> class? Faster, not readable in text editor.
Any hints on what you are talking about?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a program that take a word as argument, and I would like to
link this word to a class variable.
eg.
class foo():
width = 10
height = 20
a=foo()
arg='height'
a.__argname__= new_value
rather than :
if arg == 'height':
a.height = new_value
elif arg == 'width';
a.width = new_val
On Thu, Sep 4, 2008 at 12:25 AM, Mathieu Prevot
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a program that take a word as argument, and I would like to
> link this word to a class variable.
>
> eg.
> class foo():
You should subclass 'object', so that should be:
class Foo(object):
> width = 1
Mathieu Prevot wrote:
I have a program that take a word as argument, and I would like to
link this word to a class variable.
eg.
class foo():
width = 10
height = 20
a=foo()
arg='height'
a.__argname__= new_value
rather than :
if arg == 'height':
a.height = new_value
elif arg == 'width';
En Thu, 04 Sep 2008 04:25:37 -0300, Mathieu Prevot
<[EMAIL PROTECTED]> escribi�:
I have a program that take a word as argument, and I would like to
link this word to a class variable.
eg.
class foo():
width = 10
height = 20
a=foo()
arg='height'
a.__argname__= new_value
rather than :
if
2008/9/4 Chris Rebert <[EMAIL PROTECTED]>:
> On Thu, Sep 4, 2008 at 12:25 AM, Mathieu Prevot
> <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I have a program that take a word as argument, and I would like to
>> link this word to a class variable.
>>
>> eg.
>> class foo():
>
> You should subclass 'object'
Mathieu Prevot wrote:
I'll use:
a.__setattr__(height, new_value)
that's an implementation detail. please use setattr() instead, like
everyone else.
--
http://mail.python.org/mailman/listinfo/python-list
bukzor a écrit :
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 sai
On Sep 4, 1:26 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> 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(
On 2008-09-04 07:49, Kay Schluehr wrote:
> 3) Following the public rumor mill and the latest hype RIA i.e. the
> merge of web- and desktop applications with systems like Adobe AIR,
> JavaFX, Google Gears and MS Silverlight is the future of frontend
> development. With the exception of IronPython an
Mathieu Prevot a écrit :
2008/9/4 Chris Rebert <[EMAIL PROTECTED]>:
(snip)
You're looking for the setattr() built-in function. In this exact case:
setattr(a, arg, new_value)
This is probably covered in the Python tutorial, please read it.
Regards,
Chris
Indeed.
I'll use:
a.__setattr__
CREDIT CARD DEPT
http://creditcarddept.googlepages.com
--
http://mail.python.org/mailman/listinfo/python-list
Mathieu Prevot <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a program that take a word as argument, and I would like to
> link this word to a class variable.
>
> eg.
> class foo():
>width = 10
>height = 20
>
> a=foo()
> arg='height'
> a.__argname__= new_value
Not quite sure what
Bruno Desthuilliers wrote:
> You wouldn't write something like 2.__add__(3), would you ?
Don't give the "it's only OO if I write obj.method(args)" crowd more bad
ideas, please ;-)
(...as Bruno implies, setattr(), len() et al can be and should be viewed
as generic functions. A specific Pytho
On 4 Sep., 10:31, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote:
> On 2008-09-04 07:49, Kay Schluehr wrote:
>
> > 3) Following the public rumor mill and the latest hype RIA i.e. the
> > merge of web- and desktop applications with systems like Adobe AIR,
> > JavaFX, Google Gears and MS Silverlight is th
On Tue, 02 Sep 2008 13:07:33 -0400, Joe Riopel wrote:
> On Tue, Sep 2, 2008 at 12:55 PM, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> Is there a better way of doing this than the way I am going about it?
>
> Would the logging module help, and just print the output to the stdout
> (or a file) i
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> 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?
Yup. No ambiguity or problem here; in
+
+
+
+
+++ GUENSTIGE KREDITE ONLINE +++ KREDITE IM INTERNET OHNE SCHUFA +++
+
+
+
+
+
+
--
http://mail.python.org/mailman/listinfo/python-list
+
+
+
+
+++ GUENSTIGE KREDITE ONLINE +++ KREDITE IM INTERNET OHNE SCHUFA +++
+
+
http://kredite-online-244.info
+
+
+
+
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> A problem is that '1234' in Python is a string, so using ' in numbers
> looks a bit dangerous to me (and my editor will color those numbers as
> alternated strings, I think).
Yeah, editors, especially those with crummy syntax highlighting (like emacs)
might get it wron
Hi all, I want to modify the method that set use for see if there is
already an object inside its obj-list. Something like this:
class foo: pass
bar1 = foo()
bar1.attr = 1
bar2 = foo()
bar2.attr = 1
set( (bar1, bar2), key=lambda o: o.attr)
and, of course, set has only one value.
It's possibl
On Thu, 04 Sep 2008 11:48:18 +0200, Michele Petrazzo wrote:
> Hi all, I want to modify the method that set use for see if there is
> already an object inside its obj-list. Something like this:
...
> It's possible?
As far as I understand you, you need descriptors:
http://users.rcn.com/python/downlo
Ciao, Michele:
On Thu, Sep 4, 2008 at 11:48 AM, Michele Petrazzo
<[EMAIL PROTECTED]> wrote:
> Hi all, I want to modify the method that set use for see if there is
> already an object inside its obj-list. Something like this:
>
> class foo: pass
>
> bar1 = foo()
> bar1.attr = 1
>
> bar2 = foo()
> b
On Thu, Sep 4, 2008 at 11:58 AM, Wojtek Walczak <[EMAIL PROTECTED]> wrote:
> On Thu, 04 Sep 2008 11:48:18 +0200, Michele Petrazzo wrote:
>> Hi all, I want to modify the method that set use for see if there is
>> already an object inside its obj-list. Something like this:
> ...
>> It's possible?
>
>
What would you suggest to check python programs for non-syntax error.
One example I could think of that one might forget to "return" a value from
a function.
How could I check for these and maybe other mistakes?
--
http://mail.python.org/mailman/listinfo/python-list
online credit ohne in Landau sofortkredit kredit online vergleich
beamtendarlehen ohne schufa handy ohne schufa kredite ohne
schufaauskunft kredit vergleich geld kredit ohne schufa kredit aus der
schweiz autofinanzierung ohne schufa kreditkarten ohne schufa
guenstiger kredit kredit online zusage kr
On Sep 4, 5:05 am, Poster28 <[EMAIL PROTECTED]> wrote:
> What would you suggest to check python programs for non-syntax error.
> One example I could think of that one might forget to "return" a value from
> a function.
>
> How could I check for these and maybe other mistakes?
Check out PyLint (htt
sofort kredit online in Cochem geld kredite bank kredite Guenstige
Kredide online ohne SCHUFA kredit ohne schufa oesterreich
beamtendarlehen ohne schufa schweizer kredit barkredit online
umschuldung online blitzkredite schweizer kredit online kredite fuer
selbstaendige online kredit trotz bar kredi
On 2008-09-04 11:14, Kay Schluehr wrote:
> On 4 Sep., 10:31, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote:
>> On 2008-09-04 07:49, Kay Schluehr wrote:
>>
>>> 3) Following the public rumor mill and the latest hype RIA i.e. the
>>> merge of web- and desktop applications with systems like Adobe AIR,
>>>
On Thu, 04 Sep 2008 12:05:45 +0200, Poster28 wrote:
> What would you suggest to check python programs for non-syntax error.
> One example I could think of that one might forget to "return" a value from
> a function.
>
> How could I check for these and maybe other mistakes?
Check pychecker or figle
On 3 Sep, 16:33, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> 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
On Thu, Sep 4, 2008 at 12:16 AM, Dennis Lee Bieber
<[EMAIL PROTECTED]> wrote:
> On Wed, 3 Sep 2008 09:52:06 -0700 (PDT), ToPostMustJoinGroup22
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
>> have no preference with MySQL or SQL, stored procedures or ad-hoc
>> queries.
>>
>
Mensanator <[EMAIL PROTECTED]> wrote:
> No, but blank cells are 0 as far as Excel is concerned.
> That behaviour causes nothing but trouble and I am
> saddened to see Python emulate such nonsense.
Then you should feel glad that the Python sum() function *does*
signal an error for the closest equi
I have 3 objects and want to save in one pickle file.
I used cPickle to dump 3 objects in a pkl file
i.e cPickle.dump(object1, fileobject, -1)
cPickle.dump(object2, fileobject, -1)
cPickle.dump(object3, fileobject, -1)
I have changed the 3rd object a
Let's say I've a class a, where I can write:
--
Marco Bizzarri
http://notenotturne.blogspot.com/
http://iliveinpisa.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Sep 4, 2008 at 3:45 PM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote:
> On 2008-09-04 11:14, Kay Schluehr wrote:
> > On 4 Sep., 10:31, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote:
> >> On 2008-09-04 07:49, Kay Schluehr wrote:
> >>
> >>> 3) Following the public rumor mill and the latest hype RIA i
Marco Bizzarri wrote:
> Let's say I've a class a, where I can write:
Anticipating this obviously premature posting:
http://dirtsimple.org/2004/12/python-is-not-java.html
Diez
--
http://mail.python.org/mailman/listinfo/python-list
gopal mishra wrote:
I have 3 objects and want to save in one pickle file.
I used cPickle to dump 3 objects in a pkl file
i.e cPickle.dump(object1, fileobject, -1)
cPickle.dump(object2, fileobject, -1)
cPickle.dump(object3, fileobject, -1)
I have chang
On Thu, Sep 4, 2008 at 1:00 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> Marco Bizzarri wrote:
>
>> Let's say I've a class a, where I can write:
>
> Anticipating this obviously premature posting:
>
> http://dirtsimple.org/2004/12/python-is-not-java.html
>
> Diez
> --
> http://mail.python.org/m
Sorry... pressed enter but really didn't want to.
As I said, let's say I have a class
class A:
def __init__(self):
self.x = None
Python makes the decision to allow the developers to directly access
the attribute "x", so that they can directly write: "a.x = 1", or
whatever; this h
Michele Petrazzo wrote:
> Hi all, I want to modify the method that set use for see if there is
> already an object inside its obj-list. Something like this:
>
> class foo: pass
>
> bar1 = foo()
> bar1.attr = 1
>
> bar2 = foo()
> bar2.attr = 1
>
> set( (bar1, bar2), key=lambda o: o.attr)
>
> a
> Of course, I know that while I'm fresh, I've a good knowledge of the
> code, and anything else, I will be able to avoid such stupid errors;
> however, I'm afraid of the times when I'm tired, when I have to put my
> hands on the code of someone else, and so on.
>
> Please, understand that I'm not
Marco Bizzarri a écrit :
On Thu, Sep 4, 2008 at 12:16 AM, Dennis Lee Bieber
<[EMAIL PROTECTED]> wrote:
On Wed, 3 Sep 2008 09:52:06 -0700 (PDT), ToPostMustJoinGroup22
<[EMAIL PROTECTED]> declaimed the following in
comp.lang.python:
have no preference with MySQL or SQL, stored procedures or ad-h
Hi,
I wanted to know if does exist a safe way to, given a heap, move an
arbitrary element to the first position of the heap.
Something like:
>>> heap = [0,3,6,8,10]
>>> heapq.move_to_first_position(heap, 4)
>>> heap = [10, 0,3,6,8]
--- Giampaolo
http://code.google.com/p/pyftpdlib/
--
http://m
On Thu, Sep 4, 2008 at 1:23 PM, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
>>
>> The appearance is not an RDBMS, at least, maybe it is, but under the
>> surface.
>
> Not AFAIK, cf:
> http://en.wikipedia.org/wiki/BigTable
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Thanks for
I'm not sure what you expect as an answer, but if you mean the heap as
in the data structure, you can not just arbitrarily move one key where
you want as it will destroy the heap property.
Giampaolo Rodola' wrote:
Hi,
I wanted to know if does exist a safe way to, given a heap, move an
arbitra
Le Thursday 04 September 2008 13:08:59 Gerhard Häring, vous avez écrit :
> gopal mishra wrote:
> > I have 3 objects and want to save in one pickle file.
> >
> > I used cPickle to dump 3 objects in a pkl file
> >
> > i.e cPickle.dump(object1, fileobject, -1)
> >
> > cPickle.dump(o
On 4 Set, 13:49, Alexandru Palade <[EMAIL PROTECTED]>
wrote:
> I'm not sure what you expect as an answer, but if you mean the heap as
> in the data structure, you can not just arbitrarily move one key where
> you want as it will destroy the heap property.
>
>
>
> Giampaolo Rodola' wrote:
> > Hi,
>
Hi
i have 3 python files and i want to execute the files sequentially
using the execfile command.Hence ,i have written the following program
fileList = ["a.py","b.py","c.py"]
for fileName in fileList :
execfile(fileName)
however,when i try running it,the program keeps calling execfile on
In article <[EMAIL PROTECTED]>,
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>Mathieu Prevot a écrit :
>> 2008/9/4 Chris Rebert <[EMAIL PROTECTED]>:
>
>(snip)
>
>>> You're looking for the setattr() built-in function. In this exact case:
>>>setattr(a, arg, new_value)
>>>
>>> This is probably
On Thu, 04 Sep 2008 05:03:57 -0700, moijes12 wrote:
> Hi
>
> i have 3 python files and i want to execute the files sequentially using
> the execfile command.Hence ,i have written the following program
>
>
> fileList = ["a.py","b.py","c.py"]
>
> for fileName in fileList :
> execfile(fileNa
Marco Bizzarri wrote:
looking at the source, maybe you could create a subclass of Set
redefining the __contains__ method?
Made some tries, but __contains__ are never called
>>> class foo(set):
... def __contains__(self, value):
... print value
...
>>> a = foo((1,2))
>>>
Thanks,
Michele
--
Marco Bizzarri a écrit :
Sorry... pressed enter but really didn't want to.
As I said, let's say I have a class
class A:
def __init__(self):
self.x = None
Python makes the decision to allow the developers to directly access
the attribute "x",
So do Java, if you make your attrib
Hi everyone
After a long wait of nearly 5 month, we are back in business to bring
the latest edition of The Python Papers - Volume 3 Issue 2 (http://
ojs.pythonpapers.org/index.php/tpp/issue/current).
>From this issue onwards, we will be having only 3 issues per year
instead of 4. This is in comp
2008/9/4 Fredrik Lundh <[EMAIL PROTECTED]>:
> Bruno Desthuilliers wrote:
>
>> You wouldn't write something like 2.__add__(3), would you ?
>
> Don't give the "it's only OO if I write obj.method(args)" crowd more bad
> ideas, please ;-)
>
> (...as Bruno implies, setattr(), len() et al can be and shou
Le Thursday 04 September 2008 14:31:23 Michele Petrazzo, vous avez écrit :
> Marco Bizzarri wrote:
> > looking at the source, maybe you could create a subclass of Set
> > redefining the __contains__ method?
>
> Made some tries, but __contains__ are never called
>
No, __contains__ is only called w
On Sep 4, 8:58 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi everyone
>
> After a long wait of nearly 5 month, we are back in business to bring
> the latest edition of The Python Papers - Volume 3 Issue 2 (http://
> ojs.pythonpapers.org/index.php/tpp/issue/current).
>
> From this issue on
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Tue, 02 Sep 2008 13:07:33 -0400, Joe Riopel wrote:
>
> > On Tue, Sep 2, 2008 at 12:55 PM, Steven D'Aprano
> > <[EMAIL PROTECTED]> wrote:
> >> Is there a better way of doing this than the way I am going about it?
> >
> > Would the logging module he
Assalamu'alaikum wr. wb.,
Faith Freedom Indonesia (http://www.indonesia.faithfreedom.org/forum/)
The Amazing Racist: Moslem Mosque (http://13gb.com/videos/923/)
Forum Murtadin Indonesia (http://mantanmuslim.blogspot.com/)
Wassalam
--
http://mail.python.org/mailman/listinfo/python-list
Can anyone suggest something inthat can process an XPath like the
following:
"/html/body/table[2]/tbody/tr/td[5]/table/tbody/tr[3]/td/table[3]/
tbody/tr[5]/td"
Cheers
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
for scripts that take arguments, I would like to remove the trailing
slash if it's present.
Is there something else than:
a='/usr/local/lib/'
if a[-1] == '/':
a = list(a)
a.pop()
''.join(a)
Thanks,
Mathieu
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 4, 8:25 am, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> for scripts that take arguments, I would like to remove the trailing
> slash if it's present.
>
> Is there something else than:
>
> a='/usr/local/lib/'
> if a[-1] == '/':
> a = list(a)
> a.pop()
> ''.join(a)
>
> Thanks,
2008/9/4 Mathieu Prevot <[EMAIL PROTECTED]>:
> Hi,
>
> for scripts that take arguments, I would like to remove the trailing
> slash if it's present.
>
> Is there something else than:
>
> a='/usr/local/lib/'
> if a[-1] == '/':
> a = list(a)
> a.pop()
> ''.join(a)
A dummy
a.rstrip('/')
Sorry fo
On Thu, Sep 4, 2008 at 3:25 PM, Mathieu Prevot <[EMAIL PROTECTED]> wrote:
> Hi,
>
> for scripts that take arguments, I would like to remove the trailing
> slash if it's present.
>
> Is there something else than:
>
> a='/usr/local/lib/'
> if a[-1] == '/':
> a = list(a)
> a.pop()
> ''.join(a)
>
>
On Sep 3, 9:41 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote:
> 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 2008-09-04 12:57, Banibrata Dutta wrote:
> On Thu, Sep 4, 2008 at 3:45 PM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote:
>
>> On 2008-09-04 11:14, Kay Schluehr wrote:
>>> On 4 Sep., 10:31, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote:
On 2008-09-04 07:49, Kay Schluehr wrote:
> 3) Followin
Mr. Feinberg’s giant investment fund, Cerberus Capital Management, is
racing to salvage multibillion-dollar investments in Chrysler, the
smallest of the Detroit automakers, and GMAC, the financing arm of
General Motors.
But for Cerberus, named after the mythological three-headed dog who
guards the
On Thu, Sep 4, 2008 at 3:07 PM, Maric Michaud <[EMAIL PROTECTED]> wrote:
> Le Thursday 04 September 2008 14:31:23 Michele Petrazzo, vous avez écrit :
>> Marco Bizzarri wrote:
>> > looking at the source, maybe you could create a subclass of Set
>> > redefining the __contains__ method?
>>
>> Made som
On Thu, Sep 4, 2008 at 1:19 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>
> What you are essentially asking is: why is python dynamic instead of static?
>
Most probably you're right. Maybe I will make a trip back to my
university books and take a look at them again :-)
Thanks
Marco
--
Marc
On Thu, Sep 4, 2008 at 4:39 PM, Marco Bizzarri <[EMAIL PROTECTED]> wrote:
>
> Most probably you're right. Maybe I will make a trip back to my
> university books and take a look at them again :-)
>
Meant: you *are* right. Sorry.
Saluti
Marco
--
Marco Bizzarri
http://notenotturne.blogspot.com/
ht
On Thu, Sep 4, 2008 at 2:43 PM, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
Well, Bruno, it looks like I've to wider my search in order to read
something about it. Thanks for your suggestions, in any case.
Regards
Marco
--
Marco Bizzarri
http://notenotturne.blogspot.com/
http://iliveinpi
Hi, I'm trying extract all alphabetic characters from string.
reg = re.compile('(?u)([\w\s]+)', re.UNICODE)
buf = re.match(string)
But it's doesn't work. If string starts from Cyrillic character, all
works fine. But if string starts from Latin character, match returns
only Latin characters.
Plea
Alexander Schmolck wrote:
A problem is that '1234' in Python is a string, so using ' in numbers
looks a bit dangerous to me (and my editor will color those numbers as
alternated strings, I think).
Yeah, editors, especially those with crummy syntax highlighting (like emacs)
might get it wrong.
Hi guys,
I am trying to read a binary file created by the following matlab
command:
fid=fopen('a.bin','w','b'); fwrite(fid,a,'real*8'); fclose(fid);, and
wondering how to do it in Python. I googled it but still get
confused.
'b' in fopen is for 'big-endian', 'real*8' in fwrite is for 64bit
floa
Good day all,
I am learning Python and came up to decorators.
The question is: Why does function FoodList return value None?
The code in attachment.
Thank you,
Aigars
testingVarLogger.py
Description: application/unknown-application-x-python
--
http://mail.python.org/mailman/listinfo/python-list
Aigars Aigars wrote:
Good day all,
I am learning Python and came up to decorators.
The question is: Why does function FoodList return value None?
The code in attachment.
Thank you,
Aigars
--
http://mail.python.org/mail
On Thu, 4 Sep 2008 12:06:14 +0200, Marco Bizzarri wrote:
>> As far as I understand you, you need descriptors:
>> http://users.rcn.com/python/download/Descriptor.htm
> I know descriptors a litte, Wojtek, but didn't use them often; can you
> elaborate a little more on your idea?
Marco, I think tha
In article <[EMAIL PROTECTED]>,
Aigars Aigars <[EMAIL PROTECTED]> wrote:
> Good day all,
I am learning Python and came up to decorators.
The question
> is: Why does function FoodList return value None?
Because the function doesn't return anything, and in Python
a function that doesn't explici
Aigars Aigars schrieb:
Good day all,
I am learning Python and came up to decorators.
The question is: Why does function FoodList return value None?
The code in attachment.
Because the __call__ in Logger doesn't return the value of self.func.
Diez
--
http://mail.python.org/mailman/listinfo/p
On Sep 4, 6:32 am, "Francesco Guerrieri" <[EMAIL PROTECTED]>
wrote:
> On Thu, Sep 4, 2008 at 3:25 PM, Mathieu Prevot <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> > for scripts that take arguments, I would like to remove the trailing
> > slash if it's present.
>
> > Is there something else than:
>
> > a='
"Mars creature" wrote:
I am trying to read a binary file created by the following matlab
command:
fid=fopen('a.bin','w','b'); fwrite(fid,a,'real*8'); fclose(fid);, and
wondering how to do it in Python. I googled it but still get
confused.
'b' in fopen is for 'big-endian', 'real*8' in fwrite
In article
<[EMAIL PROTECTED]>,
Mensanator <[EMAIL PROTECTED]> wrote:
> 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([])
> >
> >
In article
<[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:
>
> >>> sum(s for s in ["a", "b"] if len(s) > 2)
> 0
>
On Sep 4, 12:03 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> "Mars creature" wrote:
> > I am trying to read a binary file created by the following matlab
> > command:
> > fid=fopen('a.bin','w','b'); fwrite(fid,a,'real*8'); fclose(fid);, and
> > wondering how to do it in Python. I googled it but
> >>> so unfortunately I think I need to use __getattribute__
> >>> to do this. I'm doing all this just to make the connection not
> >>> actually connect until used.
> >> I may be dumb, but I don't get how this is supposed to solve your
> >> problem. But anyway : there's a known design pattern for
On Sep 4, 7:09 am, "Marco Bizzarri" <[EMAIL PROTECTED]> wrote:
> Sorry... pressed enter but really didn't want to.
>
> As I said, let's say I have a class
>
> class A:
> def __init__(self):
> self.x = None
>
> Python makes the decision to allow the developers to directly access
> the a
Most of you probably speaks Latin language, so you wont understand
the problem.
when I try to write Hebrew in my statictext the last punctuation marks
get mixed up.
does someone have a solution for this?
this is the code :
text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)
tha
Am Thu, 04 Sep 2008 18:03:54 +0200 schrieb Fredrik Lundh:
>
>> I am trying to read a binary file [...]
>
>
> f = open("a.bin", "rb") # read binary data
> s = f.read() # read all bytes into a string
>
> import array, sys
>
> a = array.array("f", s) # "f" for float
> if sys.byteorder != "big"
> Did you try py2exe instead offreeze? On the page
>
> http://www.py2exe.org/index.cgi/WorkingWithVariousPackagesAndModules
>
> there is only one brief mention of numpy packaging troubles,
> suggesting that it might work better. I have used py2exe in the past
> without much trouble.
Unfortunately,
On Thu, Sep 4, 2008 at 4:09 AM, Marco Bizzarri <[EMAIL PROTECTED]> wrote:
> Sorry... pressed enter but really didn't want to.
>
> As I said, let's say I have a class
>
> class A:
>def __init__(self):
> self.x = None
>
>
>
> Python makes the decision to allow the developers to directly a
On Sep 4, 11:13 am, "David C. Ullrich" <[EMAIL PROTECTED]> wrote:
> In article
> <[EMAIL PROTECTED]>,
>
>
>
>
>
> Mensanator <[EMAIL PROTECTED]> wrote:
> > On Sep 3, 2:18 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
> > > [EMAIL PROTECTED] wrote:
> > > > Empty Python lists [] don't know the type of
On Sep 4, 3:42 pm, phasma <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying extract all alphabetic characters from string.
>
> reg = re.compile('(?u)([\w\s]+)', re.UNICODE)
You don't need both (?u) and re.UNICODE: they mean the same thing.
This will actually match letters and whitespace.
> buf = re.ma
phasma wrote:
Hi, I'm trying extract all alphabetic characters from string.
reg = re.compile('(?u)([\w\s]+)', re.UNICODE)
buf = re.match(string)
But it's doesn't work. If string starts from Cyrillic character, all
works fine. But if string starts from Latin character, match returns
only Latin
On Sep 4, 2:05 am, Thomas Bellman <[EMAIL PROTECTED]> wrote:
> Mensanator <[EMAIL PROTECTED]> wrote:
> > No, but blank cells are 0 as far as Excel is concerned.
> > That behaviour causes nothing but trouble and I am
> > saddened to see Python emulate such nonsense.
>
> Then you should feel glad tha
Astley Le Jasper wrote:
> Can anyone suggest something inthat can process an XPath like the
> following:
>
> "/html/body/table[2]/tbody/tr/td[5]/table/tbody/tr[3]/td/table[3]/
> tbody/tr[5]/td"
[skipping the obvious joke answer to your question]
In case you're asking for a tool that can process
On Thu, 4 Sep 2008 10:57:35 -0700 (PDT), Mensanator wrote:
> Why then, doesn't
>
sum([A for A in [None, None, None, None, None, None] if A != None])
> 0
>
> give me an error?
Because "[A for A in [None, None, None, None, None, None] if A != None]"
returns an empty list, and sum([]) doesn't r
On Sep 3, 10:17 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> 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, w
Stefan Behnel wrote:
> Yes, learn to use XPath, e.g.
>
> //tr/td[not string()]
Oh, well...
//tr/td[not(string())]
as I said, wrong news group. ;-)
Try something like "gmane.text.xml.xpath.general", for example.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 190 matches
Mail list logo