CrunchyFrog 0.3.0 released

2008-10-24 Thread Andi Albrecht
I'm pleased to announce CrunchyFrog 0.3.0. CrunchyFrog is a database front-end for GNOME. Skip down for more information. Download: http://crunchyfrog.googlecode.com/files/crunchyfrog-0.3.0.tar.gz Changes in 0.3.0 New Features * Support for GNOME keyring. *

Re: How to examine the inheritance of a class?

2008-10-24 Thread Steven D'Aprano
On Thu, 23 Oct 2008 20:53:03 -0700, John Ladasky wrote: On Oct 23, 6:59 pm, James Mills [EMAIL PROTECTED] wrote: Developer. NOT User. For the foreseeable future, this program is for my use only. So the developer and the user are one and the same. And, thank you, __bases__ is what I

Re: Will Python 3 be stackless?

2008-10-24 Thread davy zhang
multiprocessing is good enough for now, On Fri, Oct 24, 2008 at 4:30 AM, Diez B. Roggisch [EMAIL PROTECTED] wrote: Phillip B Oldham schrieb: On Thu, Oct 23, 2008 at 9:20 PM, Chris Rebert [EMAIL PROTECTED] wrote: No, it will definitely not. From your statement (and I'm terribly sorry if

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread greg
Andy wrote: 1) Independent interpreters (this is the easier one--and solved, in principle anyway, by PEP 3121, by Martin v. Löwis Something like that is necessary for independent interpreters, but not sufficient. There are also all the built-in constants and type objects to consider. Most of

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Martin v. Löwis
You seem confused. PEP 3121 is for isolated interpreters (ie emulated processes), not threading. Just a small remark: this wasn't the primary objective of the PEP. The primary objective was to support module cleanup in a reliable manner, to allow eventually to get modules garbage-collected

Re: python3 - the hardest hello world ever ?

2008-10-24 Thread henning . vonbargen
Many thanks, it works when setting the LANG environment variable. BTW: For Windows users, when running Python command-line programs, you can also modify the properties of the cmd.exe window and tell windows to use the TT Lucida Console font instead of the raster font. Then, before starting the

Re: Logger / I get all messages 2 times

2008-10-24 Thread ASh
On Oct 23, 5:10 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: ASh wrote: Hi, I have this source: import logging import logging.config logging.config.fileConfig(logging.properties) log = logging.getLogger(qname) log.debug(message) --- OUTPUT DEBUG

Re: Question about scope

2008-10-24 Thread Bruno Desthuilliers
Pat a écrit : (snip) Stripping out the extra variables and definitions, this is all that there is. Whether or not this technique is *correct* programming is irrelevant. It's obviously relevant. If it was correct, it would work, and you wouldn't be asking here !-) I simply want to know

Re: File Upload Size

2008-10-24 Thread rodmc
On Oct 13, 11:55 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: rodmc wrote: On 13 Oct, 00:10, Mike Driscoll [EMAIL PROTECTED] wrote: On Oct 12, 9:34 am, rodmc [EMAIL PROTECTED] wrote: Hi, Is there a way to get the size of a file on a remote machine before it is uploaded? I would

@property decorator doesn't raise exceptions

2008-10-24 Thread Rafe
Hi, I've encountered a problem which is making debugging less obvious than it should be. The @property decorator doesn't always raise exceptions. It seems like it is bound to the class but ignored when called. I can see the attribute using dir(self.__class__) on an instance, but when called,

dictionary

2008-10-24 Thread asit
what the wrong with the following code d={server:mpilgrim,database:master, ... uid:sa, ... pwd:secret} d {'pwd': 'secret', 'database': 'master', 'uid': 'sa', 'server': 'mpilgrim'} [%s=%s % (k,v) for k,v in d.items()] File stdin, line 1 [%s=%s % (k,v) for k,v in d.items()]

Re: dictionary

2008-10-24 Thread Duncan Booth
asit [EMAIL PROTECTED] wrote: [%s=%s % (k,v) for k,v in d.items()] The first opens a string, the second terminates it, the third opens it again, and you don't have a fourth in your line to close it. Try using an editor which supports syntax colouring (even Idle does this) and the

