ANN: IPython 0.6.10 is out.

2005-01-28 Thread Fernando Perez
Hi all, I'm glad to announce the release of IPython 0.6.10. IPython's homepage is at: http://ipython.scipy.org and downloads are at: http://ipython.scipy.org/dist I've provided RPMs (for Python 2.3, built under Fedora Core 3), plus source downloads (.tar.gz). We now also have a native win32

Re: IPython Article on O'Reilly's ONLamp site

2005-01-28 Thread Ville Vainio
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 cannot say

Re: [perl-python] 20050127 traverse a dir

2005-01-28 Thread Abigail
Timo Virkkala ([EMAIL PROTECTED]) wrote on CLXVIII September MCMXCIII in URL: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

Re: What's so funny? WAS Re: rotor replacement

2005-01-28 Thread Martin v. Löwis
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

Re: building Python: up arrow broken on SuSE Linux 8.2

2005-01-28 Thread Peter Otten
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 and

Re: urllib2 and proxy question

2005-01-28 Thread Fuzzyman
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*. IE is set to

Re: urllib and proxy

2005-01-28 Thread Fuzzyman
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,

Profiling and speed up

2005-01-28 Thread Franz Steinhaeusler
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

get list of member variables from list of class

2005-01-28 Thread Oliver Eichler
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)

RE: win32com/makepy question

2005-01-28 Thread Tim Golden
[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

Re: urllib2 and proxy question

2005-01-28 Thread Fuzzyman
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*. IE is set to

unicode and data strings

2005-01-28 Thread Laszlo Zsolt Nagy
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).

A proposal idea for string.split with negative maxsplit

2005-01-28 Thread Antoon Pardon
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.

Re: Question about 'None'

2005-01-28 Thread Alex Martelli
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

Re: What's so funny? WAS Re: rotor replacement

2005-01-28 Thread Paul Rubin
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

bdist_wininst post-install bug?

2005-01-28 Thread Fernando Perez
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

Re: unicode and data strings

2005-01-28 Thread Fredrik Lundh
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() of the

Re: get list of member variables from list of class

2005-01-28 Thread Peter Otten
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) s.o. ... I

Re: A proposal idea for string.split with negative maxsplit

2005-01-28 Thread Fredrik Lundh
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'] /F --

[perl-python] daily tip website

2005-01-28 Thread Xah Lee
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

Re: unicode and data strings

2005-01-28 Thread Laszlo Zsolt Nagy
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

Re: A proposal idea for string.split with negative maxsplit

2005-01-28 Thread Antoon Pardon
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:st5.rsplit(':', 2)

How to test that an exception is raised ?

2005-01-28 Thread StepH
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('\tVar\n') name = line.split()[0] adr = line.split()[3] f.write('\t\tName' + name + '/Name\n') f.write('\t\tAdr'

Re: Profiling python 2.3

2005-01-28 Thread Stephen Kellett
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)

Re: Profiling and speed up

2005-01-28 Thread Stephen Kellett
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

Re: Profiling and speed up

2005-01-28 Thread Franz Steinhaeusler
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

Re: limited python virtual machine (WAS: Another scripting language implemented into Python itself?)

2005-01-28 Thread Fuzzyman
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 about the

Elliptic Code

2005-01-28 Thread Philip Smith
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

Re: ANN: Tao Scripting Language 0.8.5 beta released!

2005-01-28 Thread Limin Fu
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

Re: Who should security issues be reported to?

2005-01-28 Thread grahamd
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 is no generally

Re: Inherting from object. Or not.

2005-01-28 Thread Nick Coghlan
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).

How to post news articles with NNTPlib

2005-01-28 Thread python
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

Re: Who should security issues be reported to?

