Re: Why Python forbids multiple instances of one module?

2010-07-05 Thread kedra marbun
module obj is instance of types.ModuleType, which is instance of 'type', where class obj is instance of 'type'. even only at this point, they're diff in to many ways. there are so many things to do when you truly want module to replace class, as pointed by 2 posts above i'm also a beginner, so i c

Re: SMTPHandler and Unicode

2010-07-05 Thread Vinay Sajip
On Jul 5, 2:35 pm, Antoine Pitrou wrote: > > a FileHandler works as expected, the log file being UTF-8 encoded. > > Ouch. Implicit encoding sounds like a bad behaviour. UTF-8 is only used as a fallback in an exception handler, you can use any supported encoding using the encoding= keyword argumen

Re: Python 2.7 released

2010-07-05 Thread David Bolen
Martineau writes: > Some clarification. I meant installed 2.7 on top of 2.6.x. Doing so > would have interfered with the currently installed version because I > always install Python in the same directory, one named just "Python", > to minimize the number of changes I have to make to to other par

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Terry Reedy
On 7/5/2010 9:00 PM, Philip Semanchuk wrote: On Jul 5, 2010, at 6:41 PM, Chris Rebert wrote: On Mon, Jul 5, 2010 at 3:38 PM, Philip Semanchuk I ported two pure C extensions from 2 to 3 and was even able to keep a single C codebase. I'd be willing to contribute my experiences to a document s

Re: delegation pattern via descriptor

2010-07-05 Thread Rami Chowdhury
On Monday 05 July 2010 21:10:51 kedra marbun wrote: > On Jul 5, 3:42 pm, Bruno Desthuilliers > 42.desthuilli...@websiteburo.invalid> wrote: > > kedra marbun a écrit : > > > i'm confused which part that doesn't make sense? > > > this is my 2nd attempt to py, the 1st was on april this year, it was

Re: delegation pattern via descriptor

2010-07-05 Thread Steven D'Aprano
On Mon, 05 Jul 2010 21:12:47 -0700, kedra marbun wrote: > On Jul 5, 7:49 am, Gregory Ewing wrote: >> kedra marbun wrote: >> > now, i'm asking another favor, what about the 2nd point in my 1st >> > post? >> >> Your original post has dropped off my newsscope, so you'll have to >> remind me what the

Re: Getting pyparsing to backtrack

2010-07-05 Thread John Nagle
On 7/5/2010 3:19 PM, John Nagle wrote: I'm working on street address parsing again, and I'm trying to deal with some of the harder cases. The approach below works for the cases given. The "Or" operator ("^") supports backtracking, but "Optional()" apparently does not. direction = Combine

Re: Getting the name of the file that imported current module

2010-07-05 Thread kedra marbun
On Jul 5, 4:05 am, Tobiah wrote: > foo.py: > > import bar > bar.show_importer() > > output: > > 'foo' or 'foo.py' or 'path/to/foo' etc. > > Possible? > > Thanks, > > Tobiah if what you mean by 'importer' is the one that really cause py to load the mod, then why not dynamically set it? foo.py ---

Re: Getting the name of the file that imported current module

2010-07-05 Thread kedra marbun
On Jul 5, 6:29 am, Steven D'Aprano wrote: > On Sun, 04 Jul 2010 21:05:56 +, Tobiah wrote: > > foo.py: > > > import bar > > bar.show_importer() > > > output: > > > 'foo' or 'foo.py' or 'path/to/foo' etc. > > > Possible? > > I don't think so. Your question isn't even well-defined. Given three >

Re: delegation pattern via descriptor

2010-07-05 Thread kedra marbun
On Jul 5, 7:49 am, Gregory Ewing wrote: > kedra marbun wrote: > > now, i'm asking another favor, what about the 2nd point in my 1st post? > > Your original post has dropped off my newsscope, so > you'll have to remind me what the 2nd point was. > > -- > Greg it's like 'name', it's about info that

Re: delegation pattern via descriptor

2010-07-05 Thread kedra marbun
On Jul 5, 3:42 pm, Bruno Desthuilliers wrote: > kedra marbun a écrit : > > > > > i'm confused which part that doesn't make sense? > > this is my 2nd attempt to py, the 1st was on april this year, it was > > just a month, i'm afraid i haven't got the fundamentals right yet. so > > i'm gonna lay out