Re: substitution __str__ method of an instance

2008-10-24 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: However, you can dispatch back to the instance if you really must: class MyObj(object): def __init__(self): self.__str__ = lambda self: I'm an object! def __str__(self): return self.__str__(self) But honestly, this

Re: dictionary

2008-10-24 Thread Tim Chase
[%s=%s % (k,v) for k,v in d.items()] File stdin, line 1 [%s=%s % (k,v) for k,v in d.items()] ^ SyntaxError: EOL while scanning single-quoted string You have three quotation marks... you want %s=%s not %s=%s -tkc --

Re: Building truth tables

2008-10-24 Thread andrea
On 26 Set, 20:01, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: Good idea.  If you want prefixed operators: 'and( a, b )' instead of 'a and b', you'll have to write your own.  ('operator.and_' is bitwise only.)  It may be confusing to mix prefix with infix: 'impl( a and b, c )', so you

Re: File Upload Size

2008-10-24 Thread Diez B. Roggisch
Thanks. I have basic file uploading working, however is there a limit to what can be uploaded via form? It works perfectly for up to around 20MB then breaks. There is no limit, but the larger the upload, the larger the chance of a failure. I'm currently not exactly sure if there is a way to

Re: @property decorator doesn't raise exceptions

2008-10-24 Thread Christian Heimes
Rafe wrote: Hi, I've encountered a problem which is making debugging less obvious than it should be. The @property decorator doesn't always raise exceptions. It seems like it is bound to the class but ignored when called. I can see the attribute using dir(self.__class__) on an instance, but

Re: look-behind fixed width issue (package re)

2008-10-24 Thread MRAB
On Oct 24, 6:29 am, Peng Yu [EMAIL PROTECTED] wrote: Hi, It seem that the current python requires fixed-width pattern for look- behind. I'm wondering if there is any newly development which make variable-width pattern available for look-behind. The re module is currently being worked on, but

Re: regexp in Python (from Perl)

