urllib2.URLError:

2009-03-10 Thread Coonay
i use python2.6 File "C:\PROGRA~1\Python26\lib\urllib2.py", line 383, in open response = self._open(req, data) File "C:\PROGRA~1\Python26\lib\urllib2.py", line 401, in _open '_open', req) File "C:\PROGRA~1\Python26\lib\urllib2.py", line 361, in _call_chain result = func(*args) F

Re: Ban Xah Lee

2009-03-10 Thread Kenneth Tilton
Craig Allen wrote: There you go: a 30-second psychological diagnosis by an electrical engineer based entirely on Usenet postings. It doesn't get much more worthless than that... -- Grant rolf but interesting post nonetheless. I have been really somewhat fascinated by AS since I heard of it a

Re: Problem--Extending the behavior of an upstream package

2009-03-10 Thread Carl Banks
On Mar 10, 9:33 pm, a...@pythoncraft.com (Aahz) wrote: > In article > <60848752-2c3f-4512-bf61-0bc11c919...@i20g2000prf.googlegroups.com>, > Carl Banks   wrote: > > > > >The problem comes when a different part of the upstream package also > >subclasses or creates a Box.  When an upstream function

Re: Ban Xah Lee

2009-03-10 Thread Lawrence D'Oliveiro
Anybody else notice that "xah lee" is "eel hax" spelt backwards? -- http://mail.python.org/mailman/listinfo/python-list

Re: A Dangling Tk Entry

2009-03-10 Thread Marc 'BlackJack' Rintsch
On Mon, 09 Mar 2009 21:14:51 -0700, W. eWatson wrote: >>> def Set_Enter_Data(self): >>> sdict = {} >>> sdict[ "ok" ] = False >>> sdict[ "anumber" ] = self.anumber >>> dialog = Enter_Data_Dialog( self.master, sdict ) <--- >>> returning >> >> That's

Re: Problem with os.chdir()

2009-03-10 Thread Tim Golden
venutaurus...@gmail.com wrote: Hello all, I am writing a python script which has to access deep paths then supported normally by the Windows OS (>255). So I am appending "\ \?\" to do so. But when I use the path in the above fashion with os.chdir() it is unable to recognize my folder a

Re: factory functions & methods

2009-03-10 Thread Gabriel Genellina
En Sun, 08 Mar 2009 20:08:32 -0200, Aaron Brady escribió: Hello, I am creating a container. I have some types which are built to be members of the container. The members need to know which container they are in, as they call methods on it, such as finding other members. I want help with t

Re: lexical analysis of python

2009-03-10 Thread Paul McGuire
On Mar 10, 8:53 pm, robert.mull...@gmail.com wrote: > I understand the method, but when you say you "count one DEDENT for > each level" > well lets say you counted 3 of them. Do you have a way to interject 3 > consecutive > DEDENT tokens into the token stream so that the parser receives them > befo

Re: Problem with string format

2009-03-10 Thread John Machin
On Mar 11, 4:07 pm, Mike314 wrote: > Hello, > >    I have a strange problem with the string format: > > >>> '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] > > Traceback (most recent call last): >   File "", line 1, in > TypeError: not enough arguments for format string > > But as soon I use tu

Problem with os.chdir()

2009-03-10 Thread venutaurus...@gmail.com
Hello all, I am writing a python script which has to access deep paths then supported normally by the Windows OS (>255). So I am appending "\ \?\" to do so. But when I use the path in the above fashion with os.chdir() it is unable to recognize my folder and throwing an error: Traceback

Re: Problem with string format

2009-03-10 Thread Mensanator
On Mar 11, 12:07 am, Mike314 wrote: > Hello, > >    I have a strange problem with the string format: > > >>> '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] > > Traceback (most recent call last): >   File "", line 1, in > TypeError: not enough arguments for format string > > But as soon I use t

Re: Problem with string format

2009-03-10 Thread Steven D'Aprano
On Tue, 10 Mar 2009 22:07:59 -0700, Mike314 wrote: > Hello, > >I have a strange problem with the string format: > '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] > Traceback (most recent call last): > File "", line 1, in > TypeError: not enough arguments for format string > > But

Problem with string format

