web2py 1.40 is out
A web2py book is out too:
http://he-cda.wiley.com/WileyCDA/Section/id-321954.html
Here is a sample:
http://mdp.cti.depaul.edu/examples/static/web2py_manual_cut.pdf
Here are some videos:
http://www.vimeo.com/videos/search:web2py
version 1.40 includes:
- Database Abstraction
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 as 0. It
should
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.
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.
It should return
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 reading
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 of nodes
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 =
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 = 10
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 ==
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', so that should be:
Mathieu Prevot wrote:
I'll use:
a.__setattr__(height, new_value)
that's an implementation detail. please use setattr() instead, like
everyone else.
/F
--
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 said
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([])
0
is a
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 and
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:
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 the above is
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 Python
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 the future of
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) instead?
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; indeed
+
+
+
+
+++ 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 wrong.
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
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:
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()
bar2.attr =
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?
As far as
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
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
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
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,
JavaFX, Google
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 figleaf:
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, it returns some
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.
Please
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
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
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.e. the
merge of
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
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
--
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 has
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)
and, of
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-hoc
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/
--
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 the pointer,
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
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(object2,
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,
I wanted
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
a.py
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 covered in the Python
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(fileName)
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
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
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 should be viewed
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 with in
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 onwards, we
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 help, and just
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,
Mathieu
How
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 for the noise
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)
Thanks,
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 a Windows box
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) Following the public rumor mill
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
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 some tries, but
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
--
Marco
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/
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
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
--
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
--
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 that I
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 explicitly
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
--
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='/usr/local/lib/'
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([])
0
Because that []
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
In a statically typed
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 still get
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 what you're
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 attribute x,
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)
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:
a.byteswap()
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, I'm
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 access
the
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 the items it will
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 =
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 that the Python
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 HTML
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 return an
1 - 100 of 282 matches
Mail list logo