2008-10-24 Thread Pat
Bruno Desthuilliers wrote: MRAB a écrit : On Oct 19, 5:47 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Pat a écrit : (snip) ip = ip[ :-1 ] ip =+ '9' or: ip = ip[:-1]+9 (snip) re.sub(r'^(((\d+)\.){3})\d+$', \g19, 192.168.1.1) '192.168.1.9' re.sub(r'^(((\d+)\.){3})\d+$', \g19,

Re: dictionary

2008-10-24 Thread asit
On Oct 24, 3:06 pm, Tim Chase [EMAIL PROTECTED] wrote: [%s=%s % (k,v) for k,v in d.items()] File stdin, line 1 [%s=%s % (k,v) for k,v in d.items()] ^ SyntaxError: EOL while scanning single-quoted string You have three quotation marks...

Re: Need some advice

2008-10-24 Thread Larry Bates
alex23 wrote: On Oct 23, 3:15 pm, Larry Bates [EMAIL PROTECTED] wrote: Bruno is correct, the protocol IS https, you don't type shttp into your browser get secure http connection. https[1] and shttp[2] are two entirely different protocols. [1] http://en.wikipedia.org/wiki/Https [2]

Re: look-behind fixed width issue (package re)

2008-10-24 Thread Gerhard Häring
MRAB wrote: On Oct 24, 6:29 am, Peng Yu [EMAIL PROTECTED] wrote: Hi, It seem that the current python requires fixed-width pattern for look- behind. I'm wondering if there is any newly development which make variable-width pattern available for look-behind. The re module is currently being

Re: dictionary

2008-10-24 Thread Steven D'Aprano
On Fri, 24 Oct 2008 10:04:32 +, Duncan Booth wrote: asit [EMAIL PROTECTED] wrote: [%s=%s % (k,v) for k,v in d.items()] The first opens a string, the second terminates it, the third opens it again, and you don't have a fourth in your line to close it. Try using an editor which

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread sturlamolden
Instead of appdomains (one interpreter per thread), or free threading, you could use multiple processes. Take a look at the new multiprocessing module in Python 2.6. It has roughly the same interface as Python's threading and queue modules, but uses processes instead of threads. Processes are

using modules in destructors

2008-10-24 Thread [EMAIL PROTECTED]
Hi i have i have a class that makes temp folders to do work in. it keeps track of them, so that in the __del__() it can clean them up. ideally if the user of the module still has objects left at the end of their program, they should be automatically cleaned up. in my destructor i had a call to

Re: File Upload Size

2008-10-24 Thread rodmc
Hi Diez, Thanks, I will look on Google again, to date though all examples I have used come up against similar problems. As for HTTP framework and libraries, I will see what is currently supported. At present I am using standard Python libraries. Best, rod --

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
On Oct 24, 9:35 am, sturlamolden [EMAIL PROTECTED] wrote: Instead of appdomains (one interpreter per thread), or free threading, you could use multiple processes. Take a look at the new multiprocessing module in Python 2.6. That's mentioned earlier in the thread. There is a fundamental

Re: using modules in destructors

2008-10-24 Thread Michele Simionato
This is expected behavior (see http://www.python.org/doc/essays/cleanup) but it is definitely a wart of Python. The best advice I can give you is *never* use __del__. There are alternatives, such as the with statement, weak references or atexit. See for instance

Re: Logger / I get all messages 2 times

2008-10-24 Thread Vinay Sajip
On Oct 24, 8:28 am, ASh [EMAIL PROTECTED] wrote: On Oct 23, 5:10 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: ASh wrote: Hi, I have this source: importlogging importlogging.config logging.config.fileConfig(logging.properties) log =logging.getLogger(qname)

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Stefan Behnel
Terry Reedy wrote: Everything in DLLs is compiled C extensions. I see about 15 for Windows 3.0. Ah, weren't that wonderful times back in the days of Win3.0, when DLL-hell was inhabited by only 15 libraries? *sigh* ... although ... wait, didn't Win3.0 have more than that already? Maybe you

Re: How to get the actual address of a object

2008-10-24 Thread mujunshan
On 10月24日, 下午1时10分, James Mills [EMAIL PROTECTED] wrote: On Fri, Oct 24, 2008 at 2:58 PM, [EMAIL PROTECTED] wrote: maybe id(x) can get it ,but how to cast it back into a object You can't. Python is NOT C/C++/Java or whatever. If you have a variable, x, and you want to copy it to another

Re: Python equivalent to SharePoint?

2008-10-24 Thread ivandatasync
I have read about both Plone and Alfresco being considered as alternatives to Sharepoint and unfortunately they may not be enough if you require everything Sharepoint has too offer. Plone and Alfresco are both great applications but out of the box they are too focused to be complete replacements.

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread sturlamolden
On Oct 24, 3:58 pm, Andy O'Meara [EMAIL PROTECTED] wrote: This is discussed earlier in the thread--they're unfortunately all out. It occurs to me that tcl is doing what you want. Have you ever thought of not using Python? That aside, the fundamental problem is what I perceive a fundamental

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
On Oct 24, 2:12 am, greg [EMAIL PROTECTED] wrote: Andy wrote: 1) Independent interpreters (this is the easier one--and solved, in principle anyway, by PEP 3121, by Martin v. Löwis Something like that is necessary for independent interpreters, but not sufficient. There are also all the

Re: look-behind fixed width issue (package re)

2008-10-24 Thread Peng Yu
Most probably a backport to Python 2.6 or even 2.5 under a different module name like re_ng wouldn't be too difficult to do for anybody that needs the new functionality and knows a bit about building extension modules. I did a google a search. But I don't find any document that describe it.

Re: More efficient array processing

2008-10-24 Thread sturlamolden
On Oct 23, 8:11 pm, John [H2O] [EMAIL PROTECTED] wrote: datagrid = numpy.zeros(360,180,3,73,20) On a 32 bit system, try this instead: datagrid = numpy.zeros((360,180,3,73,20), dtype=numpy.float32) (if you can use single precision that is.) --

Re: dictionary

2008-10-24 Thread Peter Pearson
On 24 Oct 2008 13:17:45 GMT, Steven D'Aprano wrote: What are programmers coming to these days? When I was their age, we were expected to *read* the error messages our compilers gave us, not turn to the Interwebs for help as soon there was the tiniest problem. Yes, and what's more, the text

Re: look-behind fixed width issue (package re)

2008-10-24 Thread Steven D'Aprano
On Fri, 24 Oct 2008 07:43:16 -0700, Peng Yu wrote: Most probably a backport to Python 2.6 or even 2.5 under a different module name like re_ng wouldn't be too difficult to do for anybody that needs the new functionality and knows a bit about building extension modules. I did a google a

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
That aside, the fundamental problem is what I perceive a fundamental design flaw in Python's C API. In Java JNI, each function takes a JNIEnv* pointer as their first argument. There  is nothing the prevents you from embedding several JVMs in a process. Python can create embedded

Re: dictionary

2008-10-24 Thread Steven D'Aprano
On Fri, 24 Oct 2008 14:53:19 +, Peter Pearson wrote: On 24 Oct 2008 13:17:45 GMT, Steven D'Aprano wrote: What are programmers coming to these days? When I was their age, we were expected to *read* the error messages our compilers gave us, not turn to the Interwebs for help as soon there

Re: python extensions: including project local headers

2008-10-24 Thread J Kenneth King
Philip Semanchuk [EMAIL PROTECTED] writes: On Oct 23, 2008, at 3:18 PM, J Kenneth King wrote: Philip Semanchuk [EMAIL PROTECTED] writes: On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Patrick Stinson
I'm not finished reading the whole thread yet, but I've got some things below to respond to this post with. On Thu, Oct 23, 2008 at 9:30 AM, Glenn Linderman [EMAIL PROTECTED] wrote: On approximately 10/23/2008 12:24 AM, came the following characters from the keyboard of Christian Heimes: Andy

Re: Py2exe and Module Error...

2008-10-24 Thread Mike Driscoll
On Oct 23, 5:02 pm, [EMAIL PROTECTED] wrote: On Oct 22, 8:33 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 22 Oct 2008 20:34:39 -0200, [EMAIL PROTECTED] escribió: I am using py2exe and everything is working fine except one module, ClientCookie, found here:

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
Glenn, great post and points! Andy seems to want an implementation of independent Python processes implemented as threads within a single address space, that can be coordinated by an outer application.  This actually corresponds to the model promulgated in the paper as being most likely to

print statements not sent to nohup.out

2008-10-24 Thread John [H2O]
Just a quick question.. what do I need to do so that my print statements are caught by nohup?? Yes, I should probably be 'logging'... but hey.. Thanks! -- View this message in context: http://www.nabble.com/print-statements-not-sent-to-nohup.out-tp20152780p20152780.html Sent from the Python -

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Patrick Stinson
We are in the same position as Andy here. I think that something that would help people like us produce something in code form is a collection of information outlining the problem and suggested solutions, appropriate parts of the CPython's current threading API, and pros and cons of the many

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Patrick Stinson
As a side note to the performance question, we are executing python code in an audio thread that is used in all of the top-end music production environments. We have found the language to perform extremely well when executed at control-rate frequency, meaning we aren't doing DSP computations, just

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Terry Reedy
Stefan Behnel wrote: Terry Reedy wrote: Everything in DLLs is compiled C extensions. I see about 15 for Windows 3.0. Ah, weren't that wonderful times back in the days of Win3.0, when DLL-hell was inhabited by only 15 libraries? *sigh* ... although ... wait, didn't Win3.0 have more than that

Re: dictionary

2008-10-24 Thread asit
On Oct 24, 8:01 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Fri, 24 Oct 2008 14:53:19 +, Peter Pearson wrote: On 24 Oct 2008 13:17:45 GMT, Steven D'Aprano wrote: What are programmers coming to these days? When I was their age, we were expected to *read* the error

Re: dictionary

2008-10-24 Thread Terry Reedy
asit wrote: what the wrong with the following code d={server:mpilgrim,database:master, ... uid:sa, ... pwd:secret} d {'pwd': 'secret', 'database': 'master', 'uid': 'sa', 'server': 'mpilgrim'} [%s=%s % (k,v) for k,v in d.items()] File stdin, line 1 [%s=%s % (k,v) for k,v in

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Jesse Noller
On Fri, Oct 24, 2008 at 10:40 AM, Andy O'Meara [EMAIL PROTECTED] wrote: 2) Barriers to free threading. As Jesse describes, this is simply just the GIL being in place, but of course it's there for a reason. It's there because (1) doesn't hold and there was never any specs/ guidance put

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Jesse Noller
On Fri, Oct 24, 2008 at 12:30 PM, Jesse Noller [EMAIL PROTECTED] wrote: On Fri, Oct 24, 2008 at 10:40 AM, Andy O'Meara [EMAIL PROTECTED] wrote: 2) Barriers to free threading. As Jesse describes, this is simply just the GIL being in place, but of course it's there for a reason. It's there

Re: @property decorator doesn't raise exceptions

2008-10-24 Thread Rafe
On Oct 24, 2:21 am, Christian Heimes [EMAIL PROTECTED] wrote: Rafewrote: Hi, I've encountered a problem which is making debugging less obvious than it should be. The @property decorator doesn't always raise exceptions. It seems like it is bound to the class but ignored when called. I can

Re: OS 10.5 build 64 bits

2008-10-24 Thread Robin Becker
Graham Dumpleton wrote: http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX http://developer.apple.com/releasenotes/OpenSource/PerlExtensionsRelNotes/index.html The latter only works for Apple supplied Python as I understand it. .. thanks for these, the mod_wsgi build

Re: Porting VB apps to Python for Window / Linux use

2008-10-24 Thread Ed Leafe
On Oct 18, 2008, at 8:12 AM, Dotan Cohen wrote: I often see mention of SMBs that either want to upgrade their Windows installations, or move to Linux, but cannot because of inhouse VB apps. Are there any Python experts who I can reference them to for porting? I have nothing on hand at the

Re: @property decorator doesn't raise exceptions

2008-10-24 Thread Peter Otten
Rafe wrote: On Oct 24, 2:21 am, Christian Heimes [EMAIL PROTECTED] wrote: Rafewrote: Hi, I've encountered a problem which is making debugging less obvious than it should be. The @property decorator doesn't always raise exceptions. It seems like it is bound to the class but ignored when

Python barcode decoding

2008-10-24 Thread Robocop
Does anyone know of any decent (open source or commercial) python barcode recognition tools or libraries. I need to read barcodes from pdfs or images, so it will involve some OCR algorithm. I also only need to read the code 93 symbology, so it doesn't have to be very fancy. The most important

portable python

2008-10-24 Thread asit
I code in both windows and Linux. As python is portable, the o/p should be same in both cases. But why the following code is perfect in windows but error one in Linux ??? from socket import * import sys status={0:open,10049:address not available,10061:closed, 10060:timeout,10056:already

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-24 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Steven D'Aprano wrote: Putting preferences files in the user's top level directory is horribly inconvenient for the user. There is a way around this: redefine the HOME environment variable to be the directory where you want the dotfiles to end up. --

URL as input - IOError: [Errno 2] The system cannot find the path specified

2008-10-24 Thread Gilles Ganault
Hello I'm trying to use urllib to download web pages with the GET method, but Python 2.5.1 on Windows turns the URL into something funny: url = amazon.fr/search/index.php?url=search [...] IOError: [Errno 2] The system cannot find the path specified:

Re: URL as input - IOError: [Errno 2] The system cannot find the path specified

2008-10-24 Thread Marc 'BlackJack' Rintsch
On Fri, 24 Oct 2008 19:56:04 +0200, Gilles Ganault wrote: I'm trying to use urllib to download web pages with the GET method, but Python 2.5.1 on Windows turns the URL into something funny: url = amazon.fr/search/index.php?url=search This URL lacks the protocol! Correct would be

from package import * without overwriting similarly named functions?

2008-10-24 Thread Reckoner
I have multiple packages that have many of the same function names. Is it possible to do from package1 import * from package2 import * without overwriting similarly named objects from package1 with material in package2? How about a way to do this that at least gives a warning? Thanks. --

Re: portable python

2008-10-24 Thread Marc 'BlackJack' Rintsch
On Fri, 24 Oct 2008 10:42:21 -0700, asit wrote: I code in both windows and Linux. As python is portable, the o/p should be same in both cases. But why the following code is perfect in windows but error one in Linux ??? So what *is* the error on Linux!? def scan(ip,port,timeout):

big objects and avoiding deepcopy?

2008-10-24 Thread Reckoner
I am writing an algorithm that takes objects (i.e. graphs with thousands of nodes) into a hypothetical state. I need to keep a history of these hypothetical objects depending on what happens to them later. Note that these hypothetical objects are intimately operated on, changed, and made

Re: from package import * without overwriting similarly named functions?

2008-10-24 Thread Mike Driscoll
On Oct 24, 1:06 pm, Reckoner [EMAIL PROTECTED] wrote: I have multiple packages that have many of the same function names. Is it possible to do from package1 import * from package2 import * without overwriting similarly named objects from package1 with material in package2? How about a way

Re: from package import * without overwriting similarly named functions?

2008-10-24 Thread Tim Chase
I have multiple packages that have many of the same function names. Is it possible to do from package1 import * from package2 import * without overwriting similarly named objects from package1 with material in package2? How about a way to do this that at least gives a warning? Yeah, just use

Re: How to examine the inheritance of a class?

2008-10-24 Thread Derek Martin
On Fri, Oct 24, 2008 at 11:59:46AM +1000, James Mills wrote: On Fri, Oct 24, 2008 at 11:36 AM, John Ladasky [EMAIL PROTECTED] wrote: etc. The list of subclasses is not fully defined. It is supposed to be extensible by the user. Developer. NOT User. It's a semantic argument, but John's

Re: portable python

2008-10-24 Thread Jerry Hill
On Fri, Oct 24, 2008 at 1:42 PM, asit [EMAIL PROTECTED] wrote: I code in both windows and Linux. As python is portable, the o/p should be same in both cases. But why the following code is perfect in windows but error one in Linux ??? What error message do you get in linux? How are you

Re: portable python

2008-10-24 Thread asit
On Oct 24, 11:18 pm, Jerry Hill [EMAIL PROTECTED] wrote: On Fri, Oct 24, 2008 at 1:42 PM, asit [EMAIL PROTECTED] wrote: I code in both windows and Linux. As python is portable, the o/p should be same in both cases. But why the following code is perfect in windows but error one   in Linux

Re: URL as input - IOError: [Errno 2] The system cannot find the path specified

2008-10-24 Thread Gilles Ganault
On 24 Oct 2008 18:02:45 GMT, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: This URL lacks the protocol! Correct would be http://amazon.fr… (I guess). Thanks, that did it :) -- http://mail.python.org/mailman/listinfo/python-list

Python/Django Developer

2008-10-24 Thread harvey
My client in Jersey City, NJ 07302 is looking for a Python Developer. Below is the job description: Job Summary: This is a programming position in the technical department of Advance Internet, working on application development, application integration, automated testing and deployment of

Urllib vs. FireFox

2008-10-24 Thread Gilles Ganault
Hello After scratching my head as to why I failed finding data from a web using the re module, I discovered that a web page as downloaded by urllib doesn't match what is displayed when viewing the source page in FireFox. For instance, when searching Amazon for Wargames: URLLIB: a

Re: Urllib vs. FireFox

2008-10-24 Thread Stefan Behnel
Gilles Ganault wrote: After scratching my head as to why I failed finding data from a web using the re module, I discovered that a web page as downloaded by urllib doesn't match what is displayed when viewing the source page in FireFox. For instance, when searching Amazon for Wargames:

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
The Global Interpreter Lock is fundamentally designed to make the interpreter easier to maintain and safer: Developers do not need to worry about other code stepping on their namespace. This makes things thread-safe, inasmuch as having multiple PThreads within the same interpreter space

Re: dictionary

2008-10-24 Thread mblume
Am Fri, 24 Oct 2008 05:06:23 -0500 schrieb Tim Chase: [%s=%s % (k,v) for k,v in d.items()] File stdin, line 1 [%s=%s % (k,v) for k,v in d.items()] ^ SyntaxError: EOL while scanning single-quoted string You have three quotation marks... you

Consequences of importing the same module multiple times in C++?

2008-10-24 Thread Robert Dailey
Hi, I'm currently using boost::python::import() to import Python modules, so I'm not sure exactly which Python API function it is calling to import these files. I posted to the Boost.Python mailing list with this question and they said I'd probably get a better answer here, so here it goes... If

Re: portable python

2008-10-24 Thread mblume
Am Fri, 24 Oct 2008 11:33:33 -0700 schrieb asit: On Oct 24, 11:18 pm, Jerry Hill [EMAIL PROTECTED] wrote: On Fri, Oct 24, 2008 at 1:42 PM, asit [EMAIL PROTECTED] wrote: I code in both windows and Linux. As python is portable, the o/p should be same in both cases. But why the following code

Re: portable python

2008-10-24 Thread Jerry Hill
On Fri, Oct 24, 2008 at 2:33 PM, asit [EMAIL PROTECTED] wrote: this the o/p [EMAIL PROTECTED]:~/hack$ python portscan.py 59.93.128.10 10 20 Traceback (most recent call last): File portscan.py, line 33, in module print str(port) + : + scan(ip,port,timeout) File portscan.py, line 22, in

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Jesse Noller
On Fri, Oct 24, 2008 at 3:17 PM, Andy O'Meara [EMAIL PROTECTED] wrote: I'm a lousy writer sometimes, but I feel bad if you took the time to describe threads vs processes. The only reason I raised IPC with my messaging isn't very attractive comment was to respond to Glenn Linderman's points

Re: Urllib vs. FireFox

2008-10-24 Thread Rex
Right. If you want to get the same results with your Python script that you did with Firefox, you can modify the browser headers in your code. Here's an example with urllib2: http://vsbabu.org/mt/archives/2003/05/27/urllib2_setting_http_headers.html By the way, if you're doing non-trivial web

Re: from package import * without overwriting similarly named functions?

2008-10-24 Thread Rex
If you're concerned about specific individual functions, you can use: from package1 import some_function as f1 form package2 import some_function as f2 -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Rhamphoryncus
On Oct 24, 1:02 pm, Glenn Linderman [EMAIL PROTECTED] wrote: On approximately 10/24/2008 8:42 AM, came the following characters from the keyboard of Andy O'Meara: Glenn, great post and points! Thanks. I need to admit here that while I've got a fair bit of professional programming

Re: Urllib vs. FireFox

2008-10-24 Thread Mike Driscoll
On Oct 24, 2:53 pm, Rex [EMAIL PROTECTED] wrote: Right. If you want to get the same results with your Python script that you did with Firefox, you can modify the browser headers in your code. Here's an example with

Re: Python barcode decoding

2008-10-24 Thread Mike Driscoll
On Oct 24, 12:05 pm, Robocop [EMAIL PROTECTED] wrote: Does anyone know of any decent (open source or commercial) python barcode recognition tools or libraries.  I need to read barcodes from pdfs or images, so it will involve some OCR algorithm.  I also only need to read the code 93 symbology,

Re: from package import * without overwriting similarly named functions?

2008-10-24 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Reckoner wrote: I have multiple packages that have many of the same function names. Is it possible to do from package1 import * from package2 import * without overwriting similarly named objects from package1 with material in package2? Avoid wildcard

Global dictionary or class variables

2008-10-24 Thread Mr . SpOOn
Hi, in an application I have to use some variables with fixed valuse. For example, I'm working with musical notes, so I have a global dictionary like this: natural_notes = {'C': 0, 'D': 2, 'E': 4 } This actually works fine. I was just thinking if it wasn't better to use class variables.

Re: Question about scope

2008-10-24 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Steven D'Aprano wrote: Why is it a class attribute instead of an instance attribute? Singleton class. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-24 Thread Paul McNett
Steven D'Aprano wrote: On Sun, 19 Oct 2008 20:50:46 +0200, Stef Mientki wrote: Duncan, in windows it's begin to become less common to store settings in DocsSettings, because these directories are destroyed by roaming profiles The directories aren't destroyed by roaming profiles. When the

Re: How to get the actual address of a object

2008-10-24 Thread James Mills
On Sat, Oct 25, 2008 at 12:25 AM, [EMAIL PROTECTED] wrote: Thank you,James. My original idea was to study all the contents of any object. I can do it by using module ctypes. You can simply just query it's attributes. Use __dict__ or dir(obj) Example: x = 10 dir(x) ['__abs__', '__add__',

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
Another great post, Glenn!! Very well laid-out and posed!! Thanks for taking the time to lay all that out. Questions for Andy: is the type of work you want to do in independent threads mostly pure Python? Or with libraries that you can control to some extent? Are those libraries reentrant?

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Glenn Linderman
On approximately 10/24/2008 1:09 PM, came the following characters from the keyboard of Rhamphoryncus: On Oct 24, 1:02 pm, Glenn Linderman [EMAIL PROTECTED] wrote: On approximately 10/24/2008 8:42 AM, came the following characters from the keyboard of Andy O'Meara: Glenn, great post

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Jesse Noller
On Fri, Oct 24, 2008 at 4:51 PM, Andy O'Meara [EMAIL PROTECTED] wrote: In the module multiprocessing environment could you not use shared memory, then, for the large shared data items? As I understand things, the multiprocessing puts stuff in a child process (i.e. a separate address space),

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Rhamphoryncus
On Oct 24, 2:59 pm, Glenn Linderman [EMAIL PROTECTED] wrote: On approximately 10/24/2008 1:09 PM, came the following characters from the keyboard of Rhamphoryncus: PyE: objects are reclassified as shareable or non-shareable, many types are now only allowed to be shareable.  A module and its

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Rhamphoryncus
On Oct 24, 3:02 pm, Glenn Linderman [EMAIL PROTECTED] wrote: On approximately 10/23/2008 2:24 PM, came the following characters from the keyboard of Rhamphoryncus: On Oct 23, 11:30 am, Glenn Linderman [EMAIL PROTECTED] wrote: On approximately 10/23/2008 12:24 AM, came the following

RE: Python-list Digest, Vol 61, Issue 368

2008-10-24 Thread Warren DeLano
From: Andy O'Meara [EMAIL PROTECTED] Unfortunately, a shared address region doesn't work when you have large and opaque objects (e.g. a rendered CoreVideo movie in the QuickTime API or 300 megs of audio data that just went through a DSP). Then you've got the hit of serialization if you're

Re: Global dictionary or class variables

2008-10-24 Thread Chris Rebert
On Fri, Oct 24, 2008 at 1:44 PM, Mr. SpOOn [EMAIL PROTECTED] wrote: Hi, in an application I have to use some variables with fixed valuse. For example, I'm working with musical notes, so I have a global dictionary like this: natural_notes = {'C': 0, 'D': 2, 'E': 4 } This actually works

ANN: gui_support v1.5, a convenience library for wxPython

2008-10-24 Thread Stef Mientki
hello, Although I personally hate to release a new version so soon, the error reporting is so essential, that updating is a must. V1.5 changes - errors (catched by the library) will now give a normal error report - GUI preview function now available in this library gui_support is library for

Re: dictionary

2008-10-24 Thread Craig Allen
when I was a baby programmer even vendors didn't have documentation to throw out... we just viewed the dissassembeled opcodes to find out how things worked... we never did find out much but I could make the speak click, and we were happy with it. --

Re: How to examine the inheritance of a class?

2008-10-24 Thread Craig Allen
Developer. NOT User. I go around and around on this issue, and have ended up considering anyone using my code a user, and if it's a library or class system, likely that user is a programmer. I don't really think there is a strong distinction... more and more users can do sophisticated

Re: How to examine the inheritance of a class?

2008-10-24 Thread Craig Allen
Thank you, Chris. Class.__bases__ is exactly what I wanted to see. And I thought I had tried isinstance(), and found it lacking -- but I just tried it again, and it does what I hoped it would do. While isinstance is no doubt the proper way to access this information, you may have run into

  1   2   >