[ANN] BleachBit 0.3.1

2009-02-04 Thread Andrew Ziem
BleachBit is a Internet history, locale, registry, privacy, and temporary file cleaner for Linux on Python v2.4 - v2.6. Notable changes for 0.3.1: * Clean the cache and temporary files of Acrobat Reader, GIMP, Google Earth, Second Life Viewer, and winetricks. * Clean Firefox version 3's URL

Re: Good or bad use of __repr__?

2009-02-04 Thread Bruno Desthuilliers
Alaric Haag a écrit : Hello, Is the use of __repr__ below a really bad idea? I'd probably do the same as Stephen Hansen (Dimension(size=50)) or at least something quite similar. Now on a totally unrelated point (micro optimization anyone ?): class Dimension(): def __init__(self,

Re: is python Object oriented??

2009-02-04 Thread Bruno Desthuilliers
Gabriel Genellina a écrit : En Mon, 02 Feb 2009 19:51:11 -0200, Russ P. russ.paie...@gmail.com escribió: Suppose a library developer (or a module developer on a large team) uses leading underscores. Now suppose that, for whatever reason (pressure from the users, perhaps), the library

Re: is python Object oriented??

2009-02-04 Thread Bruno Desthuilliers
thmpsn@gmail.com a écrit : On Feb 3, 1:14 am, David Cournapeau courn...@gmail.com wrote: (snip) after all, we have used FILE* for years and I have no idea about the FILE structure. Your lack of knowledge about it doesn't mean that it has somehow magically private members. The only reason

Re: is python Object oriented??

2009-02-04 Thread Bruno Desthuilliers
Russ P. a écrit : On Feb 3, 4:14 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Tue, 03 Feb 2009 05:37:57 -, Russ P. russ.paie...@gmail.com wrote: (snip) If a library developer releases the source code of a library, any user can trivially defeat the access restrictions. But if a

subprocess.Popen - file like object from stdout=PIPE

2009-02-04 Thread Helmut Jarausch
Hi, using e.g. import subprocess Package='app-arch/lzma-utils' EQ=subprocess.Popen(['/usr/bin/equery','depends',Package],stdout=subprocess.PIPE) EQ_output= EQ.communicate()[0] EQ_output is a string containing multiple lines. I'd prefer a file-like object, e.g. EQ_OUT so that I can loop over

Re: How do i add body to 'email.mime.multipart.MIMEMultipart' instance?

2009-02-04 Thread Justin Ezequiel
On Feb 4, 2:50 pm, srinivasan srinivas sri_anna...@yahoo.co.in wrote: Hi, Could someone tell me the way to add body content to 'email.mime.multipart.MIMEMultipart' instance? Thanks, Srini excerpt from one of the modules I use: def build_body(html, text=''): text = text.strip() and

Load / Reload module

2009-02-04 Thread Marius Butuc
Hi, First I must state that I'm a beginner in Python, so all help would be more than welcomed. I want do declare some classes (classes.py) in an external editor, than import the file and use the classes. After I change the file, I want to reload the definitions w/o leaving the interactive

Re: Code critique xmlrpclib

2009-02-04 Thread Nick Craig-Wood
flagg ianand0...@gmail.com wrote: On Feb 3, 7:32?am, Nick Craig-Wood n...@craig-wood.com wrote: flagg ianand0...@gmail.com wrote: ?This xmlrpc server is designed to parse dns zone files and then ?perform various actions on said files. \ ?It uses dnspython, and xmlrpclib ? I'd like

Re: Cross platform compilation?

2009-02-04 Thread Nick Craig-Wood
Christian Heimes li...@cheimes.de wrote: John Harper schrieb: I am trying to build Python to use in an embedded system which uses a ppc_440 CPU. The only information I've found is something written by Klaus Reimer a few years ago, which was based on Python 2.2. So far I seem to have

Re: subprocess.Popen - file like object from stdout=PIPE

2009-02-04 Thread Chris Rebert
On Wed, Feb 4, 2009 at 1:22 AM, Helmut Jarausch jarau...@skynet.be wrote: Hi, using e.g. import subprocess Package='app-arch/lzma-utils' EQ=subprocess.Popen(['/usr/bin/equery','depends',Package],stdout=subprocess.PIPE) EQ_output= EQ.communicate()[0] EQ_output is a string containing

Re: Locating python