Re: Python 2.7 released

2010-07-05 Thread Martin v. Loewis
> Benjamin (or anyone else), do you know where I can get the Compiled > Windows Help file -- python27.chm -- for this release? I have now put that file separately on the release page. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7 released

2010-07-05 Thread Martineau
On Jul 5, 5:53 pm, David Robinow wrote: > On Mon, Jul 5, 2010 at 8:15 PM, Steven > D'Aprano wrote: > > On Mon, 05 Jul 2010 12:59:00 -0700, Martineau wrote: > > >> I'd like to view the contents of the help file without actually > >> installing the release which would wipe out any currently install

Re: Python 2.7 released

2010-07-05 Thread Martineau
On Jul 5, 1:31 pm, Alexander Kapps wrote: > Martineau wrote: > > Perhaps it's hidden somewhere, but I couldn't find the .chm help file > > in the python-2.7.msi file using 7-zip, nor saw anything that looked > > like a Doc folder embedded within it -- so I doubt installing it on a > > Windows mach

Re: markmin 0.1

2010-07-05 Thread Chris Rebert
On Mon, Jul 5, 2010 at 4:56 PM, Massimo Di Pierro wrote: > Markmin is a wiki markup language > implemented in less than 100 lines of code (one file, no dependencies) > easy to read > secure > support table, ul, ol, code > support html5 video and audio elements > can align images and resize them >

Re: Another Regexp Question

