Re: Threading / Queue management

2009-02-03 Thread Hendrik van Rooyen
"Power Button" > My question is, how can I create the Queue in my main object and set > the target function for the Thread Constructor to be a function in > foo? Just create it, giving it some name. Then start the static long running stuff, and pass the name you gave it. Pass the name to the t

Re: is python Object oriented??

2009-02-03 Thread Hendrik van Rooyen
Stephen Hansen wrote: 8< - arguments I don't agree with - >P.S. Aiee, this discussion is getting overwhelmingly long. :) It is indeed and I do actually have other stuff to do so I shall try to retreat with defiant dignity. Been fun though, to see the other viewpoints when

Re: is python Object oriented??

2009-02-03 Thread Hendrik van Rooyen
"Diez B. Roggisch" > Your argument would be valid if *any* of the *languages* implementing > encapsulation would offer that real isolation. None does. So where from > comes the feeling that this must be something a *language* should offer? > > Sure one could envision a system where each object

Re: what IDE is the best to write python?

2009-02-03 Thread Thorsten Kampe
* Aahz (2 Feb 2009 09:29:43 -0800) > In article , > Thorsten Kampe wrote: > >* Aahz (2 Feb 2009 06:30:00 -0800) > >> In article <874ozd3cr3@benfinney.id.au>, > >> Ben Finney wrote: > >>>a...@pythoncraft.com (Aahz) writes: > > Just to register a contrary opinion: I *hate* syntax hi

Re: is python Object oriented??

2009-02-03 Thread Steven D'Aprano
On Tue, 03 Feb 2009 03:48:58 +, Rhodri James wrote: > On Tue, 03 Feb 2009 02:16:01 -, Russ P. > wrote: > >> Here we go again. If you have access to the source code (as you nearly >> always do with Python code), then "breaking the language-enforced data >> hiding" is a trivial matter of d

Re: what IDE is the best to write python?

2009-02-03 Thread Thorsten Kampe
* Russ P. (Mon, 2 Feb 2009 22:18:20 -0800 (PST)) > On Feb 2, 9:09 pm, a...@pythoncraft.com (Aahz) wrote: > > You favor bleeding eyes? > > If I am going to bleed anywhere, I'd actually prefer it be somewhere > other than the eyes. Well, maybe not the gonads either. That's a tough > call. In any cas

urllib2.open always send 'Accept-Encoding: gzip, deflate' under Windows

2009-02-03 Thread Yuan HOng
Hi, I wish to send a request without 'Accept-Encoding: gzip, deflate' in the request header. Under Linux, this is not a problem, I got 'Accept-Encoding: identity' by default. However, under Windows (XP SP3 with Python 2.5), no matter what I try, I always got 'Accept-Encoding: gzip, deflate' in th

Re: Varibles -- copies and references

2009-02-03 Thread Ferdinand Sousa
People get a confused because if you pass a mutable object inside a def function and mutate that object the changes /are/ propagated outside-- because now you have a name inside the function and a name outside the object both pointing to the same object. Since tuples are immutable, I guess pass

Re: MySQLdb and MySQL stored functions

2009-02-03 Thread kurt . forrester . fec
On Feb 3, 8:28 am, Dennis Lee Bieber wrote: > On Mon, 2 Feb 2009 23:28:05 -0800 (PST), > kurt.forrester@googlemail.com declaimed the following in > comp.lang.python: > > > However, when I try to use the MySQLdb module it returns an incorrect > > value (it returns 1). > > > I wish to use the DB

Re: is python Object oriented??

2009-02-03 Thread Russ P.
On Feb 3, 12:45 am, Steven D'Aprano wrote: > Another extreme position is that enforced data hiding is useless, that > there is *never* any need for it *at all*, and therefore Python doesn't > need it, there's no reason except stupid PHB's belief in cargo-cult > coding why Python couldn't be used

Re: is python Object oriented??