2005-01-28 Thread Nick Coghlan
[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

Re: Elliptic Code

2005-01-28 Thread phr
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,

Re: Who should security issues be reported to?

2005-01-28 Thread phr
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

Re: limited python virtual machine

2005-01-28 Thread Alex Martelli
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__() [type 'type', type 'weakref', type 'int', type 'basestring', type 'list', type 'NoneType', type

Re: [perl-python] daily tip website

2005-01-28 Thread Timo Virkkala
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 --

Re: Question about 'None'

2005-01-28 Thread jfj
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

Re: Who should security issues be reported to?

2005-01-28 Thread Fredrik Lundh
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. Is that

Re: Who should security issues be reported to?

2005-01-28 Thread Duncan Booth
[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 code.

Re: Who should security issues be reported to?

2005-01-28 Thread Paul Rubin
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 other

Re: Who should security issues be reported to?

2005-01-28 Thread Richie Hindle
[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 you

Re: Who should security issues be reported to?

2005-01-28 Thread Fredrik Lundh
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 of

Re: Please suggest on the book to follow

2005-01-28 Thread santanu
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

example needed: sip + Qt

2005-01-28 Thread Uwe Mayer
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

Re: How to test that an exception is raised ?

2005-01-28 Thread Ishwor
[snipped alot of codes that doesn't mean much ] if you want to check for exception then it goes like this try: put your code here which fails on certain exception like maybe IOError catch IOError: put a code to do something when IOError is raised sorry i won't bother to read your code because

RE: threading and internet explorer com

2005-01-28 Thread Stefan Schukat
... 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

Re: Why do look-ahead and look-behind have to be fixed-width patterns?

2005-01-28 Thread Diez B. Roggisch
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 called

Re: Who should security issues be reported to?

2005-01-28 Thread Duncan Booth
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 an example

Re: Who should security issues be reported to?

2005-01-28 Thread Paul Rubin
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 you

Re: Who should security issues be reported to?

2005-01-28 Thread Fuzzyman
[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 it on general mailing

Proccess termination

2005-01-28 Thread alexrait1
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

Re: Proccess termination

2005-01-28 Thread Diez B. Roggisch
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 see

Re: example needed: sip + Qt

2005-01-28 Thread Craig Ringer
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 used

Re: How to test that an exception is raised ?

2005-01-28 Thread Dan Perl
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 actually

Re: Who should security issues be reported to?

2005-01-28 Thread Paul Rubin
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 have a

Re: Who should security issues be reported to?

2005-01-28 Thread Fredrik Lundh
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 if

Re: How to test that an exception is raised ?

2005-01-28 Thread StepH
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't actually

Re: example needed: sip + Qt

2005-01-28 Thread Phil Thompson
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

Re: how to write a tutorial

2005-01-28 Thread axel
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 expanded

Re: win32com/makepy question

2005-01-28 Thread Tom Willis
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 seems to

Re: Classical FP problem in python : Hamming problem

2005-01-28 Thread Francis Girard
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 through

Re: How to test that an exception is raised ?

2005-01-28 Thread Dan Perl
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 catching

a sequence question

2005-01-28 Thread Chris Wright
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 interactive input, line 1, in ? TypeError: unpack non-sequence Is there a nifty way to do with with

Re: [perl-python] daily tip website

2005-01-28 Thread Chris Mattern
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 be more

Re: a sequence question

2005-01-28 Thread Diez B. Roggisch
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

Re: Question about 'None'

2005-01-28 Thread Francis Girard
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. Certainly

Re: Profiling python 2.3

2005-01-28 Thread Kenneth Johansson
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 infomation at all

python: can't open file 'timeit.py'

2005-01-28 Thread Aggelos I. Orfanakos
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

Re: a sequence question

2005-01-28 Thread Roy Smith
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, but it works

Re: HTML Tree View with ol and a href

2005-01-28 Thread Larry Bates
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

Re: Help with web dashboard

2005-01-28 Thread Larry Bates
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

Re: is extending an object considered acceptable usage?

2005-01-28 Thread Larry Bates
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(args) . . . for CATEGORY in ITEM: do anything in my item class: class item: def __init__(self, other args):

Hey, get this! [was: import from database]

2005-01-28 Thread Steve Holden
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

Re: Hello

2005-01-28 Thread g_xo
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.net'

Re: MySQLdb

2005-01-28 Thread George
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 table for a

Re: a sequence question

2005-01-28 Thread F. Petitjean
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 = 2 it =

Re: python: can't open file 'timeit.py'

2005-01-28 Thread Fredrik Lundh
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

Dr. Dobb's Python-URL! - weekly Python news and links (Jan 28)

2005-01-28 Thread Cameron Laird
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

Re: Help with web dashboard

2005-01-28 Thread Fuzzyman
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

Re: How to post news articles with NNTPlib

2005-01-28 Thread Do Re Mi chel La Si Do
Hi ! nntplib.NNTP(newsserver,port,user,passe) -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: python: can't open file 'timeit.py'

2005-01-28 Thread Aggelos I. Orfanakos
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

Dynamic class methods misunderstanding

2005-01-28 Thread Bill Mill
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)

debugging os.spawn*() calls

2005-01-28 Thread Skip Montanaro
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 no

Re: One-Shot Property?

2005-01-28 Thread Terry Hancock
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 at 0x4008d92c' 10 C.x

Re: a sequence question

2005-01-28 Thread Duncan Booth
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 group by N

Re: Dynamic class methods misunderstanding

2005-01-28 Thread F. Petitjean
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()

Dr. Dobb's Python-URL! - weekly Python news and links (Jan 28)

2005-01-28 Thread Cameron Laird
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

Re: Dynamic class methods misunderstanding

2005-01-28 Thread Bill Mill
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__(self, method):

Re: Dynamic class methods misunderstanding

2005-01-28 Thread Diez B. Roggisch
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 =

Re: Dynamic class methods misunderstanding

2005-01-28 Thread Kamilche
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 |

Re: Dynamic class methods misunderstanding

2005-01-28 Thread Hans Nowak
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 ...: [...]

Installing Numeric with ATLAS and LAPACK

2005-01-28 Thread drife
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

Re: PythonWin (build 203) for Python 2.3 causes Windows 2000 to grind to a halt?

2005-01-28 Thread Chris P.
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

Re: Dynamic class methods misunderstanding

2005-01-28 Thread Bill Mill
Diez, On Fri, 28 Jan 2005 16:57:37 +0100, Diez B. Roggisch [EMAIL PROTECTED] wrote: 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

Re: Help with web dashboard

2005-01-28 Thread Chris
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Ifd you want to use standard CGI I've written a CGI user authentication/management module called logintools. Would this be preferred (or easier) than using an application server (ie. Zope or Webware)? If possible, I think it would be

Re: Dynamic class methods misunderstanding

2005-01-28 Thread Bill Mill
Hans, On Fri, 28 Jan 2005 11:09:16 -0500, Hans Nowak [EMAIL PROTECTED] wrote: snip m is a function. When you assign it to self.method, it's still a function. You don't create a new method that way; all you have is a new attribute called 'method' containing the function. I figured as

Re: Dynamic class methods misunderstanding

2005-01-28 Thread Bill Mill
Kamilche, On Fri, 28 Jan 2005 08:10:07 -0800 (PST), Kamilche [EMAIL PROTECTED] wrote: 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:

Re: Installing Numeric with ATLAS and LAPACK

2005-01-28 Thread Diez B. Roggisch
Could someone please provide instructions for install Numeric with ATLAS and LAPACK? No idea - but telling us what os and versions of python and numeric you use might make others comment on that. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: Transparent (redirecting) proxy with BaseHTTPServer

2005-01-28 Thread aurora
It should be very safe to count on the host header. Maybe some really really old browser would not support that. But they probably won't work in today's WWW anyway. Majority of today's web site is likely to be virtually hosted. One Apache maybe hosting for 50 web addresses. If a client strip

  1   2   3   >