2010-07-05 Thread MRAB
andrew cooke wrote: On Jul 5, 8:56 pm, MRAB wrote: andrew cooke wrote: What am I missing this time? :o( Nothing. It's a bug. :-( Sweet :o) Thanks - do you want me to raise an issue or will you? You found it. You can have the pleasure. -- http://mail.python.org/mailman/listinfo/python-lis

Re: Another Regexp Question

2010-07-05 Thread andrew cooke
On Jul 5, 8:56 pm, MRAB wrote: > andrew cooke wrote: > > What am I missing this time? :o( > Nothing. It's a bug. :-( Sweet :o) Thanks - do you want me to raise an issue or will you? Cheers, Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Philip Semanchuk
On Jul 5, 2010, at 6:41 PM, Chris Rebert wrote: On Mon, Jul 5, 2010 at 3:38 PM, Philip Semanchuk wrote: On Jul 5, 2010, at 4:30 PM, D'Arcy J.M. Cain wrote: On Mon, 05 Jul 2010 14:42:13 -0400 Terry Reedy wrote: Good start. Now what is blocking those four? Lack of developer interest/time/ab

Re: Another Regexp Question

2010-07-05 Thread MRAB
andrew cooke wrote: As ever, I guess it's most likely I've misunderstood something, but in Python 2.6 lookback seems to actually be lookahead. All the following tests pass: from re import compile assert compile('(a)b(?<=(?(2)x|c))(c)').match('abc') assert not compile('(

Re: Python 2.7 released

2010-07-05 Thread David Robinow
On Mon, Jul 5, 2010 at 8:15 PM, Steven D'Aprano wrote: > On Mon, 05 Jul 2010 12:59:00 -0700, Martineau wrote: > >> I'd like to view the contents of the help file without actually >> installing the release which would wipe out any currently installed >> version (I'm one of those rare people who act

Re: Shared object access problems

2010-07-05 Thread Tim Johnson
John Nagle wrote: > On 7/4/2010 6:36 PM, Philip Semanchuk wrote: >> hi Tim, >> This seems more likely to be a MySQLdb problem than a Python one. Have >> you considered asking in the MySQLdb forums? >> >> On Jul 4, 2010, at 7:46 PM, Tim Johnson wrote: >> >>> Using python 2.6.4 on slackware 13.1 >>

Re: Python 3 put-downs: What's the point?

2010-07-05 Thread Steven D'Aprano
On Mon, 05 Jul 2010 14:32:13 -0500, Tim Chase wrote: > On 07/05/2010 02:50 AM, Gregor Horvath wrote: >> Am Sun, 04 Jul 2010 18:51:54 -0500 >> schrieb Tim Chase: >> >>> I think it's the same venting of frustration that caused veteran VB6 >>> developers to start calling VB.Net "Visual Fred" -- the l

Re: Python 2.7 released

2010-07-05 Thread Steven D'Aprano
On Mon, 05 Jul 2010 12:59:00 -0700, Martineau wrote: > I'd like to view the contents of the help file without actually > installing the release which would wipe out any currently installed > version (I'm one of those rare people who actually reads manuals > *before* using or installing most things

Another Regexp Question

2010-07-05 Thread andrew cooke
As ever, I guess it's most likely I've misunderstood something, but in Python 2.6 lookback seems to actually be lookahead. All the following tests pass: from re import compile assert compile('(a)b(?<=(?(2)x|c))(c)').match('abc') assert not compile('(a)b(?<=(?(2)b|x))(c)'

Re: What is the name of the name space I am in?

2010-07-05 Thread Gregory Ewing
On 07/05/2010 11:07 AM, Anthra Norell wrote: I try to use "new.new.classobj (name, baseclass, dict)" and have no clue what the "dict" of the current name space is. Are you sure that's what you really want to know? The 'dict' argument to classobj() defines the attributes that you want the new c

Python Embedding Importing relative modules

2010-07-05 Thread moerchendiser2k3
Hi all, I have a serious problem I haven't solved yet, hope one of you can help me. The first thing is, I embedded Python into my app and I execute several scripts in this environment. The problem is, the scripts don't import modules from their relative path. I guess this is related to the sys.pa

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Chris Rebert
On Mon, Jul 5, 2010 at 3:38 PM, Philip Semanchuk wrote: > On Jul 5, 2010, at 4:30 PM, D'Arcy J.M. Cain wrote: >> On Mon, 05 Jul 2010 14:42:13 -0400 >> Terry Reedy wrote: >>> Good start. Now what is blocking those four? >>> Lack of developer interest/time/ability? >>> or something else that they n

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Philip Semanchuk
On Jul 5, 2010, at 4:30 PM, D'Arcy J.M. Cain wrote: On Mon, 05 Jul 2010 14:42:13 -0400 Terry Reedy wrote: Good start. Now what is blocking those four? Lack of developer interest/time/ability? or something else that they need? How about a basic how-to document? I maintain PyGreSQL and would

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread John Nagle
On 7/5/2010 12:35 PM, Kevin Walzer wrote: On 7/5/10 2:56 AM, John Nagle wrote: * PyCrypto * PyOpenSSL These, and Mark Pilgrim's feedparser, need to be 3.x compatible before I can think about Python 3.x. There's been an attempt to port "feedparser" to 3.0, but that needed a port of Beaut

Getting pyparsing to backtrack

2010-07-05 Thread John Nagle
I'm working on street address parsing again, and I'm trying to deal with some of the harder cases. Here's a subparser, intended to take in things like "N MAIN" and "SOUTH", and break out the "directional" from street name. Directionals = ['southeast', 'northeast', 'north', 'northwest',

using the netflix api

2010-07-05 Thread member thudfoo
Has anyone had success using the netflix api with Netflix.py? Especially getting access? -- http://mail.python.org/mailman/listinfo/python-list

Re: Very odd output from subprocess

2010-07-05 Thread m
On Jul 1, 12:42 am, Nobody wrote: > On Wed, 30 Jun 2010 21:12:12 -0700, m wrote: > > If I add the line: > >      for l in line: print ord(l),'\t',l > > after the first readline, I get the following: > > > 27           > > 91         [ > > 48         0 > > 48         0 > > 109        m > > 27      

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Martin v. Loewis
Am 05.07.2010 22:30, schrieb D'Arcy J.M. Cain: > On Mon, 05 Jul 2010 14:42:13 -0400 > Terry Reedy wrote: >> Good start. Now what is blocking those four? >> Lack of developer interest/time/ability? >> or something else that they need? > > How about a basic how-to document? I maintain PyGreSQL and

Re: SMTPHandler and Unicode

2010-07-05 Thread norbert
> > Ouch. Implicit encoding sounds like a bad behaviour. Looking at the FileHandler source ( http://svn.python.org/view/python/trunk/Lib/logging/__init__.py?view=markup ) : the utf-8 encoding is a fallback. But *FileHandler family let you specify the encoding you want, so that's OK I think. But S

Re: Python 3 put-downs: What's the point?

2010-07-05 Thread CM
On Jul 5, 2:33 pm, Terry Reedy wrote: > On 7/4/2010 9:20 PM, CM wrote: > > > On Jul 4, 7:14 pm, Terry Reedy  wrote: > > > I think there's a good point to Python 3 put-downs (if I take put-down > > to mean generally reasonable criticism, which is what I've read here > > recently, and not trolling).

Re: Python 2.7 released

2010-07-05 Thread Alexander Kapps
Martineau wrote: Perhaps it's hidden somewhere, but I couldn't find the .chm help file in the python-2.7.msi file using 7-zip, nor saw anything that looked like a Doc folder embedded within it -- so I doubt installing it on a Windows machine would work any better. I don't know much about the .

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread D'Arcy J.M. Cain
On Mon, 05 Jul 2010 14:42:13 -0400 Terry Reedy wrote: > Good start. Now what is blocking those four? > Lack of developer interest/time/ability? > or something else that they need? How about a basic how-to document? I maintain PyGreSQL and would like to move it to 3.x right now but I don't even k

Re: Python 2.7 released

2010-07-05 Thread Martineau
On Jul 5, 1:12 am, Benjamin Kaplan wrote: > On Sun, Jul 4, 2010 at 7:58 PM, John Machin wrote: > > On Jul 5, 12:27 pm, Martineau wrote: > >> On Jul 4, 8:34 am, Benjamin Peterson wrote: > > >> > On behalf of the Python development team, I'm jocund to announce the > >> > second > >> > release ca

Re: SyntaxError not honoured in list comprehension?

2010-07-05 Thread Mark Dickinson
On Jul 5, 7:12 pm, jmfauth wrote: > BTW, if I understand correctly the module tokenize import > the module token. So your example becomes: > > >>> from cStringIO import StringIO > >>> import tokenize > >>> for tok in tokenize.generate_tokens(StringIO("print9.0").readline): > >         print tokeni

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Kevin Walzer
On 7/5/10 2:56 AM, John Nagle wrote: * PyCrypto * PyOpenSSL These, and Mark Pilgrim's feedparser, need to be 3.x compatible before I can think about Python 3.x. -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 put-downs: What's the point?

2010-07-05 Thread Tim Chase
On 07/05/2010 02:50 AM, Gregor Horvath wrote: Am Sun, 04 Jul 2010 18:51:54 -0500 schrieb Tim Chase: I think it's the same venting of frustration that caused veteran VB6 developers to start calling VB.Net "Visual Fred" -- the language was too different and too non-backwards-compatible. VB6 ->

vidio*****

2010-07-05 Thread eslam
http://www.kavalec.com/thisisislam.swf -- http://mail.python.org/mailman/listinfo/python-list

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Terry Reedy
On 7/5/2010 6:04 AM, David Cournapeau wrote: On Mon, Jul 5, 2010 at 12:44 PM, Terry Reedy wrote: [snip] I think numpy will work for 3.1 as well If numpy were released today for 3.1 (or even anytime before 3.2), that would be great. It would let those waiting for it that it is real and tha

Re: Python as a scripting language. Alternative to bash script?

2010-07-05 Thread Emile van Sebille
On 7/5/2010 11:02 AM Tim Harig said... Automating GUI applications requires interal access to the program through some kind of interface and, ideally, decent documention of the interface, something that is missing from many, if not most, GUIs. Anything else relies on ugly and, generally fragile

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Terry Reedy
On 7/5/2010 2:56 AM, John Nagle wrote: On 7/4/2010 10:44 PM, Terry Reedy wrote: I you have any other ideas about other top blockers, please share them. The Twisted team has a list of what they need: "http://stackoverflow.com/questions/172306/how-are-you-planning-on-handling-the-migration-to

Re: Python 3 put-downs: What's the point?

2010-07-05 Thread Terry Reedy
On 7/4/2010 9:20 PM, CM wrote: On Jul 4, 7:14 pm, Terry Reedy wrote: I think there's a good point to Python 3 put-downs (if I take put-down to mean generally reasonable criticism, which is what I've read here recently, and not trolling). And that is simply to register dissent. But dissent

Re: SyntaxError not honoured in list comprehension?

2010-07-05 Thread jmfauth
Thank you all for the discussion and the explanations. > Mark Dickinson I toyed a littled bit this afternoon and I wrote a colouriser (British spelling?) with the tokenize module. It is quite simple and easy. BTW, if I understand correctly the module tokenize import the module token. So your exa

Re: Confusion over etree.ElementTree.Element.getiterator

2010-07-05 Thread Terry Reedy
On 7/5/2010 6:40 AM, Ben Sizer wrote: Admittedly, it's three clicks away from the library docs on docs.python.org. http://effbot.org/zone/element.htm#xml-namespaces Hopefully someone will see fit to roll this important documentation into docs.python.org before the next release... oops, too la

Re: Python as a scripting language. Alternative to bash script?

2010-07-05 Thread Tim Harig
On 2010-07-05, Lawrence D'Oliveiro wrote: > In message , Rhodri James wrote: >> Classic Unix programming is a matter of stringing a bunch of tools >> together with pipes to get the output you want. This isn't a great >> paradigm for GUIs (not without tweaking that hasn't really been done), but >>

Re: OT Komodo Edit, line selection gutter is one pixel wide?

2010-07-05 Thread Eric Promislow
On Jul 1, 9:39 am, John Doe wrote: > Is there a way to increase the line selection gutter width? It > seems to be only one pixel wide. In other words... When I single > click on the left side of the line, in order to automatically > select the line, the pointer must be in a precise single pixel >

Re: ImportError: DLL load failed: The specified module could notbe found, SWIG, life, etc

2010-07-05 Thread Bill Davy
"Thomas Jollans" wrote in message news:mailman.265.1278342154.1673.python-l...@python.org... > On 07/05/2010 04:35 PM, Bill Davy wrote: >> I am struggling :-( > > smile! > >> >> I have used SWIG to build a module called SHIP. So I have a directory >> containing SHIP.py and _SHIP.pyd, as follows:

Re: throwing exceptions from csv.DictReader or even csv.reader

2010-07-05 Thread Peter Otten
Tim wrote: > Csv is a very common format for publishing data as a form of primitive > integration. It's an annoyingly brittle approach, so I'd like to > ensure that I capture errors as soon as possible, so that I can get > the upstream processes fixed, or at worst put in some correction > mechanis

Re: SMTPHandler and Unicode

2010-07-05 Thread Chris Withers
Antoine Pitrou wrote: On Mon, 5 Jul 2010 06:17:38 -0700 (PDT) norbert wrote: a FileHandler works as expected, the log file being UTF-8 encoded. Ouch. Implicit encoding sounds like a bad behaviour. Yes indeed, hence my question on python-dev... Chris -- Simplistix - Content Management, Bat

throwing exceptions from csv.DictReader or even csv.reader

2010-07-05 Thread Tim
Hullo Csv is a very common format for publishing data as a form of primitive integration. It's an annoyingly brittle approach, so I'd like to ensure that I capture errors as soon as possible, so that I can get the upstream processes fixed, or at worst put in some correction mechanisms and avoid get

Re: VICIOUS Enemy Insurgents kill 34 US soldiers after 9 hrs attack - Bellies ripped open and numerous injured - call for TRUE PATRIOTS . The deep undercover spies agents of influence mislead the pub

2010-07-05 Thread nanothermite911fbibustards
http://www.veteranstoday.com/2010/06/16/jim-w-dean-faked-israeli-flotilla-v= ideos-provide-opening-to-expose-israeli-expionage-here/ JIM W. DEAN: FAKED ISRAELI FLOTILLA VIDEOS PROVIDE OPENING TO EXPOSE ISRAELI EXPIONAGE HERE June 16, 2010 posted by Gordon Duff =B7 20 Comments Share Faked Israel

Re: ImportError: DLL load failed: The specified module could not be found, SWIG, life, etc

2010-07-05 Thread Thomas Jollans
On 07/05/2010 04:35 PM, Bill Davy wrote: > I am struggling :-( smile! > > I have used SWIG to build a module called SHIP. So I have a directory > containing SHIP.py and _SHIP.pyd, as follows: > > [ ...] > > Python appears to find H:\Viper\HostPC\V1\SHIP\Release\_SHIP.pyd but for > some reas

Re: black console window of executing os.chmod() and os.access()

2010-07-05 Thread 朱重八
Sorry, I mean "1.1.1.1\\sharedfolder" Seems os.chmod(), os.access() and os.makedirs() all have this problem when the path is a remote path. 2010/7/5 Thomas Jollans > On 07/05/2010 04:19 PM, 朱重八 wrote: > > Hi all, > > I want to use os.chmod or os.access to check the permission of a > > f

Re: Plot problem.. ?? No sign at all

2010-07-05 Thread Alan G Isaac
On 7/5/2010 7:45 AM, Ritchy lelis wrote: from pylab import* Vref = arange(1, 20, 0.02) Vi = arange(1, 10,0.1) for i in Vref: for n in Vi: if n> i/4: V0 = 2*n-i elif (-i/4)<= n and n<= i/4: V0 = 2*n elif Vi< -i/4:

ImportError: DLL load failed: The specified module could not be found, SWIG, life, etc

2010-07-05 Thread Bill Davy
I am struggling :-( I have used SWIG to build a module called SHIP. So I have a directory containing SHIP.py and _SHIP.pyd, as follows: H:\Viper\HostPC\V1\SHIP\Release>dir Volume in drive H has no label. Volume Serial Number is B83B-76F2 Directory of H:\Viper\HostPC\V1\SHIP\Release

Re: black console window of executing os.chmod() and os.access()

2010-07-05 Thread Thomas Jollans
On 07/05/2010 04:19 PM, 朱重八 wrote: > Hi all, > I want to use os.chmod or os.access to check the permission of a > folder on remote Windows computer: > os.chmod("\\1.1.1.1\sharedfolder", stat.S_IWRITE) > or > os.access("\\1.1.1.1\sharedfolder", os.W_OK) That won't work: >>> print("\\1.1.1.1\sh

black console window of executing os.chmod() and os.access()

2010-07-05 Thread 朱重八
Hi all, I want to use os.chmod or os.access to check the permission of a folder on remote Windows computer: os.chmod("\\1.1.1.1\sharedfolder", stat.S_IWRITE) or os.access("\\1.1.1.1\sharedfolder", os.W_OK) I saved this python file as a.pyw, run it with pythonw.exe a.pyw, then a black console w

Re: Python 3 put-downs: What's the point?

2010-07-05 Thread Roy Smith
In article , Dennis Lee Bieber wrote: > On Sun, 04 Jul 2010 20:05:03 -0400, Roy Smith declaimed > the following in gmane.comp.python.general: > > > In article , > > Tim Chase wrote: > > > > > I've often wondered if changing the name of the language (such as > > > "Adder", "Served", "Dwarf"

Re: SMTPHandler and Unicode

2010-07-05 Thread Antoine Pitrou
On Mon, 5 Jul 2010 06:17:38 -0700 (PDT) norbert wrote: > > a FileHandler works as expected, the log file being UTF-8 encoded. Ouch. Implicit encoding sounds like a bad behaviour. > The > SMTPHandler is the only logger I know with this problem, maybe > connected to SMTPLib implementation ? I su

Re: What is the name of the name space I am in?

2010-07-05 Thread Anthra Norell
Chris Rebert wrote: On Mon, Jul 5, 2010 at 2:07 AM, Anthra Norell wrote: I try to use "new.new.classobj (name, baseclass, dict)" and have no clue Slight tangent: Note that both the `new` module and old-style classes (which are what `classobj` produces) are deprecated. To produce new-s

Re: SMTPHandler and Unicode

2010-07-05 Thread norbert
On 5 juil, 14:32, Chris Withers wrote: > norbert wrote: > > Your package has the same unicode problem : > > import logging,logging.handlers > > from mailinglogger.MailingLogger import MailingLogger > > mailingLogger = MailingLogger(mailhost=('smtp.example.com', > > 25),fromaddr='t...@example.com',

Re: Plot problem.. ?? No sign at all

2010-07-05 Thread MRAB
Ritchy lelis wrote: hello guys.. I'm new at python programming and i'm having some problems with a script that i have been developing for my final project of my graduation. I have a script that is supposed to make a plot of a "Residuo" (waveform) witch is an output of a ADC ( Analogic To Digita

Re: SMTPHandler and Unicode

2010-07-05 Thread Chris Withers
norbert wrote: Your package has the same unicode problem : import logging,logging.handlers from mailinglogger.MailingLogger import MailingLogger mailingLogger = MailingLogger(mailhost=('smtp.example.com', 25),fromaddr='t...@example.com',toaddrs=('t...@example.com',)) LOG = logging.getLogger() LOG

Re: What is the name of the name space I am in?

2010-07-05 Thread Anthra Norell
Thomas Jollans wrote: On 07/05/2010 11:07 AM, Anthra Norell wrote: I try to use "new.new.classobj (name, baseclass, dict)" and have no clue what the "dict" of the current name space is. I can name dicts of imported modules, because their name exists in the current name space. If, for instan

Re: SMTPHandler and Unicode

2010-07-05 Thread norbert
On 5 juil, 13:17, Chris Withers wrote: > try MailingLogger: > > If you have unicode problems with that, I'd be interested in fixing them! Your package has the same unicode problem : import logging,logging.handlers from mailinglogger.MailingLogger import MailingLogger mailingLogger = MailingLogger

Plot problem.. ?? No sign at all

2010-07-05 Thread Ritchy lelis
hello guys.. I'm new at python programming and i'm having some problems with a script that i have been developing for my final project of my graduation. I have a script that is supposed to make a plot of a "Residuo" (waveform) witch is an output of a ADC ( Analogic To Digital Converter) for the f

Re: SMTPHandler and Unicode

2010-07-05 Thread Chris Withers
norbert wrote: I want to send error messages with SMTPHandler logging. But SMTPHandler does not seem to be unicode aware. Is there something doable without playing with sys.setdefaultencoding ? try MailingLogger: http://www.simplistix.co.uk/software/python/mailinglogger If you have unicode pr

Re: Twisted 10.1.0 released

2010-07-05 Thread Daniel Fetchinson
> On behalf of Twisted Matrix Laboratories, I am honored to announce the > release of Twisted 10.1.0. > > Highlights include: > > * Deferreds now support cancellation > > * A new "endpoint" interface which can abstractly describe stream > transport endpoints such as TCP and SSL > > * inotify sup

Re: Confusion over etree.ElementTree.Element.getiterator

2010-07-05 Thread Ben Sizer
On Jul 4, 7:33 am, Stefan Behnel wrote: > BenSizer, 04.07.2010 00:32: > > > On Jul 3, 11:12 pm,BenSizer  wrote: > > >> >>> for el in root.getiterator(): > > >> ...        print el > >> [much output snipped] > >> http://www.w3.org/1999/xhtml}a at d871e8> > >> http://www.w3.org/1999/xhtml}a at d8728

Re: Crash in PyThread_acquire_lock

2010-07-05 Thread moerchendiser2k3
Thanks Antoine! :) You were right. It was the wrong thread...uhmm... Bye! :) -- http://mail.python.org/mailman/listinfo/python-list

SMTPHandler and Unicode

2010-07-05 Thread norbert
Hello, I want to send error messages with SMTPHandler logging. But SMTPHandler does not seem to be unicode aware. Is there something doable without playing with sys.setdefaultencoding ? import logging,logging.handlers smtpHandler = logging.handlers.SMTPHandler(mailhost=("smtp.example.com",25), fr

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread David Cournapeau
On Mon, Jul 5, 2010 at 12:44 PM, Terry Reedy wrote: > On 7/4/2010 7:58 PM, John Nagle wrote: > >> The "incompatible with all extension modules I need" part >> is the problem right now. A good first step would be to >> identify the top 5 or 10 modules that are blocking a move to >> Python 3 by majo

Re: What is the name of the name space I am in?

2010-07-05 Thread Chris Rebert
On Mon, Jul 5, 2010 at 2:07 AM, Anthra Norell wrote: > I try to use "new.new.classobj (name, baseclass, dict)" and have no clue Slight tangent: Note that both the `new` module and old-style classes (which are what `classobj` produces) are deprecated. To produce new-style classes dynamically, use

Re: [ANN] eric 5.0.0 released

2010-07-05 Thread Jean-Michel Pichavant
Detlev Offenbach wrote: Hi, I just uploaded eric 5.0.0. This is the first official release. It is available via the eric web site. http://eric-ide.python-projects.org/index.html What is it? --- eric5 is the Python3 variant of the well know eric4 Python IDE and is the first developme

Re: GAE + recursion limit

2010-07-05 Thread Soltys
On 2 Lip, 22:49, Paul McGuire wrote: > > Does anyone have any clue what that might be? > > Why the problem is onGAE(even when run locally), when command line > > run works just fine (even withrecursionlimitdecreased)? > > Can't explain why you see different behavior onGAEvs. local, but it > is unu

Re: What is the name of the name space I am in?

2010-07-05 Thread Thomas Jollans
On 07/05/2010 11:07 AM, Anthra Norell wrote: > I try to use "new.new.classobj (name, baseclass, dict)" and have no clue > what the "dict" of the current name space is. I can name dicts of > imported modules, because their name exists in the current name space. > If, for instance, I import a module

What is the name of the name space I am in?

2010-07-05 Thread Anthra Norell
I try to use "new.new.classobj (name, baseclass, dict)" and have no clue what the "dict" of the current name space is. I can name dicts of imported modules, because their name exists in the current name space. If, for instance, I import a module "service" then that module's name space would be

Re: delegation pattern via descriptor

2010-07-05 Thread Bruno Desthuilliers
kedra marbun a écrit : i'm confused which part that doesn't make sense? this is my 2nd attempt to py, the 1st was on april this year, it was just a month, i'm afraid i haven't got the fundamentals right yet. so i'm gonna lay out how i got to this conclusion, CMIIW **explanation of feeling (0) on

Re: Python 2.7 released

2010-07-05 Thread Benjamin Kaplan
On Sun, Jul 4, 2010 at 7:58 PM, John Machin wrote: > On Jul 5, 12:27 pm, Martineau wrote: >> On Jul 4, 8:34 am, Benjamin Peterson wrote: >> >> >> >> > On behalf of the Python development team, I'm jocund to announce the second >> > release candidate of Python 2.7. >> >> > Python 2.7 will be the

Re: Python 3 put-downs: What's the point?

2010-07-05 Thread Gregor Horvath
Am Sun, 04 Jul 2010 18:51:54 -0500 schrieb Tim Chase : > I think it's the same venting of frustration that caused veteran > VB6 developers to start calling VB.Net "Visual Fred" -- the > language was too different and too non-backwards-compatible. > VB6 -> VB.NET and Python 2 -> 3 is not a vali

Re: SyntaxError not honoured in list comprehension?

2010-07-05 Thread Mark Dickinson
On Jul 4, 11:02 pm, John Machin wrote: > On Jul 5, 1:08 am, Thomas Jollans wrote: > > > On 07/04/2010 03:49 PM, jmfauth wrote: > > >   File "", line 1 > > >     print9.0 > > >            ^ > > > SyntaxError: invalid syntax > > > somewhat strange, yes. > > There are two tokens, "print9" (a name) a

Re: Python 3 put-downs: What's the point?

2010-07-05 Thread Antoine Pitrou
On Sun, 4 Jul 2010 18:20:38 -0700 (PDT) CM wrote: > > Any online group is an opportunity to register dissent in a way that > is public, open, immediate, interactive, and will (probably) be > preserved for historians to check. The fact is, some people have > gripes with Python 3; they are letting

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread Steven D'Aprano
On Sun, 04 Jul 2010 18:59:03 -0700, John Nagle wrote: > Denying that there's a problem does not help. Nobody is denying that there is a problem, but there are plenty of people denying that there are any solutions. The folks doing development of CPython are genuinely interested in constructive

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread John Nagle
On 7/4/2010 10:44 PM, Terry Reedy wrote: On 7/4/2010 7:58 PM, John Nagle wrote: The "incompatible with all extension modules I need" part is the problem right now. A good first step would be to identify the top 5 or 10 modules that are blocking a move to Python 3 by major projects with many use

Re: Python as a scripting language. Alternative to bash script?

2010-07-05 Thread Lawrence D'Oliveiro
In message , Rhodri James wrote: > Classic Unix programming is a matter of stringing a bunch of tools > together with pipes to get the output you want. This isn't a great > paradigm for GUIs (not without tweaking that hasn't really been done), but > then again it was never meant to be. I’ve neve

Re: Python as a scripting language. Alternative to bash script?

2010-07-05 Thread Lawrence D'Oliveiro
In message , Mithrandir wrote: > I think that Python "could" be a alternative to bash and have some > advantages, but it's a long way off from being fully implemented. Would you prefer to do the following sort of thing in Python or Bash? AudioParms = "-f s16le -ar 48000 -ac 2" # because I