2009-03-10 Thread Mike314
Hello, I have a strange problem with the string format: >>> '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] Traceback (most recent call last): File "", line 1, in TypeError: not enough arguments for format string But as soon I use tuple it is working: >>> '%s %s %s %s %s' % ('01', '02',

Re: Stopping SocketServer on Python 2.5

2009-03-10 Thread Mark Tolonen
"David George" wrote in message news:00150e67$0$27956$c3e8...@news.astraweb.com... Hi guys, I've been developing some code for a university project using Python. We've been working on an existing codebase, cleaning it up and removing dead wood. We decided to make some changes to internal

Re: Problem--Extending the behavior of an upstream package

2009-03-10 Thread Aahz
In article <60848752-2c3f-4512-bf61-0bc11c919...@i20g2000prf.googlegroups.com>, Carl Banks wrote: > >The problem comes when a different part of the upstream package also >subclasses or creates a Box. When an upstream function creates a box, >it creates an upstream.packaging.Box instead of a >min

Re: [JOB] Short-term python programming consultant - funds expire soon!

2009-03-10 Thread Rob Clewley
> Please see http://www.python.org/community/jobs/ > for where to post this most effectively. OK, sorry, I hadn't seen that site before. >> Our open-source software project (PyDSTool) has money to hire an >> experienced Python programmer on a short-term, per-task basis as a >> technical consultan

Re: Number Sequencing, Grouping and Filtering

2009-03-10 Thread Raymond Hettinger
[flebber] > the only issue i can see is that i am using python 2.54 currently as > ifelt it more supported by other programs than 2.6 or 3.0. After > searching it seems that itertools has had a upgrade in 2.61 All of the itertools include pure python equivalents in their docs, so it should be poss

Re: lexical analysis of python

2009-03-10 Thread andrew cooke
robert.mull...@gmail.com wrote: > I understand the method, but when you say you "count one DEDENT for > each level" > well lets say you counted 3 of them. Do you have a way to interject 3 > consecutive > DEDENT tokens into the token stream so that the parser receives them > before it > receives the

Re: lexical analysis of python