2009-02-03 Thread Thorsten Kampe
* Russ P. (Mon, 2 Feb 2009 13:51:11 -0800 (PST)) > On Feb 2, 9:02 am, thmpsn@gmail.com wrote: > Several participants here keep repeating that the leading-underscore > convention is perfectly adequate. Aside from the aesthetic problem of > littering code with leading underscores, let me try to e

Re: is python Object oriented??

2009-02-03 Thread Thorsten Kampe
* thmpsn@gmail.com (Mon, 2 Feb 2009 09:02:13 -0800 (PST)) > On Feb 2, 2:55 am, Stephen Hansen wrote: > > > This is proven > > > by your statement above, whereby you are driving a user away, > > > simply because the language, in one small aspect, does not > > > give him what he wants, and the t

Re: Varibles -- copies and references

2009-02-03 Thread Terry Reedy
Ferdinand Sousa wrote: Hi Some weeks back I had been following the thread "Why can't assign to function call". Today, I saw the "function scope" thread, and decided I should ask about the behaviour below: >>> # Simple va

Re: urllib2.open always send 'Accept-Encoding: gzip, deflate' under Windows

2009-02-03 Thread Yuan HOng
Hi, I got the reason. It has nothing to do with Python and its libraries. I have Symantec Client Security installed on the test machine, and it is modifying the content encoding header for outgoing http request, which is a strange thing. Disable the firewall and the problem goes away. -- Hong Y

Re: is python Object oriented??

2009-02-03 Thread Marco Mariani
Thorsten Kampe wrote: This scenario is highly "supposing" and doesn't look like a real-world- case to me. But anyway: the obvious solution in my humble opinion would be to do something like "public_attribute = _private_attribute". But that would be too simple, too "unjavaesque", right?! Yes,

Re: is python Object oriented??

2009-02-03 Thread Thorsten Kampe
* Marco Mariani (Tue, 03 Feb 2009 10:42:06 +0100) > Thorsten Kampe wrote: > > This scenario is highly "supposing" and doesn't look like a > > real-world- case to me. But anyway: the obvious solution in my > > humble opinion would be to do something like "public_attribute = > > _private_attribute".

Re: Bitwise 2009 ($5000 prize money)

2009-02-03 Thread Christof Donat
Hi, > http://www.bitwise.iitkgp.ernet.in/ I'm having quite some fun reading the questions since I got this Post in comp.lang.c++ before. Here it is of topic and this crosspostings will definatelly not be a good advertisement for your contest. Christof -- http://mail.python.org/mailman/listinf

Date Comparison

2009-02-03 Thread mohana2004
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. example from datetime import date a=datetime.date(2009,2,1) b=datetime.date(2008,10,10) c= a-b c.days 114 Is there an

Unzipping a .zip properly, and from a remote URL

2009-02-03 Thread Christopher Culver
Returning to Python after several years away, I'm working on a little script that will download a ZIP archive from a website and unzip it to a mounted filesystem. The code is below, and it works so far, but I'm unsure of a couple of things. The first is, is there a way to read the .zip into memory

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

2009-02-03 Thread Tino Wildenhain
Hi, Christopher Culver wrote: Returning to Python after several years away, I'm working on a little script that will download a ZIP archive from a website and unzip it to a mounted filesystem. The code is below, and it works so far, but I'm unsure of a couple of things. The first is, is there a

Re: Date Comparison

2009-02-03 Thread Diez B. Roggisch
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. > > example > from datetime import date > a=datetime.date(2009,2,1) > b=datetime.

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

2009-02-03 Thread Christopher Culver
Tino Wildenhain 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 >>> import urllib2 >>> remotedata = urllib2.urlopen("http://...file.zip";) >>> archive =

parse date/time from a log entry with only strftime (and no regexen)

2009-02-03 Thread Simon Mullis
Hi All I'm writing a script to help with analyzing log files timestamps and have a very specific question on which I'm momentarily stumped I'd like the script to support multiple log file types, so allow a strftime format to be passed in as a cli switch (default is %Y-%m-%d %H:%M:%S). When i

Re: Date Comparison

2009-02-03 Thread Bill McClain
On 2009-02-03, 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 in this astronomy package: http

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