2009-02-04 Thread andrew cooke
On Feb 3, 7:35 pm, David Sevilla sevil...@gmail.com wrote: I am quite new to Linux, and thought that by using yast2 there would be no user problems (I am asked for the root password). I will sudo it to see if it solves the problem. yast asked you for the password so that easy_install could be

Re: x64 speed

2009-02-04 Thread Robin Becker
Martin v. Löwis wrote: I follow David's guess that Linux does better IO than Windows (not knowing anything about the benchmark, of course) I originally thought it must be the vmware host stuff offloading IO to the second core, but watching with sysinternals didn't show a lot of extra stuff

Re: is python Object oriented??

2009-02-04 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Tue, 03 Feb 2009 12:09:46 +0100, Bruno Desthuilliers wrote: I love Python, and I'm greedy and want it all: I want a dynamic, easy-to- use language *and* a compiler that can protect me from myself That's not what compilers are for. So you say. While it's quite

Re: How to call python from a foreign language thread (C++)

2009-02-04 Thread Mark Hammond
On 4/02/2009 4:51 AM, Victor Lin wrote: It may looks like this. void operator() (double time, const AudioDatadata) { // acquire lock m_Function(time, data); // release lock } You want something like: void operator() (double time, const

Re: Load / Reload module

2009-02-04 Thread Scott David Daniels
Marius Butuc wrote: I want do declare some classes (classes.py) in an external editor, than import the file and use the classes. After I change the file, I want to reload the definitions w/o leaving the interactive interpreter. So far I have tried - import classes # doesn't import

Re: subprocess.Popen - file like object from stdout=PIPE

2009-02-04 Thread Helmut Jarausch
Chris Rebert wrote: On Wed, Feb 4, 2009 at 1:22 AM, Helmut Jarausch jarau...@skynet.be wrote: Hi, using e.g. import subprocess Package='app-arch/lzma-utils' EQ=subprocess.Popen(['/usr/bin/equery','depends',Package],stdout=subprocess.PIPE) EQ_output= EQ.communicate()[0] EQ_output is a string

Re: Locating python

2009-02-04 Thread Tino Wildenhain
andrew cooke wrote: On Feb 3, 7:35 pm, David Sevilla sevil...@gmail.com wrote: I am quite new to Linux, and thought that by using yast2 there would be no user problems (I am asked for the root password). I will sudo it to see if it solves the problem. yast asked you for the password so that

Kill a function while it's being executed

2009-02-04 Thread Noam Aigerman
Hi All, I have a script in which I receive a list of functions. I iterate over the list and run each function. This functions are created by some other user who is using the lib I wrote. Now, there are some cases in which the function I receive will never finish (stuck in infinite loop). Suppose I

Re: subprocess.Popen - file like object from stdout=PIPE

2009-02-04 Thread Helmut Jarausch
Clovis Fabricio wrote: 2009/2/4 Helmut Jarausch jarau...@skynet.be: using e.g. import subprocess Package='app-arch/lzma-utils' EQ=subprocess.Popen(['/usr/bin/equery','depends',Package],stdout=subprocess.PIPE) EQ_output= EQ.communicate()[0] EQ_output is a string containing multiple lines. I'd

Re: python libpcap equivalent

2009-02-04 Thread Juergen Kareta
Gabriel schrieb: Hello I need to write a software router [yes, software equivalent to a hardware box that is routing packets .)]. It's a school work.. Question is: is possible write this kind of application in python? and if it's, what module should i use? I tried search for some libpcap

Re: subprocess.Popen - file like object from stdout=PIPE

2009-02-04 Thread Clovis Fabricio
2009/2/4 Helmut Jarausch jarau...@skynet.be: using e.g. import subprocess Package='app-arch/lzma-utils' EQ=subprocess.Popen(['/usr/bin/equery','depends',Package],stdout=subprocess.PIPE) EQ_output= EQ.communicate()[0] EQ_output is a string containing multiple lines. I'd prefer a file-like

Re: Locating python

