> "Jeremy" == Jeremy Jones <[EMAIL PROTECTED]> writes:
Jeremy> feedback is welcome. Regardless of what you may think of
Jeremy> the article, I hope it encourages everyone to at least try
Jeremy> out IPython. IPython has become an indispensible tool in
Jeremy> my toolbox. I c
Timo Virkkala ([EMAIL PROTECTED]) wrote on CLXVIII September MCMXCIII in
news:[EMAIL PROTECTED]>:
@@ The Flow wrote:
@@ > Do you want to be taken seriously?
@@ > First, stop posting.
@@ > Second, learn perl.
@@ > Third, learn python.
@@
@@ No. Second, learn Python. Third, learn Perl (option
Paul Rubin wrote:
I can say that assuming I know what so-and-so is. For the specific
case of AES, I would say "I don't think the Python lib necessarily
needs to have an AES module, but I would not object if it had one"
Well, ok, you're changing your tune a little bit now, and getting more
reasonab
Erik Johnson wrote:
>> Have you ensured (with yast) that readline-devel is actually installed?
>
> I had not previously, but (not surprisingly) version 4.3 is installed. :)
According to http://cnswww.cns.cwru.edu/php/chet/readline/CHANGES the
features you missed were introduced in readline 4.0 a
rbt wrote:
> Fuzzyman wrote:
> > urllib2 (under windows) will auto-detect your proxy settings and
use
> > those.
> >
> > Normally that's a good thing (I guess), except when it's not !
> >
> > How do I switch off this behaviour ? I'm behind a censoring proxy
and
> > wanting to test things *locally*
See :
http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/f1ba0de2c739127c/f694e00b1253da1e
For urllib you can pass in the 'proxies={}' keyword to the urlopen
function. This disables proxy use.
Unfortunately it *doesn't* work for urllib2 which is where I need it.
Regards,
Fuzz
Hi Newsgroup,
I'm looking for a way to measure the performance of an app,
which is built in wxPython and uses the styled text control
Then after discovering some bottlenecks, to speed up things;
first of all minimize the startup time.
and then speed up the stc.
Someone is experienced and could
Hi
what will be the fastest solution to following problem
class a:
def __init__(self):
self.varA = 0
self.varB = 0
s.o. ...
listA = [a]*10
varA = []
varB = []
for l in listA:
varA.append(l.varA)
varB.append(l.varB)
s.o. ...
I could think of:
[varA.append(l.varA) fo
[Tom Willis]
| It seems in COM late binding is something that should be
| avoided if possible.
|
| Because python seems to be really good at doing thing dynamically I'm
| wondering why no one has figured out how to make the functionality in
| makepy fire automagically when you need it.
I (near
rbt wrote:
> Fuzzyman wrote:
> > urllib2 (under windows) will auto-detect your proxy settings and
use
> > those.
> >
> > Normally that's a good thing (I guess), except when it's not !
> >
> > How do I switch off this behaviour ? I'm behind a censoring proxy
and
> > wanting to test things *locally*
Hello
I have a program where I would like to calculate a checksum. Looks like
this:
n = self.__calc_n(seed1,seed2,pwd)
This is required for an OTP (One Time Password) algorithm. My code was
working before without problems.
Now I installed Python 2.3.4 and wxPython 2.5.3 (with unicode support).
I was wondering what people whould think about a change of behaviour
in the split method fo strings. The idea would be that if maxsplit
was negative then abs(maxsplit) splits would be done, but splitting
would start from the right instead of the left.
Now we have.
>>> "st1:st2:st3:st4:st5".split
flamesrock <[EMAIL PROTECTED]> wrote:
...
> (The reason I ask is sortof unrelated. I wanted to use None as a
> variable for which any integer, including negative ones have a greater
> value so that I wouldn't need to implement any tests or initializations
> for a loop that finds the maximum of a
"Martin v. Löwis" <[EMAIL PROTECTED]> writes:
> And I still stand by those blanket statements. Any new module (i.e.
> specific code) should see real users for some time before it can
> be incorporated into Python.
Let's see, the urandom module was recently released in 2.4, I think
initially at my
Hi all,
I just noticed a problem (which forced me to a last-minute update of the windows
ipython installer). As far as I can tell, this should be considered a bug.
>From the Python docs, sys.executable is:
executable
A string giving the name of the executable binary for the Python
interpret
Laszlo Zsolt Nagy wrote:
> Now I installed Python 2.3.4 and wxPython 2.5.3 (with unicode support). I'm
> getting this
> exception:
>
> exceptions.UnicodeDecodeError:'ascii' codec can't decode byte 0x91 in
> position 0: ordinal not in
> range(128)
>From where?
Can you include a "print repr()"
Oliver Eichler wrote:
> what will be the fastest solution to following problem
>
> class a:
> def __init__(self):
> self.varA = 0
> self.varB = 0
> s.o. ...
>
>
> listA = [a]*10
>
>
> varA = []
> varB = []
>
> for l in listA:
> varA.append(l.varA)
> varB.append(l.varB)
>
Antoon Pardon wrote:
> This behaviour would remain but additionally we would have the
> following.
>
"st1:st2:st3:st4:st5".split(':',-2)
> ["st1:st2:st3" , "st4" , "st5"]
>
> What do people think here?
>>> "st1:st2:st3:st4:st5".rsplit(':', 2)
['st1:st2:st3', 'st4', 'st5']
--
http://ma
for those interested, i've created a webpage for these perl-python
daily tips. The url is:
http://xahlee.org/perl-python/python.html
Thanks to those who have made useful comments. They will be
assimilated.
Xah
[EMAIL PROTECTED]
http://xahlee.org/PageTwo_dir/more.html
> Hey all, I have seen no
ut encodings. How do I do that?
Unicode errors only appear if you're converting between "raw 8-bit data" and
Unicode strings (which contain Unicode characters, not bytes or integers). You
cannot do that without caring about encodings...
I see now. Thanks for your help. It was:
seed1 + pwd
Op 2005-01-28, Fredrik Lundh schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>> This behaviour would remain but additionally we would have the
>> following.
>>
> "st1:st2:st3:st4:st5".split(':',-2)
>> ["st1:st2:st3" , "st4" , "st5"]
>>
>> What do people think here?
>
"st1:st2:st3:st4
Hi,
I've this module :
from optparse import OptionParser
import re
_version = "P1"
def writeVar(f, line):
"""Output a line in .xml format in the file f."""
f.write('\t\n')
name = line.split()[0]
adr = line.split()[3]
f.write('\t\t' + name + '\n')
f.write('\t\t' + adr +
In message <[EMAIL PROTECTED]>, Kenneth
Johansson <[EMAIL PROTECTED]> writes
I wonder what would be a good way to profile a python program where the
main thread starts two worker threads that do all the work.
I get no infomation at all from the threads.
Python Performance Validator (beta)
http:/
In message <[EMAIL PROTECTED]>, Franz
Steinhaeusler <[EMAIL PROTECTED]> writes
best if it would be graphical like performance analysis from DevPartner
for Visual C++?
Python Performance Validator
http://www.softwareverify.com/pythonPerformanceValidator/index.html
Stephen
--
Stephen Kellett
Object
On Fri, 28 Jan 2005 10:03:30 +, Stephen Kellett
<[EMAIL PROTECTED]> wrote:
>Python Performance Validator
>
>http://www.softwareverify.com/pythonPerformanceValidator/index.html
Thanks, but I forgot to say, I'm looking for open source or freeware.
(I need it also for open source).
--
Franz Ste
Dieter Maurer wrote:
> Steven Bethard <[EMAIL PROTECTED]> writes on Tue, 25 Jan 2005
12:22:13 -0700:
> > Fuzzyman wrote:
> > ...
> > > A better (and of course *vastly* more powerful but unfortunately
only
> > > a dream ;-) is a similarly limited python virutal machine.
>
> I already wrote ab
Hi
Does anyone have/know of a python implementation of the elliptic curve
factoring algorithm (lenstra) which is both:
simply and cleanly coded
functional
I'm aware of William Stein's code (from elementary number theory book) but I
don't understand his coding style and the algorithm doesn't se
I should admit I only read a little bit very simple introductions of
Lua, so I can't answer you question exactly now. Maybe you can found
the answer by yourself by spending some minutes to read the brief
documentation of Tao.
Depending how much time I have, probably I will make a comparison
betwee
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> <[EMAIL PROTECTED]> wrote:
> >
> >Who are the appropriate people to report security problems to in
> >respect of a module included with the Python distribution? I don't
> >feel it appropriate to be reporting it on general mailing lists.
>
> There i
Nick Craig-Wood wrote:
Nick Coghlan <[EMAIL PROTECTED]> wrote:
Exactly. My advice is to use new-style classes unless you have a
reason not to (if you're inheriting from a builtin type, then there
is no need to inherit from object as well - the builtin types
already have the correct basic type).
Ex
Hello,
How to post a news article with NNTPlib if the news server requires
login. I did not find nay login command in nntplib module.
Thank you
lad.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I'm sorry, but this isn't really good enough. If Open Source wants to
say that
they are better than these proprietary companies, they need to deal
with these
sorts of things more professionally and establish decent channels of
communications for dealing with it.
Is that the
"Philip Smith" <[EMAIL PROTECTED]> writes:
> Does anyone have/know of a python implementation of the elliptic curve
> factoring algorithm (lenstra) which is both:
>
> simply and cleanly coded
> functional
It's not in Python but take a look at Mike Scott's C++ implementation
in MIRACL,
http:/
Nick Coghlan <[EMAIL PROTECTED]> writes:
> Is that the sound of a volunteer I hear?
>
> All you have to do is put your hand up, and the problem will be
> solved. If not you, who?
Tell me about it. See the "rotor replacement" thread.
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard <[EMAIL PROTECTED]> wrote:
...
> If I could see how to go from 'object' (or 'int', 'str', 'file', etc.)
> to 'eval' or '__import__', that would help out a lot...
>>> object.__subclasses__()
[, , , ,
, , , , , ,
, , , , , , ]
Traipse through these, find one class that has an unbo
Xah Lee wrote:
Thanks to those who have made useful comments. They will be
assimilated.
The comments, or those who have made comments?
"Corrections are futile. You will be assimilated."
--Xah Lee
--
Timo Virkkala
--
http://mail.python.org/mailman/listinfo/python
Francis Girard wrote:
What was the goal behind this rule ?
If you have a list which contains integers, strings, tuples, lists and
dicts and you sort it and print it, it will be easier to detect what
you're looking for:)
G.
--
http://mail.python.org/mailman/listinfo/python-list
Nick Coghlan wrote:
>> I'm sorry, but this isn't really good enough. If Open Source wants to
>> say that they are better than these proprietary companies, they need
>> to deal with these sorts of things more professionally and establish
>> decent channels of communications for dealing with it.
>
>
[EMAIL PROTECTED] wrote:
> I find this response a bit dissappointing frankly. Open Source people
> make
> such a big deal about having lots of people being able to look at
> source
> code and from that discover security problems, thus making it somehow
> making it better than proprietary source co
Duncan Booth <[EMAIL PROTECTED]> writes:
> In other words, I'm intrigued how you managed to come up with something you
> consider to be a security issue with Python since Python offers no
> security. Perhaps, without revealing the actual issue in question, you
> could give an example of some oth
[Duncan]
> I'm intrigued how you managed to come up with something you
> consider to be a security issue with Python since Python offers no
> security. Perhaps, without revealing the actual issue in question, you
> could give an example of some other situation which, if it came up in
> Python
Duncan Booth wrote:
> I think part of the problem you are having is that Python doesn't make any
> representations about security, so it is pretty hard to come up with issues
> which really are security related. Products which are based on Python (e.g.
> Zope) and which do aim to provide some kind
Thanks for the link
http://gnosis.cx/TPiP/
It was wonderful. Once I get somewhat more experienced in
Python, I guess this site will provide me with some good
fun times.
For the moment, I decided to follow Programming Python.
Once done, I shall learn the newest features from some
latest book like
Hi,
can someone provide me with a running example for subclassing QWidget (or
something similarly simple) in C++ and then creating SIP (4.x+) bindings
for in for Python (2.3+)?
I am looking for something I can start of with and work my way towards more
complicated stuff (with Qt).
The QLabel ex
[snipped alot of codes that doesn't mean much ]
if you want to check for exception then it goes like this
try:
catch IOError:
sorry i won't bother to read your code because i can't read, i think i
am tired and need to go to bed. ;-)
--
cheers,
Ishwor Gurung
--
http://mail.python.org/mailm
... and pythoncom.CoUninitialize()
My preferred way is:
def run():
pythoncom.CoInitialize()
try:
ie =
win32com.client.Dispatch('InternetExplorer.Application.1')
finally:
# Trigger the release of the object since after
CoUninitialize
> but I don't understand why regex look-behinds (and look-aheads) have to be
> fixed-width patterns.
>
> i'm getting the impression that it's supposed to make searching
> exponentially slower otherwise
That's because of the underlying theory of regular expressions. They are
modelled using so call
Paul Rubin wrote:
> Duncan Booth <[EMAIL PROTECTED]> writes:
>> In other words, I'm intrigued how you managed to come up with
>> something you consider to be a security issue with Python since
>> Python offers no security. Perhaps, without revealing the actual
>> issue in question, you could give
Duncan Booth <[EMAIL PROTECTED]> writes:
> SF doesn't seem to know about any such bug any more.
> Google finds me
> http://mail.python.org/pipermail/python-bugs-list/2001-October/007669.html
> which appears to be SF bug 467384, but it says nothing about security or
> the Cookie module, just that
[EMAIL PROTECTED] wrote:
> Aahz wrote:
> > In article <[EMAIL PROTECTED]>,
> > <[EMAIL PROTECTED]> wrote:
> > >
> > >Who are the appropriate people to report security problems to in
> > >respect of a module included with the Python distribution? I
don't
> > >feel it appropriate to be reporting i
I use popen.popen2 or popen.popen3 to start a new process and read from
it's stdout/ write to it's stdin.
But I need a way to know when a process terminates. If it closes it's
stdin/stdout, it doesn't mean it has really terminated...
And if possible, I would like to see an exception thrown when tha
alexrait1 wrote:
> I use popen.popen2 or popen.popen3 to start a new process and read from
> it's stdout/ write to it's stdin.
> But I need a way to know when a process terminates. If it closes it's
> stdin/stdout, it doesn't mean it has really terminated...
You can use the Popen-objects pid to s
On Fri, 2005-01-28 at 13:30 +0100, Uwe Mayer wrote:
> Hi,
>
> can someone provide me with a running example for subclassing QWidget (or
> something similarly simple) in C++ and then creating SIP (4.x+) bindings
> for in for Python (2.3+)?
Out of curiosity, would this be for an extension module us
"StepH" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> But i've prob with the 1st test : test_badFile.
> When I run the test, unittest say that no error is Raised.
> But when I run the mps2xml module with a bad file as arg., the exception
> is
> well Raised.
I assume you don't ac
"Fuzzyman" <[EMAIL PROTECTED]> writes:
> The sourceforge bug tracker *is* the single right place to post such
> issues. The py-dev mailing list would be a second *useful* place to
> post such a comment, although not really the right place. The OP seemed
> to want an individual with whom he could ha
Duncan Booth wrote:
> I think its a bit borderline whether this really was a security bug in
> Python rather than just a problem with the way some people used Python. It
> was a standard library which if used in the wrong way opens a security hole
> on your machine
for SmartCookie, that should be
Thanks for you answer.
I'm new to Python (coming from C/C++).
> > But i've prob with the 1st test : test_badFile.
> > When I run the test, unittest say that no error is Raised.
> > But when I run the mps2xml module with a bad file as arg., the exception
> > is
> > well Raised.
>
> I assume you don
> Hi,
>
> can someone provide me with a running example for subclassing QWidget (or
> something similarly simple) in C++ and then creating SIP (4.x+) bindings
> for in for Python (2.3+)?
>
> I am looking for something I can start of with and work my way towards
> more
> complicated stuff (with Qt).
In comp.lang.perl.misc Xah Lee <[EMAIL PROTECTED]> wrote:
> Following is a tutorial on Python's classes. It is part of a
> a-Python-a-day mailing list. As an example, it shows what i mean by
> covering the language's functionalities as is, without needing to chalk
> up to rocket sciences. If expand
Wow Thanks I didn't even know about the gencache that's is exactly
what I was hoping for.
On Fri, 28 Jan 2005 09:06:15 -, Tim Golden
<[EMAIL PROTECTED]> wrote:
> [Tom Willis]
>
> | It seems in COM late binding is something that should be
> | avoided if possible.
> |
> | Because python se
Le vendredi 28 Janvier 2005 08:27, Paul Rubin a écrit :
> Francis Girard <[EMAIL PROTECTED]> writes:
> > Thank you Nick and Steven for the idea of a more generic imerge.
>
> If you want to get fancy, the merge should use a priority queue (like
> in the heapsort algorithm) instead of a linear scan t
"StepH" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Do you say that it's not possible to test (using unittest) if an exception
> is well raised if the tested code catch it ?
> How to solve this paradoxe ? How to automaticaly test such code ?
Then you need a side-effect in ca
Hi,
1) I want to iterate over a list "N at a time"
sort of like:
# Two at a time... won't work, obviously
>>> for a, b in [1,2,3,4]:
... print a,b
...
Traceback (most recent call last):
File "", line 1, in ?
TypeError: unpack non-sequence
>>>
Is there a nifty way to do with with list com
Xah Lee wrote:
> daily tips. The url is:
> http://xahlee.org/perl-python/python.html
>
> Thanks to those who have made useful comments. They will be
> assimilated.
>
Resistance is futile.
--
Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you
l = [1,2,3,4]
for a, b in zip(l[::2], l[1::2]):
print a,b
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
Le vendredi 28 Janvier 2005 22:54, jfj a écrit :
> Francis Girard wrote:
> > What was the goal behind this rule ?
>
> If you have a list which contains integers, strings, tuples, lists and
> dicts and you sort it and print it, it will be easier to detect what
> you're looking for:)
>
>
> G.
Mmm. C
On Fri, 28 Jan 2005 10:02:33 +, Stephen Kellett wrote:
> In message <[EMAIL PROTECTED]>, Kenneth
> Johansson <[EMAIL PROTECTED]> writes
>>I wonder what would be a good way to profile a python program where the
>>main thread starts two worker threads that do all the work.
>>
>>I get no infoma
Hello.
Under Gentoo Linux, I issue:
$ python timeit.py
python: can't open file 'timeit.py'
$ ls -al /usr/lib/python2.3/timeit.py
-rw-r--r-- 1 root root 9833 Oct 19 02:17 /usr/lib/python2.3/timeit.py
But if I specify the full path, it works:
$ python /usr/lib/python2.3/timeit.py -n 1 "pass"
1 lo
In article <[EMAIL PROTECTED]>,
Chris Wright <[EMAIL PROTECTED]> wrote:
> Hi,
>
> 1) I want to iterate over a list "N at a time"
You could do it with slicing and zip:
>>> l = [1, 2, 3, 4, 5, 6, 7, 8]
>>> zip (l[::2], l[1::2])
[(1, 2), (3, 4), (5, 6), (7, 8)]
To my eyes, that's a bit cryptic,
While not EXACTLY what you outlined, I've used TreeView
http:www.treeview.net along with Python to create the
dynamic tree menus you describe. I had to write a
couple or very short JavaScript additions, but it is
working just fine. All the tree opening and closing
is done on the client via-javasc
I don't know how complicated that you want to get, but Zope has
built in support for a control panel with what are called portlets.
Each portlet can act as an individual sub-window on the control
panel. You convert each of your individal scripts to a portlet
and plug them into a control panel page
When I want to do what I think you are asking, I create
an iterator in that returns a category item each time
the .next method is called. That way you can write.
ITEM=item()
.
.
.
for CATEGORY in ITEM:
in my item class:
class item:
def __init__(self, ):
self.CATEGORIES=[]
This is even stranger: it makes it if I import the module a second time:
import dbimp as dbimp
import sys
if __name__ == "__main__":
dbimp.install()
#k = sys.modules.keys()
#k.sort()
#for kk in k:
#print kk
#import bsddb.db
import a.b.c.d
import smtplib
import f
Hi guys,
Thank you for your help once I put my isp news server as the server I
was able to get access to comp.lang.python.
Thank you for your help :)
George
On Fri, 28 Jan 2005 13:16:48 +0530, Swaroop C H <[EMAIL PROTECTED]> wrote:
> > Most ISPs provide
> > news servers, often at 'news.ispname.
The source is for all platforms. Use the Source, Luke. If 1.1.9 does
not compile on Mac OS X, file a bug.
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Bowett wrote:
> Daniel Bowett wrote:
>> I have just started playing around with MySQLdb for a project I am
>> planning.
>>
>> As a test I have written a script that executes 3000 insert statements
>> on a table. The table contains 10 fields with a mix of text and numbers
>> - its a product
Le Fri, 28 Jan 2005 13:59:45 GMT, Chris Wright a écrit :
> Hi,
>
> 1) I want to iterate over a list "N at a time"
>
>
> Is there a nifty way to do with with list comprehensions,
> or do I just have to loop over the list ?
>
> cheers and thanks
seq = xrange(1, 9) # an iterable [1, 2, ... 8]
N
Aggelos I. Orfanakos wrote:
> Under Gentoo Linux, I issue:
>
> $ python timeit.py
> python: can't open file 'timeit.py'
> $ ls -al /usr/lib/python2.3/timeit.py
> -rw-r--r-- 1 root root 9833 Oct 19 02:17 /usr/lib/python2.3/timeit.py
>
> But if I specify the full path, it works:
>
> $ python /usr/l
QOTW: "It might be nice if it was widely understood (in IT) that Python was
a language any competent programmer could pick up in an afternoon, such that
Java, C, and Perl shops would not be concerned about the need for their staff
to learn a new language." -- Eric Pederson
"What's kind of surpris
Ifd you want to use standard CGI I've written a CGI user
authentication/management module called logintools.
See http://www.voidspace.org.uk/python/logintools.html
Regards,
Fuzzy
http://www.voidspace.org.uk/python/index.shtml
--
http://mail.python.org/mailman/listinfo/python-list
Hi !
nntplib.NNTP(newsserver,port,user,passe)
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
OK, the symbolic link solved the "problem". I thought that there was
something wrong with my Python configuration; that's why I asked in the
first place.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I have a misunderstanding about dynamic class methods. I don't expect
this behavior:
In [2]: class test:
...: def __init__(self, method):
...: self.method = method
...: self.method()
...:
In [3]: def m(self): print self
...:
In [4]: test(m)
---
I have an os.spawnv call that's failing:
pid = os.spawnv(os.P_NOWAIT, "ssh",
["ssh", remote,
"PATH=%(path)s nice -20 make -C %(pwd)s" % locals()])
When I wait for it the status returned is 32512, indicating an exit status
of 127. Unfortunately, I see
On Tuesday 18 January 2005 12:33 pm, John Lenton wrote:
>
> consider this:
>
>1 >>> class C:
>2 ... x = property(str)
>3 ...
>4 >>> c = C()
>5 >>> c.x
>6 '<__main__.C instance at 0x4008d92c>'
>7 >>> setattr(c, 'x', c.x)
>8 >>> c.x
>9 '<__main__.C instance
Op 2005-01-28, StepH schreef <[EMAIL PROTECTED]>:
> Thanks for you answer.
> I'm new to Python (coming from C/C++).
>
> Do you say that it's not possible to test (using unittest) if an exception
> is well raised if the tested code catch it ?
> How to solve this paradoxe ? How to automaticaly test
Paul Rubin wrote:
> The Cookie issue is discussed some in that bug thread. But more
> relevant is bug 471893. Sorry.
Thanks. There's an interesting comment in that thread:
A.M. Kuchling (akuchling) wrote:
> Date: 2003-02-06 09:29
>
> The Cookie classes that use pickle have DeprecationWarnings
thanks for the suggestion
I understand the algorithm quite well but how to code the multiplication
stage most efficiently in python eludes me.
William Stein's code is obviously not high performance because in the region
where ecm should do well (30-40 dec digits) my python implementation of the
Skip Montanaro wrote:
I have an os.spawnv call that's failing:
pid = os.spawnv(os.P_NOWAIT, "ssh",
["ssh", remote,
"PATH=%(path)s nice -20 make -C %(pwd)s" % locals()])
When I wait for it the status returned is 32512, indicating an exit status
of 127. U
Chris Wright wrote:
> 1) I want to iterate over a list "N at a time"
> sort of like:
>
> # Two at a time... won't work, obviously
>
> >>> for a, b in [1,2,3,4]:
> ... print a,b
> ...
Try this:
l = [1, 2, 3, 4]
for a, b in zip(*[iter(l)]*2):
print a, b
zip(*[iter(seq)]*N) will gr
Steve Holden wrote:
> This is even stranger: it makes it if I import the module a second time:
[second import seems to succeed]
Maybe you are experiencing some version confusion? What you describe looks
much like the normal Python 2.3 behaviour (with no import hook involved)
whereas you seem to
Hello,
(first i'm sorry for my bad english...)
for a program, i need to have some kind of dictionary which will
contain a huge amount of keys and values. i have tried 'to do it
simple' using a normal dict but when available memory was exhausted,
my computer started to be really slow as it swap-ed
Le Fri, 28 Jan 2005 10:20:30 -0500, Bill Mill a écrit :
> Hello all,
>
> I have a misunderstanding about dynamic class methods. I don't expect
> this behavior:
>
> In [2]: class test:
>...: def __init__(self, method):
>...: self.method = method
>...: self.method()
QOTW: "It might be nice if it was widely understood (in IT) that Python was
a language any competent programmer could pick up in an afternoon, such that
Java, C, and Perl shops would not be concerned about the need for their staff
to learn a new language." -- Eric Pederson
"What's kind of surpris
On 28 Jan 2005 15:41:49 GMT, F. Petitjean <[EMAIL PROTECTED]> wrote:
> Le Fri, 28 Jan 2005 10:20:30 -0500, Bill Mill a écrit :
> > Hello all,
> >
> > I have a misunderstanding about dynamic class methods. I don't expect
> > this behavior:
> >
> > In [2]: class test:
> >...: def __init__(se
>
> Why doesn't m get the implicit self parameter in the self.method()
> call? How would I make it a proper member of the class, so that a
> self.method() call would work with the above "m" function?
Use new.instancemethod:
import new
class Test:
def __init__(self, method):
self.m =
I see what you're attempting to do. However, your code, if it DID run,
would result in a method being added to the object, not the object's
class! Modify the class itself, not the object, as follows:
|class Test:
|def __init__(self):
|self.method()
|
|def m(self):
|print self
|
|se
Bill Mill wrote:
Hello all,
I have a misunderstanding about dynamic class methods. I don't expect
this behavior:
In [2]: class test:
...: def __init__(self, method):
...: self.method = method
...: self.method()
...:
In [3]: def m(self): print self
...:
[...]
Type
Hello,
Could someone please provide instructions for install Numeric
with ATLAS and LAPACK?
I've actually done this correctly, I think. But I don't see any
difference in the speed.
I'm calculating eigenvalues for a 3600 X 3600 covariance matrix.
Calculating the eigenvalues for this matrix requi
AWESOME - my life just got THAT much better.
The bug you suggested is exactly the problem that I was having... I
had looked through the bugs being tracked, but the title of that one
didn't jump out at me as something that would help. Thanks!
- Chris
P.S. For anyone reading this group who wants
1 - 100 of 220 matches
Mail list logo