2009-02-03 Thread Tino Wildenhain
Christopher Culver wrote: Tino Wildenhain 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 import urllib2 remotedata = urllib2.urlopen("http://...file.zip

Re: English-like Python

2009-02-03 Thread J. Cliff Dyer
On Thu, 2009-01-22 at 09:07 -0700, Joe Strout wrote: > >> Beep > >> > >> Doesn't get much more readable and syntax-free than that. > > > > readable doesn't mean smallest amount of syntax possible sometimes > syntax > > increases the readability of a text as you would see if we for > example

Re: Code critique xmlrpclib

2009-02-03 Thread Nick Craig-Wood
flagg 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 to know what some of the more experienced python users > think. Where I could improve code, make it more efficient, whatever

Python ssh with SSH Tectia server

2009-02-03 Thread loial
Has anyone any experiencing with ssh between a python client and the SSH Tectia server from SSH (ssh.com) ? Does it work? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python ssh with SSH Tectia server

2009-02-03 Thread Tino Wildenhain
Hi, loial wrote: Has anyone any experiencing with ssh between a python client and the SSH Tectia server from SSH (ssh.com) ? this might well be. ;) Does it work? Did you try? (It should however since at least openssh client worked) Cheers Tino smime.p7s Description: S/MIME Cryptographi

Re: Date Comparison

2009-02-03 Thread Diez B. Roggisch
Simon Brunning wrote: > 2009/2/3 Diez B. Roggisch : >> Use the java API of java.util. > > Or better still, use Joda. > "dates compare you must?" SCNR. Didn't know of this incarnation of him... Diez -- http://mail.python.org/mailman/listinfo/python-list

Python Global State

2009-02-03 Thread er
Simple question, I think: Is there a way to make a completely global variable across a slew of modules? If not, what is the canonical way to keep a global state? The purpose of this is to try to prevent circular module imports, which just sort of seems nasty. Thank you! -- http://mail.python.org

Re: parse date/time from a log entry with only strftime (and no regexen)

2009-02-03 Thread MRAB
Simon Mullis wrote: > Hi All > > I'm writing a script to help with analyzing log files timestamps and > have a very specific question on which I'm momentarily stumped > > I'd like the script to support multiple log file types, so allow a > strftime format to be passed in as a cli switch (defau

Re: Code critique xmlrpclib

2009-02-03 Thread flagg
On Feb 3, 7:32 am, Nick Craig-Wood wrote: > flagg 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 to know what some of the more experienced python users > >  think. Where

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

2009-02-03 Thread Scott David Daniels
Christopher Culver wrote: Tino Wildenhain 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): remotedata = urllib2.urlopen("http://...file.zip";) archive = zipfile.ZipFi

Re: Python Global State

2009-02-03 Thread MRAB
er wrote: Simple question, I think: Is there a way to make a completely global variable across a slew of modules? If not, what is the canonical way to keep a global state? The purpose of this is to try to prevent circular module imports, which just sort of seems nasty. Thank you! Simple answ

Re: Python Global State

2009-02-03 Thread Gary Herron
er wrote: > Simple question, I think: Is there a way to make a completely global > variable across a slew of modules? No. > If not, what is the canonical way to keep a global state? But this might satisfy: Create a module called, perhaps, global.py which contains your variables. global.py

Re: is python Object oriented??

2009-02-03 Thread Scott David Daniels
Hendrik van Rooyen wrote: "Diez B. Roggisch" ...Sure one could envision a system where each object is running in it's micro-process. ... I would have loved a language that supported it, as well as an operating system (and I do not mean stuff like tiny os and others of that ilk), but one tha

Re: MySQLdb and MySQL stored functions

2009-02-03 Thread Steve Holden
kurt.forrester@googlemail.com wrote: > On Feb 3, 8:28 am, Dennis Lee Bieber wrote: >> On Mon, 2 Feb 2009 23:28:05 -0800 (PST), >> kurt.forrester@googlemail.com declaimed the following in >> comp.lang.python: >> >>> However, when I try to use the MySQLdb module it returns an incorrect >>> v

Re: Date Comparison