2009-02-04 Thread andrew cooke
On Feb 4, 9:16 am, andrew cooke and...@acooke.org wrote: actually su needs the root (or the target users') password and sudo needs _your_ (the current users) password. argh, sorry for the confusion. actually, no. sudo requires the root password. at least on opensuse 11.1 default config.

Re: is python Object oriented??

2009-02-04 Thread Luis Zarrabeitia
Quoting Russ P. russ.paie...@gmail.com: Indeed he can. He can even do that in Python; it just requires a little self-discipline from the team, or a validation script on the code repository if he really doesn't trust them. Not only can this be done without forcing the rest of the world

Re: is python Object oriented??

2009-02-04 Thread Luis Zarrabeitia
Quoting Russ P. russ.paie...@gmail.com: Imagine you own a company, and you decide to lease an office building. Would you expect the office doors to have locks on them? Oh, you would? Why? You mean you don't trust your co-workers? What are locks but enforced access restriction? This analogy

Re: v 3.0 mpkg

2009-02-04 Thread Simon Brunning
2009/2/4 John Forse johnfo...@talktalk.net: Does anyone know if Python v3.0 is available as an .mpkg installer for Mac 10.5.6. I have used 2.5 updated to 2.6.1 this way, but can't find any reference to one on the Python.org download site. I've downloaded the Python 3.0 folder but can't

Re: len()

2009-02-04 Thread Pat
Andreas Waldenburger wrote: On Sat, 31 Jan 2009 13:27:02 -0500 Pat p...@junk.net wrote: Tobiah wrote: Just out of curiosity, why was len() made to be it's own function? I often find myself typing things like my_list.len before I catch myself. Thanks, Toby I'm surprised that no one

Re: kinterbasdb + firebird 1.5 with python 2.6 ?

2009-02-04 Thread Uwe Grauer
Laszlo Nagy wrote: Does anyone know how to get firebird 1.5 driver (kinterbasdb) for FireBird 1.5? My problem: * python 2.6 already installed on a server * there is a firebird 1.5 database on the same server * I need to access it from python 2.6 Any thoughts? Get it from

Tkinter

2009-02-04 Thread Luke
Hello, I'm an inexperienced programmer and I'm trying to make a Tkinter window and have so far been unsuccessful in being able to delete widgets from the main window and then add new ones back into the window without closing the main window. The coding looks similar to this: from Tkinter import

Re: len()

2009-02-04 Thread Marco Mariani
Pat wrote: Why didn't you answer the len() question? It's a bit of a FAQ: len() cannot be a method of list objects because it works on any sequence or iterable. -- http://mail.python.org/mailman/listinfo/python-list

Re: x64 speed

2009-02-04 Thread Floris Bruynooghe
On Feb 4, 10:14 am, Robin Becker ro...@reportlab.com wrote: [rpt...@localhost tests]$ time python25 runAll.py . . -- Ran 193 tests in

Re: Locating python

2009-02-04 Thread Tino Wildenhain
andrew cooke wrote: On Feb 4, 9:16 am, andrew cooke and...@acooke.org wrote: actually su needs the root (or the target users') password and sudo needs _your_ (the current users) password. argh, sorry for the confusion. actually, no. sudo requires the root password. at least on opensuse

tkSimpleDialog window focus problem

2009-02-04 Thread inkhorn
Hi all, As part of the program I've created and am maintaining, the user has to type in his/her username and password into tkinter simple dialog windows. What you'll see below is that I've nested an askstring dialog window within a call to use the ftp module to login to an FTP server. result =

Re: Kill a function while it's being executed

2009-02-04 Thread Albert Hopkins
On Wed, 2009-02-04 at 13:40 +0200, Noam Aigerman wrote: Hi All, I have a script in which I receive a list of functions. I iterate over the list and run each function. This functions are created by some other user who is using the lib I wrote. Now, there are some cases in which the function I

RE: Kill a function while it's being executed

2009-02-04 Thread Noam Aigerman
About the hijacking - I *might* have done it without understanding what I did (replied to a previous message and then changed the subject), if that's what you mean... Sorry -Original Message- From: python-list-bounces+noama=answers@python.org

Re: is python Object oriented??

2009-02-04 Thread Russ P.
On Feb 4, 5:35 am, Luis Zarrabeitia ky...@uh.cu wrote: Quoting Russ P. russ.paie...@gmail.com: Imagine you own a company, and you decide to lease an office building. Would you expect the office doors to have locks on them? Oh, you would? Why? You mean you don't trust your co-workers? What

wsdl2py/ZSI and complex types with arrays

2009-02-04 Thread eviljonny
Hello all, I have been trying to write a web service using ZSI with wsdl2py. I have read 'The Zolera Soap Infrastructure User’s Guide Release 2.0.0' and some older guides (a guide by Nortel called Using ZSI with wsdl2py) and am unable to find any working examples of how to use arrays in

[Web 2.0] Added-value of frameworks?

2009-02-04 Thread Gilles Ganault
Hello If I wanted to build some social web site such as Facebook, what do frameworks like Django or TurboGears provide over writing a site from scratch using Python? Thank you for your feedback. -- http://mail.python.org/mailman/listinfo/python-list

Re: [2.5.1] Comparing dates?

2009-02-04 Thread Gilles Ganault
On Mon, 2 Feb 2009 22:00:53 +0100, Martin mar...@marcher.name wrote: as suggested, the DBA should seriously think about defining the correct type of the column here, for intermediate use and getting stuff to work you could use a view and define some stored procedures on it so that inserting

Re: len()

2009-02-04 Thread Tino Wildenhain
Marco Mariani wrote: Pat wrote: Why didn't you answer the len() question? It's a bit of a FAQ: len() cannot be a method of list objects because it works on any sequence or iterable. Thats only half of the truth :-) len() can use some internal optimizations on certain objects where

Re: Locating python

2009-02-04 Thread andrew cooke
actually su needs the root (or the target users') password and sudo needs _your_ (the current users) password. argh, sorry for the confusion. -- http://mail.python.org/mailman/listinfo/python-list

Use list name as string

2009-02-04 Thread Vincent Davis
Do to laking knowledge my google searches have not turned up an answer for me. I know this is wrong it uses the items in the list as the filename, how do I refer to the dataname and not the items in it. def savedata(dataname): filename = str(dataname) # this does not do what I would like it

Re: How to call python from a foreign language thread (C++)

2009-02-04 Thread Mark Hammond
On 4/02/2009 8:43 PM, I wrote: PyGILState_STATE old = PyGILState_Acquire(); Make that PyGILState_Ensure(); Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen - file like object from stdout=PIPE

2009-02-04 Thread Clovis Fabricio
2009/2/4 Helmut Jarausch jarau...@skynet.be: EQ.stdout is the filelike object you're looking for. communicate() grabs entire output at once so don't use it. Thanks a lot, I haven't found that in the official documentation. Helmut. That would be a documentation bug. Fortunately it is not true.

Re: subprocess.Popen - file like object from stdout=PIPE

2009-02-04 Thread Helmut Jarausch
Clovis Fabricio wrote: 2009/2/4 Helmut Jarausch jarau...@skynet.be: EQ.stdout is the filelike object you're looking for. communicate() grabs entire output at once so don't use it. Thanks a lot, I haven't found that in the official documentation. Helmut. That would be a documentation bug.

Re: Added-value of frameworks?

2009-02-04 Thread Matimus
On Feb 4, 8:08 am, Gilles Ganault nos...@nospam.com wrote: Hello If I wanted to build some social web site such as Facebook, what do frameworks like Django or TurboGears provide over writing a site from scratch using Python? Thank you for your feedback. Why not just look at the frameworks

Re: Use list name as string

2009-02-04 Thread Gary Herron
Vincent Davis wrote: Do to laking knowledge my google searches have not turned up an answer for me. I know this is wrong it uses the items in the list as the filename, how do I refer to the dataname and not the items in it. def savedata(dataname): filename = str(dataname) # this does

Re: Use list name as string

2009-02-04 Thread Tim Chase
I know this is wrong it uses the items in the list as the filename, how do I refer to the dataname and not the items in it. Without a sample value for dataname, it's hard to tell what you're trying to do. Do you mean dataname = ['path', 'to', 'file'] ... filename =

Couple of noobish question

2009-02-04 Thread Catherine Heathcote
Firstly hi, I don't know any of you yet but am picking up Python and will be lurking here a lot lol. I am a hobbiest coder (did 3 out of 4 years of a comp tech degree, long story) and am learning Python, 'cos I saw some code and it just looks a really nice language to work with. I come from

Re: Load / Reload module

2009-02-04 Thread Peter Otten
Scott David Daniels wrote: Marius Butuc wrote: I want do declare some classes (classes.py) in an external editor, than import the file and use the classes. After I change the file, I want to reload the definitions w/o leaving the interactive interpreter. So far I have tried - import

Re: Kill a function while it's being executed

2009-02-04 Thread Steve Holden
Noam Aigerman wrote: About the hijacking - I *might* have done it without understanding what I did (replied to a previous message and then changed the subject), if that's what you mean... Sorry That's what he meant. A lot of news reading and email software uses In-Reply-To and various other

re.sub and named groups

2009-02-04 Thread Emanuele D'Arrigo
Hi everybody, I'm having a ball with the power of regular expression but I stumbled on something I don't quite understand: theOriginalString = spam:(?Pfirst.*) ham:(?Psecond.*) aReplacementPattern = \(\?Pfirst.*\) aReplacementString= foo re.sub(aReplacementPattern , aReplacementString,

Re: Use list name as string

2009-02-04 Thread Vincent Davis
Sorry for not being clearI would have something like this x = [1, 2, 3,5 ,6 ,9,234] Then def savedata(dataname): .. savedata(x) this would save a to a file called x.csv This is my problem, getting the name to be x.csv which is the same as the name of the list. and the data in the file

Re: MySQLdb and MySQL stored functions

2009-02-04 Thread Nick Craig-Wood
kurt.forrester@googlemail.com kurt.forrester@googlemail.com wrote: Any ideas on how to suppress the warning output: __main__:1: Warning: No data - zero rows fetched, selected, or processed You can use the warnings module to suppress these I would have thought. -- Nick Craig-Wood

Re: Use list name as string

2009-02-04 Thread MRAB
Vincent Davis wrote: Sorry for not being clear I would have something like this x = [1, 2, 3,5 ,6 ,9,234] Then def savedata(dataname): .. savedata(x) this would save a to a file called x.csv This is my problem, getting the name to be x.csv which is the same as the name of the

Re: Couple of noobish question

2009-02-04 Thread Mike Driscoll
On Feb 4, 10:47 am, Catherine Heathcote catherine.heathc...@gmail.com wrote: Firstly hi, I don't know any of you yet but am picking up Python and will be lurking here a lot lol. I am a hobbiest coder (did 3 out of 4 years of a comp tech degree, long story) and am learning Python, 'cos I saw

Re: Couple of noobish question

2009-02-04 Thread Catherine Heathcote
Mike Driscoll wrote: On Feb 4, 10:47 am, Catherine Heathcote catherine.heathc...@gmail.com wrote: Firstly hi, I don't know any of you yet but am picking up Python and will be lurking here a lot lol. I am a hobbiest coder (did 3 out of 4 years of a comp tech degree, long story) and am learning

Re: re.sub and named groups

2009-02-04 Thread MRAB
Emanuele D'Arrigo wrote: Hi everybody, I'm having a ball with the power of regular expression but I stumbled on something I don't quite understand: theOriginalString = spam:(?Pfirst.*) ham:(?Psecond.*) aReplacementPattern = \(\?Pfirst.*\) aReplacementString= foo

Re: Use list name as string

2009-02-04 Thread Vincent Davis
I know nothing but that sucks. I can think of a lot of times I would like to do something similar. There really is no way to do this, it seems like there would be some simple way kind of like str(listname) but backwards or different. Thanks Vincent Davis On Wed, Feb 4, 2009 at 10:07 AM, MRAB

Re: Use list name as string

2009-02-04 Thread Vincent Davis
I guess what I am saying is that it does not seem like I am adding any information that is not already there when I have to enter that list and list name after all they are the same. Thanks Vincent Davis On Wed, Feb 4, 2009 at 10:18 AM, Vincent Davis vinc...@vincentdavis.netwrote: I know

Re: re.sub and named groups

2009-02-04 Thread Emanuele D'Arrigo
On Feb 4, 5:17 pm, MRAB goo...@mrabarnett.plus.com wrote: You could use the lazy form *? which tries to match as little as possible, eg \(\?Pfirst.*?\) where the .*? matches: spam:(?Pfirst.*) ham:(?Psecond.*) giving spam:foo ham:(?Psecond.*). A-ha! Of course! That makes perfect sense! Thank

Re: Couple of noobish question

2009-02-04 Thread Gary Herron
Catherine Heathcote wrote: Firstly hi, I don't know any of you yet but am picking up Python and will be lurking here a lot lol. I am a hobbiest coder (did 3 out of 4 years of a comp tech degree, long story) and am learning Python, 'cos I saw some code and it just looks a really nice language

Re: Use list name as string

2009-02-04 Thread Vincent Davis
can I do it the otherway, that issavedata('nameoflist') Thanks Vincent Davis 720-301-3003 On Wed, Feb 4, 2009 at 10:23 AM, Vincent Davis vinc...@vincentdavis.netwrote: I guess what I am saying is that it does not seem like I am adding any information that is not already there when I have to

Re: Date Comparison

2009-02-04 Thread Colin J. Williams
Bill McClain wrote: On 2009-02-03, mohana2...@gmail.com mohana2...@gmail.com wrote: Hi, I need to compare two dates and find the number of days between those two dates.This can be done with datetime module in python as below, but this is not supported in Jython. There are julian day routines

Re: Use list name as string

2009-02-04 Thread Tim Chase
I know nothing but that sucks. I can think of a lot of times I would like to do something similar. There really is no way to do this, it seems like there would be some simple way kind of like str(listname) but backwards or different. Python does the only reasonable thing: doesn't give you

Re: re.sub and named groups

2009-02-04 Thread Yapo Sébastien
Hi everybody, I'm having a ball with the power of regular expression but I stumbled on something I don't quite understand: theOriginalString = spam:(?Pfirst.*) ham:(?Psecond.*) aReplacementPattern = \(\?Pfirst.*\) aReplacementString= foo re.sub(aReplacementPattern , aReplacementString,

Re: Use list name as string

2009-02-04 Thread Tim Chase
can I do it the otherway, that issavedata('nameoflist') for limited cases where your variable is defined globally, you can use: a = [1,2,3,4] def save(s): ... print globals().get(s, UNDEFINED) ... save(a) [1, 2, 3, 4] save(b) UNDEFINED b = (6,5,4,3) save(b)

Re: Use list name as string

2009-02-04 Thread MRAB
Vincent Davis wrote: I guess what I am saying is that it does not seem like I am adding any information that is not already there when I have to enter that list and list name after all they are the same. If you write: y = x then both x and y refer to the same list. The actual names of the

Couple of noobish question

2009-02-04 Thread rdmurray
Quoth Catherine Heathcote catherine.heathc...@gmail.com: all goes well. I have an idea for a small project, an overly simplistic interactive fiction engine (well more like those old choose your own adventure books, used to love those!) that uses XML for its map files. The main issues I see

Running CVSNT commands from python to Automate the job

2009-02-04 Thread sandeep
Hi All, i want to automate my task for of doing cvs checkout for different modules. I am on Windows XP and i am using Python 2.6. here is my attched python code. The thing is when i am running this nothing is happening. I am not sure at which end the problem is. am i giving wrong parameters or

Re: Added-value of frameworks?

2009-02-04 Thread J Kenneth King
Matimus mccre...@gmail.com writes: On Feb 4, 8:08 am, Gilles Ganault nos...@nospam.com wrote: Hello If I wanted to build some social web site such as Facebook, what do frameworks like Django or TurboGears provide over writing a site from scratch using Python? Thank you for your feedback.

Re: len()

2009-02-04 Thread Gabriel Genellina
En Wed, 04 Feb 2009 12:38:04 -0200, Pat p...@junk.net escribió: Andreas Waldenburger wrote: On Sat, 31 Jan 2009 13:27:02 -0500 Pat p...@junk.net wrote: Tobiah wrote: Just out of curiosity, why was len() made to be it's own function? I often find myself typing things like my_list.len before I

Re: is python Object oriented??

2009-02-04 Thread Gabriel Genellina
En Wed, 04 Feb 2009 07:05:22 -0200, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid escribió: Gabriel Genellina a écrit : En Mon, 02 Feb 2009 19:51:11 -0200, Russ P. russ.paie...@gmail.com escribió: Suppose a library developer (or a module developer on a large team) uses

Re: is python Object oriented??

2009-02-04 Thread Terry Reedy
Hendrik van Rooyen wrote: Scott David Daniels s..@acm.org wrote: You might enjoy looking at QNX, since I think it is built along the lines you are describing here. I have an ancient copy of their OS, but haven't followed for more than couple of decades. I vaguely know about it, and I

Re: len()

2009-02-04 Thread Terry Reedy
Pat wrote: Andreas Waldenburger wrote: On Sat, 31 Jan 2009 13:27:02 -0500 Pat p...@junk.net wrote: Tobiah wrote: Just out of curiosity, why was len() made to be it's own function? I often find myself typing things like my_list.len before I catch myself. Thanks, Toby I'm surprised that no

sys.float_info.epsilon

2009-02-04 Thread Tim Rowe
I'm reading Mark Summerfield's Programming Python 3.0 at the moment, and I'm puzzled by some of his uses of sys.float_info.epsilon. I appreciate the issues of comparing floating point numbers, but I'm puzzled by code like: ... x = float(input(msg)) if abs(x) sys.float_info.epsilon:

Re: Tkinter

2009-02-04 Thread Francesco Bochicchio
Luke ha scritto: Hello, I'm an inexperienced programmer and I'm trying to make a Tkinter window and have so far been unsuccessful in being able to delete widgets from the main window and then add new ones back into the window without closing the main window. The coding looks similar to this:

Re: Tkinter

2009-02-04 Thread Scott David Daniels
Luke wrote: Hello, I'm an inexperienced programmer and I'm trying to make a Tkinter window and have so far been unsuccessful in being able to delete widgets from the main window and then add new ones back into the window without closing the main window. The coding looks similar to this: ...

Re: x64 speed

2009-02-04 Thread Martin v. Löwis
Is it the x64 working faster at its design sizes Another guess (still from the darkness of not having received the slightest clue what the test actually does): if it creates integers in range(2**32, 2**64), then they fit into a Python int on AMD64-Linux, but require a Python long on 32-bit

Re: is python Object oriented??

2009-02-04 Thread thmpsn . m . k
On Feb 4, 3:11 am, Bruno Desthuilliers bruno. 42.desthuilli...@websiteburo.invalid wrote: thmpsn@gmail.com a écrit : On Feb 3, 1:14 am, David Cournapeau courn...@gmail.com wrote: (snip) after all, we have used FILE* for years and I have no idea about the FILE structure. Your lack

Re: sys.float_info.epsilon

2009-02-04 Thread Scott David Daniels
Tim Rowe wrote: I'm reading Mark Summerfield's Programming Python 3.0 at the moment, and I'm puzzled by some of his uses of sys.float_info.epsilon. I appreciate the issues of comparing floating point numbers, but I'm puzzled by code like: ... x = float(input(msg)) if abs(x)

Re: sys.float_info.epsilon

2009-02-04 Thread Mark Dickinson
On Feb 4, 7:18 pm, Tim Rowe digi...@gmail.com wrote: I didn't realise that float() could return anything with an absolute value less than sys.float_value.epsilon other than 0.0 (which I think all representations can represent exactly).  What am I missing here? There are many positive

Re: Using lxml to screen scrap a site, problem with charset

2009-02-04 Thread Stefan Behnel
Tim Arnold wrote: ?? ??? gdam...@gmail.com wrote in message news:ciqh56-ses@archaeopteryx.softver.org.mk... So, I'm using lxml to screen scrap a site that uses the cyrillic alphabet (windows-1251 encoding). The sites HTML doesn't have the META ..content-type.. charset=..

Re: sys.float_info.epsilon

2009-02-04 Thread Mark Dickinson
On Feb 4, 7:52 pm, Scott David Daniels scott.dani...@acm.org wrote: You are missing the whole thing that mes floating point tricky. I _believe_ that the epsilon is the smallest positive x such that     1.0 != 1.0 + x Nitpick alert: this isn't quite the same thing, since that definition is

how to compile in jython 2.5b1??

2009-02-04 Thread pellegrinodj
I have to use jython 2.5b1 couse with the stable version it's not possible to use sympy library for mathematic operation but the jythonc.bat it's not included. I look to this link: http://www.jython.org/Project/jythonc.html ..jythonc is unmaintained and will not be present in its current form in

Re: sys.float_info.epsilon

2009-02-04 Thread Steve Holden
Tim Rowe wrote: I'm reading Mark Summerfield's Programming Python 3.0 at the moment, and I'm puzzled by some of his uses of sys.float_info.epsilon. I appreciate the issues of comparing floating point numbers, but I'm puzzled by code like: ... x = float(input(msg)) if abs(x)

Re: [Web 2.0] Added-value of frameworks?

2009-02-04 Thread James Matthews
They provide a nice framework that will handle most of the annoying things. With Django you don't need to write SQL (in a sense). etc.. On Wed, Feb 4, 2009 at 6:08 PM, Gilles Ganault nos...@nospam.com wrote: Hello If I wanted to build some social web site such as Facebook, what do frameworks

Re: is python Object oriented??

2009-02-04 Thread Mark Wooding
Russ P. russ.paie...@gmail.com writes: Imagine you own a company, and you decide to lease an office building. Would you expect the office doors to have locks on them? Oh, you would? Why? You mean you don't trust your co-workers? What are locks but enforced access restriction? Huh? The lock

Upgrade 2.6 to 3.0

2009-02-04 Thread joviyach
I am fairly new to Python, the first version I loaded was 2.6. I have since downloaded 3.0 and I was wondering what the best practice for upgrading is? I am using Windows XP Pro for my OS. Thanks, Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Upgrade 2.6 to 3.0

2009-02-04 Thread Scott David Daniels
joviyach wrote: I am fairly new to Python, the first version I loaded was 2.6. I have since downloaded 3.0 and I was wondering what the best practice for upgrading is? I am using Windows XP Pro for my OS. On Windows, X.Y.* all go in one directory (over-riding each other) So the whole 2.6.*

Re: is python Object oriented??

2009-02-04 Thread Mark Wooding
Steven D'Aprano ste...@remove.this.cybersource.com.au writes: Now, that's a toy example. Languages like Ada make correctness proofs, well, perhaps not easy, but merely difficult compared to impossible for languages like Python. Say `generally impractical' rather than `impossible' and I'll

Re: how to compile in jython 2.5b1??

2009-02-04 Thread Diez B. Roggisch
pellegrin...@gmail.com schrieb: I have to use jython 2.5b1 couse with the stable version it's not possible to use sympy library for mathematic operation but the jythonc.bat it's not included. I look to this link: http://www.jython.org/Project/jythonc.html ..jythonc is unmaintained and will not

Re: Where how to deallocate resources in Python C extension

2009-02-04 Thread Mark Wooding
fredbasset1...@gmail.com writes: I've written a C extension, see code below, to provide a Python interface to a hardware watchdog timer. As part of the initialization it makes some calls to mmap, I am wondering should I be making balanced calls to munmap in some kind of de-init function?

Re: structs

2009-02-04 Thread Keith Thompson
Scott David Daniels scott.dani...@acm.org writes: To avoid using epsilon, do something like: if 1 + abs(x) != 1: An OK effort, but you're wrong. That's not how to do it at all. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to compile in jython 2.5b1??

2009-02-04 Thread ruelle
What do you need jythonc for? That's purely for a somewhat neater integration of *Java* with jython - nothing to do with sympy. Diez I need jythonc to compile a simple script in java, this script import SymPy library. thank you ruelle -- http://mail.python.org/mailman/listinfo/python-list

Re: JDBC in CPYTHON

2009-02-04 Thread M.-A. Lemburg
On 2009-02-03 19:30, KMCB wrote: I was wondering if anyone was aware of a JDBC DBAPI module for cpython. I have looked at PYJDBC and was interested in avoiding using that extra level of ICE. I was thinking maybe someone would have back ported zxJDBC from Jython. Or used that as a starting

Re: structs

2009-02-04 Thread Keith Thompson
Gary Herron gher...@islandtraining.com writes: Python *is* object-oriented I disagree. Care to provide proof of that statement? -- http://mail.python.org/mailman/listinfo/python-list

Re: x64 speed

2009-02-04 Thread M.-A. Lemburg
On 2009-02-04 11:14, Robin Becker wrote: Martin v. Löwis wrote: I follow David's guess that Linux does better IO than Windows (not knowing anything about the benchmark, of course) I originally thought it must be the vmware host stuff offloading IO to the second core, but watching with

Re: Kill a function while it's being executed

2009-02-04 Thread Ben Finney
Noam Aigerman no...@answers.com writes: About the hijacking - I *might* have done it without understanding what I did (replied to a previous message and then changed the subject), if that's what you mean... Right. The message still declares itself (via fields in the header) to be a reply to

Re: Unzipping a .zip properly, and from a remote URL

2009-02-04 Thread M.-A. Lemburg
On 2009-02-03 15:32, Tino Wildenhain wrote: Christopher Culver wrote: Tino Wildenhain t...@wildenhain.de writes: so instead you would use archive = zipfile.ZipFile(remotedata) That produces the following error if I try that in the Python interpreter (URL edited for privacy): import zipfile

  1   2   3   >