2009-03-10 Thread robert . muller2
On Mar 10, 9:38 pm, Paul McGuire wrote: > On Mar 10, 8:31 pm, robert.mull...@gmail.com wrote: > > > > > I am trying to implement a lexer and parser for a subset of python > > using lexer and parser generators. (It doesn't matter, but I happen to > > be using > > ocamllex and ocamlyacc). I've run i

Re: Is python worth learning as a second language?

2009-03-10 Thread r
On Mar 10, 6:46 pm, Craig Allen wrote: > Honestly, I've become more of a Python fan than I am really > comfortable with... it can't be as good as I think. > > -craig Don't fight it, just go with it man... just go with it! *wink* -- http://mail.python.org/mailman/listinfo/python-list

Re: lexical analysis of python

2009-03-10 Thread Paul McGuire
On Mar 10, 8:31 pm, robert.mull...@gmail.com wrote: > I am trying to implement a lexer and parser for a subset of python > using lexer and parser generators. (It doesn't matter, but I happen to > be using > ocamllex and ocamlyacc). I've run into the following annoying problem > and hoping someone c

lexical analysis of python

2009-03-10 Thread robert . muller2
I am trying to implement a lexer and parser for a subset of python using lexer and parser generators. (It doesn't matter, but I happen to be using ocamllex and ocamlyacc). I've run into the following annoying problem and hoping someone can tell me what I'm missing. Lexers generated by such tools re

Stopping SocketServer on Python 2.5

2009-03-10 Thread David George
Hi guys, I've been developing some code for a university project using Python. We've been working on an existing codebase, cleaning it up and removing dead wood. We decided to make some changes to internal message handling by using a SocketServer, which worked great when we were using 2.6, a

Re: What does self.grid() do?

2009-03-10 Thread chuck
On Mar 5, 3:03 am, Marc 'BlackJack' Rintsch wrote: > On Wed, 04 Mar 2009 09:04:50 -0800, chuck wrote: > > On Mar 3, 10:40 pm, Marc 'BlackJack' Rintsch wrote: > >> On Tue, 03 Mar 2009 18:06:56 -0800, chuck wrote: > >> > I am learning python right now.  In the lesson on tkinter I see this > >> > pi

Re: A Dangling Tk Entry

2009-03-10 Thread Rhodri James
On Tue, 10 Mar 2009 12:41:07 -, W. eWatson wrote: [snippety snip] Rhodri James wrote: > You're misunderstanding. The line that you arrowed above has absolutely > nothing whatsoever to do with the method "body()", so keeping on showing > us ever fuller version of that isn't going

Re: PyEval_EvalCode(...) problem

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 13:23:44 -0200, escribió: http://rafb.net/p/Uyb5Ps45.html Pelase note, when I call PyObject_CallObject(...) in the wrapped C register(..) method it works fine. Sorry, I cannot make any sense of that code and your previous post. Where is op assigned to? register? what'

Building python 64-bit on OS 10.5?

2009-03-10 Thread Dan Yamins
Dear all: I've two questions: 1) I've been trying to building python as a 64-bit version on OS 10.5. I'm not too familiar with building python from scratch, and a number of basic attempts made from piecing together things I've seen on the web have failed. (For instance, ./configure --en

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 21:23:54 -0200, Craig Allen escribió: I think the point is that function objects compare by object identity, so the two lambdas you use above are not equal even though they have the same code. it raises an interesting question about why doesn't it. I can think of prac

Re: Set & Frozenset?

2009-03-10 Thread R. David Murray
Lie Ryan wrote: > Matt Nordhoff wrote: > > Alan G Isaac wrote: > >>> Hans Larsen schrieb: > How could I "take" an elemment from a set or a frozenset > >> > >> On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: > >>> You iterate over them. If you only want one value, use > >>>

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Martin v. Löwis
> it raises an interesting question about why doesn't it. I can think > of practical answers to that, obviously, but in principle, if a > function compiles to exactly the same byte code, you obviously do not > need two copies of it, and like strings shouldn't an identical > function have the same

Re: parallel/concurrent process in python

2009-03-10 Thread Minesh Patel
> os.fork is not cross platform.  It is *nix only.  Subprocess runs on > Windows also.  The OP never specified his platform. > Just out of curiosity, how is one able to replace an os.fork() call with subprocess and have the child execute multiple statements? I typically see subprocess used for spa

Re: ipython / vs \ in readline on MS Windows (and ipython help grepper)

2009-03-10 Thread bdb112
More info: import readline ? readline c:\python25\lib\site-packages\ipython\rlineimpl.py $Id: Magic.py 1096 2006-01-28 20:08:02Z vivainio $ sys.platform 'win32' sys.getfilesystemencoding() 'mbcs' sys.winver '2.5' $more /usr/local/bin/ipython #!/bin/bash C:/Python25/python.exe "C:\Python25\

Re: Is python worth learning as a second language?

2009-03-10 Thread Craig Allen
On Mar 9, 12:43 am, ZikO wrote: > Hi > > I hope I won't sound trivial with asking my question. > > I am a C++ programmer and I am thinking of learning something else > because I know second language might be very helpful somehow. I have > heard a few positive things about Python but I have never w

Re: Number Sequencing, Grouping and Filtering

2009-03-10 Thread flebber
On Mar 10, 9:07 pm, Chris Rebert wrote: > On Tue, Mar 10, 2009 at 3:00 AM, flebber wrote: > > On Mar 10, 8:54 pm, flebber wrote: > >> Hi > > >> I was hoping someone would be able to point me in the direction of > >> some good documentation regarding sequencing, grouping and filtering > >> and in

Re: a potential pep to extend the syntax of for loops

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 18:28:10 -0200, pang escribió: Even now it's difficult to find the discussion, but at least I know about python-ideas. Try http://blog.gmane.org/gmane.comp.python.ideas -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Question about xml.com

2009-03-10 Thread J
Dear all, I have loaded an xml file into xmldoc. I would have expected that print commandlet.childNodes[0].toxml() would contain the content but that's only at print commandlet.childNodes[1].toxml() The same for print commandlet.childNodes[2].toxml() Why are commandlet.childNodes[0] and co

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Paul Rubin
Craig Allen writes: > it raises an interesting question about why doesn't it. I can think > of practical answers to that, obviously, but in principle, if a > function compiles to exactly the same byte code, you obviously do not > need two copies of it, and like strings shouldn't an identical > fu

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Craig Allen
> I think the point is that function objects compare by object identity, > so the two lambdas you use above are not equal even though they have the > same code. it raises an interesting question about why doesn't it. I can think of practical answers to that, obviously, but in principle, if a fun

ipython / vs \ in readline on MS Windows (and ipython help grepper)

2009-03-10 Thread bdb112
Q1/ I run a standard python ditribution with ipython and readline under cygwin. The tab filename completion works fine in the OS (bash shell) as expected, and tab filename completion at the ipython command line works, but with MS style path separators (backslash: run examples \test.py) which the r

Re: creating a list of all imported modules

2009-03-10 Thread John Machin
On Mar 11, 1:29 am, Timmie wrote: > > Put this code at the end of your script: > >     import sys > >     info = [(module.__file__, name) > >         for (name, module) in sys.modules.iteritems() > >         if hasattr(module, '__file__')] > >     info.sort() > >     import pprint > >     pprint.p

Re: Indentations and future evolution of languages

2009-03-10 Thread Tim Rowe
2009/3/8 Tim Roberts : > Tim Rowe wrote: >> >>I don't think the article is right that "it's silly to have some >>expression/statement groupings indentation based and some grouped by >>enclosing tokens" -- provided it's done right. The OCAML-based >>language F# accepts OCAML enclosing tokens, but i

Re: [JOB] Short-term python programming consultant - funds expire soon!

2009-03-10 Thread Scott David Daniels
Rob Clewley wrote: Dear Pythonistas, Our open-source software project (PyDSTool) has money to hire an experienced Python programmer on a short-term, per-task basis as a technical consultant (i.e., no fringe benefits offered) Please see http://www.python.org/community/jobs/ for where to pos

Re: Indentations and future evolution of languages

2009-03-10 Thread Kurt Smith
On Tue, Mar 10, 2009 at 12:39 PM, wrote: > > >    John> The only complaint I have there is that mixing tabs and spaces for >    John> indentation should be detected and treated as a syntax error. > > Guido's time machine strikes again (fixed in Python 3.x): > >    % python3.0 ~/tmp/mixed.py >    

Python 2.7 MSI / pywin32 snapshots [was: Windows install to custom location ...]

2009-03-10 Thread Tim Golden
Scott David Daniels wrote: Tim Golden wrote: ... Anyhow, at the end I have a working Python 2.7a0 running under Windows. Do you mean 3.1a0? As far as I know, 2.7a0 requires the use of the time machine, as it is expected to be 3 months out. If you do get an installer built, even having a semi

Re: Set & Frozenset?

2009-03-10 Thread Terry Reedy
Paul Rubin wrote: Terry Reedy writes: I'd never expect that for-loop assignment is even faster than a precreated iter object (the second test)... but I don't think this for-looping variable leaking behavior is guaranteed, isn't it? It is an intentional, documented feature: ... I prefer think

Re: Eject a Removable USB drive

2009-03-10 Thread Mark Hammond
On 11/03/2009 12:39 AM, Rickey, Kyle W wrote: def do_magic(): from staples import easy_button result = easy_button.press() return result :) In all seriousness that code did the trick but only after a short delay. I noticed when I first ran it, there was no effect. But when I ran

Re: Ban Xah Lee

2009-03-10 Thread Larry Gates
On Tue, 10 Mar 2009 01:15:19 -0400, Lew wrote: > s...@netherlands.com wrote: >> On Mon, 09 Mar 2009 22:08:54 -0400, Lew wrote: >> >>> Larry Gates wrote: For me, the worst thing is when I'm programming, and a bug *actually* gets on my monitor. In real life, I'm this tough person: a rug

Re: Packaging Survey

2009-03-10 Thread C. Titus Brown
Hi Tarek, I'm an academic. What do I put down for Q #1? ;) (I put down "pro developer") --t On Mon, Mar 09, 2009 at 06:44:02AM +0100, Tarek Ziad? wrote: -> The Python Langage Summit is coming up. To prepare this event, I have -> put online a survey you can take to tell us a bit more about you

Re: a potential pep to extend the syntax of for loops

2009-03-10 Thread pang
> > Sorry, no. > > tjr well, thank you Even now it's difficult to find the discussion, but at least I know about python-ideas. Thanks to all that replied. -- http://mail.python.org/mailman/listinfo/python-list

Re: Set & Frozenset?

2009-03-10 Thread Paul Rubin
Terry Reedy writes: > > I'd never expect that for-loop assignment is even faster than a > > precreated iter object (the second test)... but I don't think this > > for-looping variable leaking behavior is guaranteed, isn't it? > > It is an intentional, documented feature: ... I prefer thinking of

Re: Set & Frozenset?

2009-03-10 Thread Terry Reedy
Lie Ryan wrote: I recall a claim that for result in myset: break is the most efficient way to get one result. I'd never expect that for-loop assignment is even faster than a precreated iter object (the second test)... but I don't think this for-looping variable leaking behavior is guar

Re: a potential pep to extend the syntax of for loops

2009-03-10 Thread Terry Reedy
pang wrote: This idea has already been proposed and rejected. But discuss away as you wish ;=). tjr Where is that? py-dev and/or python-ideas lists within last year > I didn't see any related pep's. Though helpful, not too many people write PEPs to document rejections. > Could you post a

Re: Is python worth learning as a second language?

2009-03-10 Thread r
On Mar 9, 6:37 pm, Wolfgang Rohdewald wrote: > On Montag, 9. März 2009, r wrote: > > Long answer: > >  'Ye%s' %'s'*1000 > > simplified long answer: > 'Yes' * 1000 ♦ Sure that works too but sounds like your stu..stu..studdering. > or did you mean > 'Ye%s' %('s'*1000) ♦ Oops, must test snippets bef

Re: PyEval_EvalCode(...) problem

2009-03-10 Thread googler . 1 . webmaster
http://rafb.net/p/Uyb5Ps45.html Pelase note, when I call PyObject_CallObject(...) in the wrapped C register(..) method it works fine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining from which web page a cgi script is invoked?

2009-03-10 Thread cm
davidgo...@davidgould.com escribió: Given a webpage test.html that has a form with a cgi script, how can you determine inside the cgi script the name of the webpage that invoked the script? I have many different html pages that use a common cgi script for form processing and want to determine th

Re: A parser for S.W.I.F.T. MT940 Files (for banking transactions)

2009-03-10 Thread John Machin
On Mar 10, 3:09 am, "andrew cooke" wrote: > a month is more than enough - i would expect to have something in a week. > if possible, a data size of 1GB or more would be useful, but A gigabyte of SWIFT messages as test data? > please remember that this is a "best efforts" attempt only.  i have no

Re: parallel/concurrent process in python

2009-03-10 Thread Ommer . Simjee
On Mar 10, 10:06 am, Minesh Patel wrote: > On Mon, Mar 9, 2009 at 2:47 PM,   wrote: > > I'm trying to figure out parallel process python code. Something > > similar to fork funtion in C. > > > For example, I using sniff tool in scapy to capture packets but i want > > this to run in the background:

Re: A Dangling Tk Entry

2009-03-10 Thread W. eWatson
r wrote: On Mar 10, 10:52 am, "W. eWatson" wrote: [snip: biting the hand that feeds] This is not the first time you have come to c.l.py with "hat in hand" seeking help and then scoffed at suggestions made by well respected posters. I should have known you would just do the same again. I don't k

[JOB] Short-term python programming consultant - funds expire soon!

2009-03-10 Thread Rob Clewley
Dear Pythonistas, Our open-source software project (PyDSTool) has money to hire an experienced Python programmer on a short-term, per-task basis as a technical consultant (i.e., no fringe benefits offered). The work can be done remotely and will be paid after the satisfactory completion of the obj

Re: last and final attempt to search for python ods library.

2009-03-10 Thread Krishnakant
Hi John, I tryed this same library to begin with. python-ooolib is very good except that it misses a major feature of cell merging (spanning ). That is the point from which I started the thread. I even thought the author of that library will respond back but did not happen. Seams it is a very o

Re: parallel/concurrent process in python

2009-03-10 Thread cgoldberg
> Why not use os.fork(), it is the same as C's fork? os.fork is not cross platform. It is *nix only. Subprocess runs on Windows also. The OP never specified his platform. -Corey -- http://mail.python.org/mailman/listinfo/python-list

Re: Graph Dates and Values

2009-03-10 Thread brianrpsgt1
On Mar 10, 9:44 am, "Gabriel Genellina" wrote: > En Tue, 10 Mar 2009 13:32:10 -0200, brianrpsgt1   > escribió: > > > > > > > On Mar 10, 7:40 am, "Gabriel Genellina" > > wrote: > >> En Tue, 10 Mar 2009 05:08:41 -0200, brianrpsgt1   > >> escribió: > > >> > I am trying to plot dates and values on

Re: [!! SPAM] can python import class or module directly from a zip package

2009-03-10 Thread Seairth Jacobs
Flank wrote: can python import class or module directly from a zip package ,just like jave does from jar package without extracting the class file into directory so far as i know ,python module should be unzip to file system in order to use them, -- http://mail.python.org/mailman/listinfo/pyth

Re: Indentations and future evolution of languages

2009-03-10 Thread skip
John> The only complaint I have there is that mixing tabs and spaces for John> indentation should be detected and treated as a syntax error. Guido's time machine strikes again (fixed in Python 3.x): % python3.0 ~/tmp/mixed.py File "/home/titan/skipm/tmp/mixed.py", line 3

Re: can python import class or module directly from a zip package

2009-03-10 Thread Stefan Behnel
Flank wrote: > can python import class or module directly from a zip package Yes, just put the .zip file into your PYTHONPATH. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentations and future evolution of languages

2009-03-10 Thread John Nagle
Kay Schluehr wrote: On 6 Mrz., 02:53, bearophileh...@lycos.com wrote: This is an interesting post, it shows me that fitness plateau where design of Python syntax lives is really small, you can't design something just similar: http://unlimitednovelty.com/2009/03/indentation-sensitivity-post-mort

can python import class or module directly from a zip package

2009-03-10 Thread Flank
can python import class or module directly from a zip package ,just like jave does from jar package without extracting the class file into directory so far as i know ,python module should be unzip to file system in order to use them, -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows install to custom location after building from source

2009-03-10 Thread Tim Golden
Tim Golden wrote: However, the .msi installs (and Python runs) without issue on a virgin VirtualXP. And it passes the basic test suite ok. I lied. test_zipfile fails because the new(ish) zipdir.zip doesn't get carried across to the install. Patched in: http://bugs.python.org/issue5470 A co

Re: parallel/concurrent process in python

2009-03-10 Thread Minesh Patel
On Mon, Mar 9, 2009 at 2:47 PM, wrote: > I'm trying to figure out parallel process python code. Something > similar to fork funtion in C. > > For example, I using sniff tool in scapy to capture packets but i want > this to run in the background: > > --- > from scapy.all import * > import subp

Re: Graph Dates and Values

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 13:32:10 -0200, brianrpsgt1 escribió: On Mar 10, 7:40 am, "Gabriel Genellina" wrote: En Tue, 10 Mar 2009 05:08:41 -0200, brianrpsgt1   escribió: > I am trying to plot dates and values on a graph using matplotlib. > Below is the code.  I can run this and it works great, u

Re: A Dangling Tk Entry

2009-03-10 Thread r
On Mar 10, 10:52 am, "W. eWatson" wrote: [snip: biting the hand that feeds] This is not the first time you have come to c.l.py with "hat in hand" seeking help and then scoffed at suggestions made by well respected posters. I should have known you would just do the same again. I don't know what yo

Re: A Dangling Tk Entry

2009-03-10 Thread W. eWatson
"Down, Fang! Down, boy. Down." -- Soupy Sales, Comedian, talking to his imaginary animal, circa 1960. Thank you very much. One more quote before I continue. A favorite. "The trouble with most folks isn't their ignorance. It's knowin' so many things that ain't so." by Josh Bil

Re: Candidate for a new itertool

2009-03-10 Thread pruebauno
On Mar 9, 6:55 pm, Raymond Hettinger wrote: > [prueba] > > > The data often contains objects with attributes instead of tuples, and > > I expect the new namedtuple datatype to be used also as elements of > > the list to be processed. > > > But I haven't found a nice generalized way for that kind o

Re: Graph Dates and Values

2009-03-10 Thread brianrpsgt1
On Mar 10, 7:40 am, "Gabriel Genellina" wrote: > En Tue, 10 Mar 2009 05:08:41 -0200, brianrpsgt1   > escribió: > > > I am trying to plot dates and values on a graph using matplotlib. > > Below is the code.  I can run this and it works great, until I get to > > about 2000 rows from the DB.  Things

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 13:00:18 -0200, Vito De Tullio escribió: MRAB wrote: >>> (lambda arg: arg) == (lambda arg: arg) False curious... I somehow thinked that, whereas (lambda: 0) is (lambda: 0) should be False (obviously) (lambda: 0) == (lambda: 0) could be True... maybe because `{}

Re: Ban Xah Lee

2009-03-10 Thread Alan Mackenzie
In comp.lang.lisp Xah Lee wrote: > Some people says that i don't participate in discussion, and this is > part of the reason they think i'm a so-called ?troll?. Actually i do, > and read every reply to my post, as well have replied to technical > questions other posted. Most replies to my posts a

Re: PyEval_EvalCode(...) problem

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 12:32:00 -0200, escribió: Hi! I have a problem with PyEval_EvalCode(...) I compile the following code and execute them with PyEval_EvalCode (...) class MyClass(mod.Upper): pass register(MyClass) #just the type, not the instance Thats all. So register(...) is a Py

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Vito De Tullio
MRAB wrote: > >>> (lambda arg: arg) == (lambda arg: arg) > False curious... I somehow thinked that, whereas >>> (lambda: 0) is (lambda: 0) should be False (obviously) >>> (lambda: 0) == (lambda: 0) could be True... maybe because `{} == {} and {} is not {}` (also for []) -- By ZeD -- http://

Re: creating a list of all imported modules

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 12:29:28 -0200, Timmie escribió: Put this code at the end of your script: import sys info = [(module.__file__, name) for (name, module) in sys.modules.iteritems() if hasattr(module, '__file__')] info.sort() import pprint pprint.pprint(in

Re: Windows install to custom location after building from source

2009-03-10 Thread Tim Golden
Martin v. Löwis wrote: I also see that it fails to add custom actions into InstallExecuteSequence. I find that puzzling - apparently, it tries to merge the twice. Are you sure you didn't run it twice? It will certainly fail the second time. Just to confirm: I'm certainly only running this once

Re: Graph Dates and Values

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 05:08:41 -0200, brianrpsgt1 escribió: I am trying to plot dates and values on a graph using matplotlib. Below is the code. I can run this and it works great, until I get to about 2000 rows from the DB. Things really start to slow down. I have successfully plotted up to

PyEval_EvalCode(...) problem

2009-03-10 Thread googler . 1 . webmaster
Hi! I have a problem with PyEval_EvalCode(...) I compile the following code and execute them with PyEval_EvalCode (...) class MyClass(mod.Upper): pass register(MyClass) #just the type, not the instance Thats all. So register(...) is a Python C API method so i take the type and store it in

Re: Set & Frozenset?

2009-03-10 Thread Lie Ryan
Matt Nordhoff wrote: Alan G Isaac wrote: Hans Larsen schrieb: How could I "take" an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one value, use iter(the_set).next() I recall a claim that f

Re: creating a list of all imported modules

2009-03-10 Thread Timmie
> Put this code at the end of your script: > import sys > info = [(module.__file__, name) > for (name, module) in sys.modules.iteritems() > if hasattr(module, '__file__')] > info.sort() > import pprint > pprint.pprint(info) > > AFAIK unless someone has been mess

Re: Ban Xah Lee

2009-03-10 Thread Grant Edwards
On 2009-03-10, Tim Wintle wrote: > On Mon, 2009-03-09 at 21:28 -0700, Luis Gonzalez wrote: >> C'mon guys, Xha Lee always wins, because fools like you get mad at him >> instead of ignoring him. > > Here here! Hear hear! -- Grant Edwards grante Yow! FROZEN ENTREES ma

Re: Windows install to custom location after building from source

2009-03-10 Thread Tim Golden
Martin v. Löwis wrote: First, it relies on config.py whose existence msi.py optionally ignores. Feel free to create a patch for that. http://bugs.python.org/issue5467 TJG -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Duncan Booth
Iain King wrote: > Sort of tangenitally; is there any real difference between the outcome > of the two following pieces of code? > > a = lambda x: x+2 > > def a(x): > return x+2 > Disassemble it to see. The functions themselves have identical code bytes, the only difference is the name o

Re: A Dangling Tk Entry

2009-03-10 Thread r
Alright try this code. The only thing that i left out was inheriting from Frame, but since i cannot see your entire progam i did not want to do that for fear of breaking some other code. You had a lot of useless code in there and more code that was just a spaghetti mess. If you want to return a dic

RE: Eject a Removable USB drive

2009-03-10 Thread Rickey, Kyle W
def do_magic(): from staples import easy_button result = easy_button.press() return result :) In all seriousness that code did the trick but only after a short delay. I noticed when I first ran it, there was no effect. But when I ran it interactively, it succeeded. Is there any way

error compiling 2.5

2009-03-10 Thread jonsoons
I am compiling 2.5 on Solaris 10 SPARC. I edited Modules/Setup to try and enable tkinter. ranlib claims that it cannot find libtk8.4.so even though I have a -L option pointing to it. ranlib libpython2.5.a /usr/sfw/bin/gcc -o python \ Modules/python.o \

Re: Ban Xah Lee

2009-03-10 Thread TomSW
> Xah Lee schrieb (and how...) For Google Groups users, there is a kill file implementation for Firefox / Greasemonkey: http://www.penney.org/ggkiller.html hth, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: Menu Interface Problem.

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 03:48:07 -0200, Paulo Repreza escribió: # Program exits until 'menu_item = 9' while menu_item != 9: print '-' print '1. Print the list.' print '2. Add a name to the list.' print '3. Remove a name from the list.' print '4. Change an item

Re: A Dangling Tk Entry

2009-03-10 Thread r
OK, here is a slightly cleaned up version of this horrible code. I did not change too much at one time for fear of confusing you. The main problem is you did not explicitly grid the entry like i told you earlier, and why you are using eval is beyond any measure of sanity... from Tkinter import * i

Re: A Dangling Tk Entry

2009-03-10 Thread W. eWatson
Rhodri James wrote: > On Tue, 10 Mar 2009 04:14:51 -, W. eWatson > wrote: > >> Marc 'BlackJack' Rintsch wrote: >>> On Mon, 09 Mar 2009 04:22:57 -0700, W. eWatson wrote: >>> Marc 'BlackJack' Rintsch wrote: > On Sun, 08 Mar 2009 22:20:09 -0700, W. eWatson wrote: > >> You didn't

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread S Arrowsmith
Iain King wrote: >Sort of tangenitally; is there any real difference between the outcome >of the two following pieces of code? > >a = lambda x: x+2 > >def a(x): >return x+2 a.__name__ As for why that matters, try a(None) and see which gives the more informative traceback. -- \S under

Re: last and final attempt to search for python ods library.

2009-03-10 Thread John Machin
On 10/03/2009 10:35 PM, Krishnakant wrote: any ways thanks for your reply, Right now I am stuck very badly. The problem is that I am trying python-ooolib and did find the library pritty good. There's another one called ooolib-python; have you had a look at that? Can you provide the url? Actu

Re: xml input sanitizing method in standard lib?

2009-03-10 Thread Gabriel Genellina
En Tue, 10 Mar 2009 05:40:10 -0200, Stefan Behnel escribió: Gabriel Genellina wrote: En Mon, 09 Mar 2009 15:30:31 -0200, Petr Muller escribió: I don't know what else is illegal in xml, so I've searched if there's some method how to prepare strings for insertion to a xml doc before I start r

Re: last and final attempt to search for python ods library.

2009-03-10 Thread Krishnakant
> > any ways thanks for your reply, > > Right now I am stuck very badly. > > > > The problem is that I am trying python-ooolib and did find the library > > pritty good. > > There's another one called ooolib-python; have you had a look at that? > Can you provide the url? Actually I think I saw t

Re: A parser for S.W.I.F.T. MT940 Files (for banking transactions)

2009-03-10 Thread dwahli
On 9 mar, 14:59, Saki wrote: > Hello, > > I need an MT940 file parses. It can be either a pure python library or > a binding/wrapper, no matter. Almost all european banks provide > transactions extract in MT940 format. There are parsers around, but > none of them are for python. Any help is greatl

Re: Ban Xah Lee

2009-03-10 Thread Christian
Xah Lee schrieb: Christian wrote: On Mar 9, 1:22 pm, Christian wrote: XahLeeschrieb:> Of interest: • Why Can't You Be Normal? http://xahlee.org/Netiquette_dir/why_cant_you_be_normal.html IMHO the point that you never reply to responds is what makes it problematic. I have seen 10 or mor

  1   2   >