2009-02-03 Thread Mark Wooding
mohana2...@gmail.com writes: > 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. > > example > from datetime import date > a=datetime.date(2009,2,1) > b=datetime.date(2

Re: persistent TCP connection in python using socketserver

2009-02-03 Thread Jean-Paul Calderone
On Sat, 31 Jan 2009 09:31:52 -0800 (PST), markobrie...@gmail.com wrote: [snip] Cheers mate I had a look into twisted but was put off by the FAQ stating 1.0+ modules may or may not be stable, and only the 'core' is. I don't wanna be messing around with a potentially buggy server, so im gonna roll

Re: Date Comparison

2009-02-03 Thread Simon Brunning
2009/2/3 Diez B. Roggisch : > Use the java API of java.util. Or better still, use Joda. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: parse date/time from a log entry with only strftime (and no regexen)

2009-02-03 Thread Gabriel Genellina
En Tue, 03 Feb 2009 11:52:07 -0200, Simon Mullis escribió: I'm writing a script to help with analyzing log files timestamps and have a very specific question on which I'm momentarily stumped I'd like the script to support multiple log file types, so allow a strftime format to be pas

Re: Problem using compileall

2009-02-03 Thread Gabriel Genellina
En Tue, 03 Feb 2009 05:53:06 -0200, Stephen Hansen escribió: I'm having a slight problem with pre-compiling some files for distribution that I'm not sure where to even look for. An excerpt from an output: C:\mother\Python24\core\application\sysconfig>python -m compileall . Listing

Re: what IDE is the best to write python?

2009-02-03 Thread Aahz
In article , Thorsten Kampe wrote: >* Aahz (2 Feb 2009 09:29:43 -0800) >> In article , >> Thorsten Kampe wrote: >>>* Aahz (2 Feb 2009 06:30:00 -0800) In article <874ozd3cr3@benfinney.id.au>, Ben Finney wrote: >a...@pythoncraft.com (Aahz) writes: >> >> Just to registe

Window (tkinter) with no decoration

2009-02-03 Thread Djames Suhanko
Hello, programmers! I would like to do a menu bar like kicker or windows menu. is possible? -- Djames Suhanko LinuxUser 158.760 -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem using compileall

2009-02-03 Thread Stephen Hansen
> Try this to discover whether the file actually contains a NUL byte or not: > > f = open("BulkListClass.py","rb") > src = f.read() > i = src.index('\0') > print "found NUL at index", i > print repr(src[i-20:i+20]) Doh. It did. How the heck did that get there! I hadn't thought to actually look --

Re: Source code for csv module

2009-02-03 Thread Jon Clements
On 3 Feb, 04:27, Tim Roberts wrote: > vsoler wrote: > > >I'm still interested in learning python techniques. Are there any > >other modules (standard or complementary) that I can use in my > >education? > > Are you serious about this?  Are you not aware that virtually ALL of the > Python standard

Re: Where & how to deallocate resources in Python C extension

2009-02-03 Thread Gabriel Genellina
En Mon, 02 Feb 2009 21:03:18 -0200, escribió: 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 fu

Find the critical points

2009-02-03 Thread antoniosacchi85
someone can help me?? I am new to programing, but I need to make some script like this: http://blogs.nyu.edu/blogs/agc282/zia/2008/11/using_python_to_solve_optimiza.html so th equestion is : is possible to open it than it ask something and it tell me the result?? thank you!! p.s. this is my hessian

Re: Python Global State

2009-02-03 Thread Scott David Daniels
Gary Herron wrote: er wrote: Simple question, I think: Is there a way to make a completely global variable across a slew of modules? ... Create a module called, perhaps, global.py which contains your variables. Bad choice of names (a reserved word). Use globals, or data or global_. Othe

Re: is python Object oriented??

2009-02-03 Thread Дамјан Георгиевски
> Why? - Python is object oriented, but I can write whole systems > without defining a single class. > By analogy, if data hiding is added to language, I could write a > whole system without hiding a single item. I guess the problem is that you would not be able to use some libraries because the

Safe to get address of va_list function parameter?

2009-02-03 Thread Keith
Is it safe to get the address of a va_list function parameter? Keith -- http://mail.python.org/mailman/listinfo/python-list

x64 speed

2009-02-03 Thread Robin Becker
Whilst doing some portability testing with reportlab I noticed a strange speedup for our unittest suite with python2.5 host win32 xp3 unittest time=42.2 seconds vmware RHEL x64 unittest time=30.9 seconds so it looks like the vmware emulated system is much faster. Is it the x64 working faster

Re: is python Object oriented??

2009-02-03 Thread thmpsn . m . k
On Feb 3, 1:14 am, David Cournapeau wrote: > On Tue, Feb 3, 2009 at 2:37 PM, Russ P. wrote: > > On Feb 2, 7:48 pm, "Rhodri James" wrote: > >> On Tue, 03 Feb 2009 02:16:01 -, Russ P. wrote: > >> > Here we go again. If you have access to the source code (as you nearly > >> > always do with Py

Re: x64 speed

2009-02-03 Thread Tim Daneliuk
Robin Becker wrote: > Whilst doing some portability testing with reportlab I noticed a strange > speedup for our unittest suite with python2.5 > > host win32 xp3 unittest time=42.2 seconds > vmware RHEL x64 unittest time=30.9 seconds > > so it looks like the vmware emulated system is much faster

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

2009-02-03 Thread Victor Lin
Hi, I am developing a program that use DirectShow to grab audio data from media files. DirectShow use thread to pass audio data to the callback function in my program, and I let that callback function call another function in Python. I use Boost.Python to wrapper my library, the callback function

Re: Bitwise 2009 ($5000 prize money)

2009-02-03 Thread Steve Holden
Christof Donat wrote: > Hi, > >> http://www.bitwise.iitkgp.ernet.in/ > > I'm having quite some fun reading the questions since I got this Post in > comp.lang.c++ before. Here it is of topic and this crosspostings will > definatelly not be a good advertisement for your contest. > Thanks you so

Re: Extracting file from zip archive in Python 2.6.1

2009-02-03 Thread Gabriel Genellina
En Tue, 03 Feb 2009 05:31:24 -0200, Brandon Taylor escribió: I'm having an issue specifying the path for extracting files from a .zip archive. In my method, I have: zip_file.extract(zip_name + '/' + thumbnail_image, thumbnail_path) What is happening is that the extract method is creating a

Re: is python Object oriented??

2009-02-03 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Tue, 03 Feb 2009 03:48:58 +, Rhodri James wrote: On Tue, 03 Feb 2009 02:16:01 -, Russ P. wrote: Here we go again. If you have access to the source code (as you nearly always do with Python code), then "breaking the language-enforced data hiding" is a triv

New filters? was: Re: Bitwise 2009 ($5000 prize money)

2009-02-03 Thread Francesco Guerrieri
On Tue, Feb 3, 2009 at 6:56 PM, Steve Holden wrote: > Thanks you so much, Christof. The spam filters successfully kept this > URL out of c.l.py until you took the trouble to re-publish it. > > regards > Steve > Speaking of which: it seems to me that the amount of spam that I receive from clpy h

Re: what IDE is the best to write python?

2009-02-03 Thread Stef Mientki
> > > Clip Libraries are stored in simple text files. > > This is such a simple concept but is so very productive. Who needs an IDE?. > I would love to have a Linux text editor (like Scite or GEdit) that could do > this. > The code snippet manager, part of a huge IDE, but can be used as a standalo

Re: is python Object oriented??

2009-02-03 Thread David Cournapeau
On Wed, Feb 4, 2009 at 2:36 AM, wrote: > On Feb 3, 1:14 am, David Cournapeau wrote: >> On Tue, Feb 3, 2009 at 2:37 PM, Russ P. wrote: >> > On Feb 2, 7:48 pm, "Rhodri James" wrote: >> >> On Tue, 03 Feb 2009 02:16:01 -, Russ P. >> >> wrote: >> >> > Here we go again. If you have access to t

Re: Import without executing module

2009-02-03 Thread Lie
On Feb 3, 1:37 pm, Ray wrote: > I'll enclose the top-level commands with the if statement above...its > just a minor change, but it seems unavoidable. > > Thanks again! > > Ray If you really don't want the file to be changed, you could (depends on the module) use the module as a subprocess. The i

Re: what IDE is the best to write python?

2009-02-03 Thread Marco Mariani
Russ P. wrote: highlighting. Not that it really helps much, but it "spices up" the code and stimulates the eyes and brain. When I see the same code without color highlighting, it just seems bland, like something is missing. It seems like just "text" rather than "code." Plus, it can be configur

Re: x64 speed

2009-02-03 Thread David Cournapeau
On Wed, Feb 4, 2009 at 2:36 AM, Robin Becker wrote: > Whilst doing some portability testing with reportlab I noticed a strange > speedup for our unittest suite with python2.5 > > host win32 xp3 unittest time=42.2 seconds > vmware RHEL x64 unittest time=30.9 seconds > > so it looks like the vmware

Re: what IDE is the best to write python?

2009-02-03 Thread Tim Rowe
2009/2/3 Jervis Whitley : > real programmers use ed. Ed? Eee, tha' were lucky. We had to make holes in Hollerith cards wi' our bare teeth... -- Tim Rowe -- http://mail.python.org/mailman/listinfo/python-list

Re: what IDE is the best to write python?

2009-02-03 Thread Alan G Isaac
On 2/1/2009 2:42 AM mcheun...@hotmail.com apparently wrote: Hi all what IDE is the best to write python? http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-vim/ Alan Isaac PS Also maybe see: http://vim.sourceforge.net/scripts/script.php?script_id=30 http://www.builderau.com.au/

imaplib thread method anomaly

2009-02-03 Thread Mr SZ
Hi, I was looking at the thread functionality of IMAP4rev1 servers with the threading extension. Here is my output with debug=8 : 02:23.02 > GDJB3 UID THREAD references UTF-8 (SEEN) 02:23.02 < * THREAD (3)(2)(4)(1) 02:23.02 matched r'\* (?P[A-Z-]+)( (?P.*))?' => ('THREAD', ' (3)(2)

Re: what IDE is the best to write python?

2009-02-03 Thread Catherine Heathcote
Tim Rowe wrote: 2009/2/3 Jervis Whitley : real programmers use ed. Ed? Eee, tha' were lucky. We had to make holes in Hollerith cards wi' our bare teeth... You had teeth!?! Oh and hi, I shall be a new face in the crowd ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of bits/sizeof int

2009-02-03 Thread Mark Dickinson
On Feb 3, 1:19 am, Mark Wooding wrote: > Yeah, I made some arbitrary choices about what to do with non-positive > inputs.  If you prefer other answers, use 'em.  My ones work well with > signed-magnitude representations where the sign is stored separately. Not *that* arbitrary: they're the same

Re: Python Global State

2009-02-03 Thread rdmurray
Quoth MRAB : > er wrote: > > Simple question, I think: Is there a way to make a completely global > > variable across a slew of modules? If not, what is the canonical > > way to keep a global state? The purpose of this is to try to prevent > > circular module imports, which just sort of seems nas

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

2009-02-03 Thread Philip Semanchuk
On Feb 3, 2009, at 12:51 PM, Victor Lin wrote: It seems that my program can't call to Python's function from thread directly, because there is Global Interpreter Lock. The python's GIL is so complex, I have no idea how it works. I'm sorry, what I can do is to ask. My question is. What should I

Path question

2009-02-03 Thread Geert Vancompernolle
Hi, I have the following path construction: ./src/__init__.py /main.py /modules/__init__.py /application.py /ui/__init__.py /mainwindow/__init__.py /mainwindow.py Now I want to call the method 'MainWindow' in the module 'mainwindow', from the mo

Re: what IDE is the best to write python?

2009-02-03 Thread rdmurray
Quoth a...@pythoncraft.com (Aahz): > In article , > Thorsten Kampe wrote: > >* Aahz (2 Feb 2009 09:29:43 -0800) > >> In article , > >> Thorsten Kampe wrote: > >>>* Aahz (2 Feb 2009 06:30:00 -0800) > In article <874ozd3cr3@benfinney.id.au>, > Ben Finney wrote: > >a...@pythonc

Re: Python Global State

2009-02-03 Thread er
That was my hack for one other app, but I did it because I'd only been studying Python for a month or two. Glad to see others did it once as well, but that we all wised up. =P It might be nice if Python could provide a global dictionary, perhaps _G{}, where you can throw things. This is actuall

Re: is python Object oriented??

2009-02-03 Thread thmpsn . m . k
On Feb 3, 12:05 pm, David Cournapeau wrote: > On Wed, Feb 4, 2009 at 2:36 AM,   wrote: > > On Feb 3, 1:14 am, David Cournapeau wrote: > >> On Tue, Feb 3, 2009 at 2:37 PM, Russ P. wrote: > >> > On Feb 2, 7:48 pm, "Rhodri James" wrote: > >> >> On Tue, 03 Feb 2009 02:16:01 -, Russ P. > >> >>

Re: Path question

2009-02-03 Thread Diez B. Roggisch
Geert Vancompernolle schrieb: Hi, I have the following path construction: ./src/__init__.py /main.py /modules/__init__.py /application.py /ui/__init__.py /mainwindow/__init__.py /mainwindow.py Now I want to call the method 'MainWindow' in the mo

kinterbasdb + firebird 1.5 with python 2.6 ?

2009-02-03 Thread Laszlo Nagy
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? -- http://mail.python.org/mailman/listinfo

Re: what IDE is the best to write python?

2009-02-03 Thread Steve Holden
Tim Rowe wrote: > 2009/2/3 Jervis Whitley : > >> real programmers use ed. > > Ed? Eee, tha' were lucky. We had to make holes in Hollerith cards wi' > our bare teeth... > Cards? Teeth? You were lucky! We 'ad ter stare at t'paper tape until the intensity of our gaze burned holes in it. If yer got

Re: x64 speed

2009-02-03 Thread Martin v. Löwis
Robin Becker wrote: > Whilst doing some portability testing with reportlab I noticed a strange > speedup for our unittest suite with python2.5 > > host win32 xp3 unittest time=42.2 seconds > vmware RHEL x64 unittest time=30.9 seconds > > so it looks like the vmware emulated system is much faster

Re: Extracting file from zip archive in Python 2.6.1

2009-02-03 Thread Brandon Taylor
On Feb 3, 9:45 am, "Gabriel Genellina" wrote: > En Tue, 03 Feb 2009 05:31:24 -0200, Brandon Taylor   > escribió: > > > I'm having an issue specifying the path for extracting files from > > a .zip archive. In my method, I have: > > > zip_file.extract(zip_name + '/' + thumbnail_image, thumbnail_pat

Re: Window (tkinter) with no decoration

2009-02-03 Thread Djames Suhanko
Exactly ! I thank you very much, Matimus !!! >> I would like to do a menu bar like kicker or windows menu. is possible? > Maybe you are looking for this? > rt = Tkinter.Tk() > rt.overrideredirect(True) -- Djames Suhanko LinuxUser 158.760 -- http://mail.python.org/mailman/listinfo/python-list

Re: x64 speed

2009-02-03 Thread Diez B. Roggisch
Robin Becker schrieb: Whilst doing some portability testing with reportlab I noticed a strange speedup for our unittest suite with python2.5 host win32 xp3 unittest time=42.2 seconds vmware RHEL x64 unittest time=30.9 seconds so it looks like the vmware emulated system is much faster. Is it t

python libpcap equivalent

2009-02-03 Thread Gabriel
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 equivalent in python a

Re: English-like Python

2009-02-03 Thread Steve Holden
J. Cliff Dyer wrote: > On Tue, 2009-02-03 at 08:33 -0700, Joe Strout wrote: >> J. Cliff Dyer wrote: >> >>> But what if your language allows functions to be used as first class >>> objects? (Mine does :)) >>> >>> x = Beep >>> >>> Does that assign the name x to the Beep object or does it assign th

Re: is python Object oriented??

2009-02-03 Thread Gabriel Genellina
En Mon, 02 Feb 2009 19:51:11 -0200, Russ P. 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 developer decides to change a "private" attribute to public

Re: kinterbasdb + firebird 1.5 with python 2.6 ?

2009-02-03 Thread imageguy
On Feb 3, 2:32 pm, 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 > > A

Re: x64 speed

2009-02-03 Thread Paul Rubin
Robin Becker writes: > so it looks like the vmware emulated system is much faster. Is it the > x64 working faster at its design sizes or perhaps the compiler or > could it be the vmware system caching all writes etc etc? For the red > hat x64 build the only special configuration was to use ucs2 Y

Re: Python Global State

2009-02-03 Thread Gabriel Genellina
En Tue, 03 Feb 2009 17:10:18 -0200, er escribió: It might be nice if Python could provide a global dictionary, perhaps _G{}, where you can throw things. This is actually the solution provided by the Lua scripting language. Thanks for the global_ module solution, I was just making sure t

Re: x64 speed

2009-02-03 Thread Martin v. Löwis
>> 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 going on with th

Cross platform compilation?

2009-02-03 Thread John Harper
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 successfully built Python itself, but building the extensions fails miser

Financial aid for PyCon 2009 is now available

2009-02-03 Thread ted
I'm happy to announce that the Python Software Foundation has allocated some funds to help people attend PyCon 2009! If you would like to come to PyCon but can't afford it, the PSF may be able to help you pay for registration, lodging/hotel costs and transportation (flight etc.). Please see http:

Re: Reading text file with wierd file extension?

2009-02-03 Thread John Machin
On Feb 3, 8:07 am, "Diez B. Roggisch" wrote: > > This is written very slowly, so you can read it better: > > Please post the traceback. *AND* please post the text of the IOError message *AND* please do yourself a favour and move your files out of the root directory into a directory with a meani

Re: Reading text file with wierd file extension?

2009-02-03 Thread Lionel
On Feb 2, 2:07 pm, John Machin wrote: > On Feb 3, 8:43 am, Lionel wrote: > > >         ResourceFilepath = DataFilepath + ".src" > > Don't you mean ".rsc"? Good Grief!!! That's It!! I've been staring at it all day and I didn't see it. I'm sorry I've wasted everyone's time. This is bloody embaras

Re: JDBC in CPYTHON

2009-02-03 Thread Simon Brunning
2009/2/3 KMCB : > 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 point, to > cre

Re: Reading text file with wierd file extension?

2009-02-03 Thread Steve Holden
John Machin wrote: > On Feb 3, 8:07 am, "Diez B. Roggisch" wrote: > >> This is written very slowly, so you can read it better: >> >> Please post the traceback. > > *AND* please post the text of the IOError message > > *AND* please do yourself a favour and move your files out of the root > direc

Re: python libpcap equivalent

2009-02-03 Thread Grant Edwards
On 2009-02-03, Gabriel wrote: > I need to write a software router [yes, software equivalent to > hardware box that is routing packets .)]. It's a school work.. > Question is: is possible write this kind of application in > python? Hmm. It's going to be rather difficult, but you might be able t

Re: Locating python

2009-02-03 Thread David Sevilla
On Feb 3, 11:30 pm, andrew cooke wrote: > the exact details of what you are reporting seem a bit odd, but i have > seen a similar error because i have tried to use my own account to > install the package, instead of using root. > > what i believe happens is that easy_install first tries to create

Re: Locating python

2009-02-03 Thread andrew cooke
sorry, you are using easy_install, so sudo easy_install instead of what i said a moment ago. the important thing is to use "sudo". andrew On Feb 3, 7:30 pm, andrew cooke wrote: > the exact details of what you are reporting seem a bit odd, but i have > seen a similar error because i ha

Re: Cross platform compilation?

2009-02-03 Thread Christian Heimes
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 successfully built Python itself, but buildin

  1   2   >