discover: automatic test discovery for unittest

2009-06-21 Thread Fuzzyman
The discover module is a backport of the automatic test discovery from python-trunk (what will become Python 2.7 3.2) to work with Python 2.4 or more recent (including Python 3.0). Test discovery allows you to run all the unittest based tests (or just a subset of them) in your project without

ANN: W3C HTML batch Validator in Python

2009-06-21 Thread Christof Hoeke
what is it -- A simple script calling the W3C HTML Validator in batch mode. Adapted from Perl version. changes since the last full release --- - BUGFIX: checks for Valid or Invalid adapted to changes of W3C HTML Validator HTML (the check is really

Python-URL! - weekly Python news and links (Jun 20)

2009-06-21 Thread Gabriel Genellina
QOTW: ... open recursion with abstraction is supported in OOP but it requires elaborate and rather tedious boilerplate in FP ... - Martin Odersky http://www.nabble.com/Re%3A--scala--usefulness-of-OOP-p23273389.html How to write a method that may act both as an instance method

Python class gotcha with scope?

2009-06-21 Thread billy
I don't quite understand why this happens. Why doesn't b have its own version of r? If r was just an int instead of a dict, then it would. class foo: ... r = {} ... def setn(self, n): ... self.r[f] = n ... a = foo() a.setn(4) b = foo() b.r {'f': 4} thanks, billy --

Re: Python class gotcha with scope?

2009-06-21 Thread Vincent
On Jun 21, 2:32 pm, billy billy.cha...@gmail.com wrote: I don't quite understand why this happens. Why doesn't b have its own version of r? If r was just an int instead of a dict, then it would. class foo: ...     r = {} ...     def setn(self, n): ...             self.r[f] = n ... a =

Re: Python class gotcha with scope?

2009-06-21 Thread Vincent
On Jun 21, 2:38 pm, Vincent pho...@gmail.com wrote: On Jun 21, 2:32 pm, billy billy.cha...@gmail.com wrote: I don't quite understand why this happens. Why doesn't b have its own version of r? If r was just an int instead of a dict, then it would. class foo: ...     r = {} ...    

Re: Python class gotcha with scope?

2009-06-21 Thread Carl Banks
On Jun 20, 11:32 pm, billy billy.cha...@gmail.com wrote: I don't quite understand why this happens. Why doesn't b have its own version of r? If r was just an int instead of a dict, then it would. class foo: ...     r = {} ...     def setn(self, n): ...             self.r[f] = n ... a =

Re: Python class gotcha with scope?

2009-06-21 Thread billy
great, thanks for the quick responses :) On Jun 21, 2:41 am, Carl Banks pavlovevide...@gmail.com wrote: On Jun 20, 11:32 pm, billy billy.cha...@gmail.com wrote: I don't quite understand why this happens. Why doesn't b have its own version of r? If r was just an int instead of a dict, then

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Jure Erznožnik
Look, guys, here's the thing: In the company I work at we decided to rewrite our MRP system in Python. I was one of the main proponents of it since it's nicely cross platform and allows for quite rapid application development. The language and it's built in functions are simply great. The

Re: File Syncing

2009-06-21 Thread dads
On Jun 20, 11:21 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message b2c37939-f921-4ea5- b0d7-586b1b332...@t10g2000vbg.googlegroups.com, dads wrote: What would I have to learn to be able to sync the text files on each server? How big is the text file? If it's

Re: walking a directory with very many files

2009-06-21 Thread Steven D'Aprano
Lawrence D'Oliveiro wrote: Ok, now pipe ls to less, take three days to browse through all the filenames to locate the file you want to see. Sounds like you're approaching the issue with a GUI-centric mentality, which is completely hopeless at dealing with this sort of situation. Piping the

Re: File Syncing

2009-06-21 Thread Lawrence D'Oliveiro
In message b2c37939-f921-4ea5- b0d7-586b1b332...@t10g2000vbg.googlegroups.com, dads wrote: What would I have to learn to be able to sync the text files on each server? How big is the text file? If it's small, why not have your script read it directly from a master server every time it runs,

a evaluation of Google-code-prettify

2009-06-21 Thread Xah Lee
For those of you interested in the Google tech of syntax coloring source code in html on the fly using javascript, i've spent few hours for a evaluation. See: • Google-code-prettify Examples http://xahlee.org/js/google-code-prettify/index.html Xah ∑ http://xahlee.org/ ☄ --

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread OdarR
On 21 juin, 03:27, Jure Erznožnik jure.erznoz...@gmail.com wrote: Add: Carl, Olivier co. - You guys know exactly what I wanted. Others: Going back to C++ isn't what I had in mind when I started initial testing for my project. Do you think multiprocessing can help you seriously ? Can you

Re: Newbie queue question

2009-06-21 Thread Jure Erznožnik
On Jun 21, 9:43 am, Чеширский Кот p.ela...@gmail.com wrote: 1. say me dbf files count? 2. why dbf ? It was just a test. It was the most compatible format I could get between Python and the business application I work with without using SQL servers and such. Otherwise it's of no consequence. The

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Jure Erznožnik
On Jun 21, 9:32 am, OdarR olivier.da...@gmail.com wrote: Do you think multiprocessing can help you seriously ? Can you benefit from multiple cpu ? did you try to enhance your code with numpy ? Olivier (installed a backported multiprocessing on his 2.5.1 Python, but need installation of

Re: raw_input with a pre-compiled data

2009-06-21 Thread Luca
On Sat, Jun 20, 2009 at 6:38 PM, Chris Rebertc...@rebertia.com wrote: On Sat, Jun 20, 2009 at 7:17 AM, Lucaluca...@gmail.com wrote: Hi all. I need to use a function like the raw_input to read data from user command line, but I really like to pre-compile the choice and I'm not able to do

Re: Developing GUI applications

2009-06-21 Thread Hendrik van Rooyen
Grant Ito grant_...@shaw.ca wrote: Hi everyone. I'm looking to find out what people are using for an open source wysiwyg GUI developer. I'm running both Linux and Windows but prefer to do my development in Linux. I've got the most experience with Tkinter but am willing to look at

Re: os.read in non blocking mode of os.open : resource busy error

2009-06-21 Thread Kushal Kumaran
On Wed, Jun 17, 2009 at 7:18 PM, kshama nagarajkshama.naga...@gmail.com wrote: Dear all, I am using os.open to open a tun/tap device and then read data from it. I also need to do some other tasks apart from reading from this device. So i wish to have the read non blocking. I am opening the

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Hendrik van Rooyen
Kay Schluehr k...@fiber-space.de wrote: This implies that people stay defensive concerning concurrency ( like me right now ) and do not embrace it like e.g. Erlang does. Sometimes there is a radical change in the way we design applications and a language is the appropriate medium to express

Re: waling a directory with very many files

2009-06-21 Thread rkl
On Jun 15, 2:35 am, tom f...@thefsb.org wrote: i can traverse adirectoryusing os.listdir() or os.walk(). but if adirectoryhas a very large number of files, these methods produce very large objects talking a lot of memory. in other languages one can avoid generating such an object by walking

Re: waling a directory with very many files

2009-06-21 Thread Tim Golden
rkl wrote: I might be a little late with my comment here. David Beazley in his PyCon'2008 presentation Generator Tricks For Systems Programmers had this very elegant example of handling an unlimited numbers of files: David Beazley's generator stuff is definitely worth recommending on. I

Re: raw_input with a pre-compiled data

2009-06-21 Thread Peter Otten
Luca wrote: On Sat, Jun 20, 2009 at 6:38 PM, Chris Rebertc...@rebertia.com wrote: On Sat, Jun 20, 2009 at 7:17 AM, Lucaluca...@gmail.com wrote: Hi all. I need to use a function like the raw_input to read data from user command line, but I really like to pre-compile the choice and I'm not

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Stefan Behnel
Christian Heimes wrote: Hard computations gain more speed from carefully crafted C or Fortran code that utilizes features like the L1 and L2 CPU cache, SIMD etc. or parallelized algorithms. If you start sharing values between multiple cores you have a serious problem. Oh, and use NumPy for

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Stefan Behnel
Jure Erznožnik wrote: On Jun 20, 1:36 am, a...@pythoncraft.com (Aahz) wrote: You should put up or shut up -- I've certainly seen multi-core speedup with threaded software, so show us your benchmarks! -- Sorry, no intent to offend anyone here. Flame wars are not my thing. I have shown my

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Jeremy Sanders
Jesse Noller wrote: Sorry, you're incorrect. I/O Bound threads do in fact, take advantage of multiple cores. I don't know whether anyone else brought this up, but it looks like Python has problems with even this form of threading http://www.dabeaz.com/python/GIL.pdf It's certainly a very

MemoryError c/vcompiler.h:745: Fatal Python error (Psycopg2)

2009-06-21 Thread Luis P. Mendes
Hi, I have a program that uses a lot of resources: memory and cpu but it never returned this error before with other loads: MemoryError c/vcompiler.h:745: Fatal Python error: psyco cannot recover from the error above Aborted The last time I checked physical RAM while the script was running,

Re: Inheritance and forward references (prototypes)

2009-06-21 Thread Lorenzo Di Gregorio
On 21 Jun., 01:54, Dave Angel da...@ieee.org wrote: LorenzoDiGregoriowrote: On Jun 20, 8:43 pm, Dave Angel da...@ieee.org wrote: LorenzoDiGregoriowrote: Hi, I'm wondering what would be the preferred way to solve the following forward reference problem:

Meta question: disappearing posts (was Re: calculating a self.value, self.randomnum = normalvariate(x, y))

2009-06-21 Thread Piet van Oostrum
I notice that I see several postings on news:comp.lang.python that are replies to other postings that I don't see. Examples are the postings by Dennis Lee Bieber wlfr...@ix.netcom.com that I am replying to (but I break the thread on purpose). For example the posting with Message-ID:

Re: Rich comparison methods don't work in sets?

2009-06-21 Thread Gustavo Narea
Hi, everyone. OK, I got it now! The value of the hash is not decisive, as __eq__ will still be called when the hashes match. It's like a filter, for performance reasons. It's really nice, I just tried it and it worked. Thank you very, very much!! Cheers, - Gustavo. --

Re: MemoryError c/vcompiler.h:745: Fatal Python error (Psycopg2)

2009-06-21 Thread Lie Ryan
Luis P. Mendes wrote: Hi, I have a program that uses a lot of resources: memory and cpu but it never returned this error before with other loads: MemoryError c/vcompiler.h:745: Fatal Python error: psyco cannot recover from the error above Aborted The last time I checked physical

Re: Inheritance and forward references (prototypes)

2009-06-21 Thread Lie Ryan
Lorenzo Di Gregorio wrote: I had also thought of using None (or whatever else) as a marker but I was curious to find out whether there are better ways to supply an object with standard values as a default argument. In this sense, I was looking for problems ;-) Of course the observation that

Re: MemoryError c/vcompiler.h:745: Fatal Python error (Psycopg2)

2009-06-21 Thread Luis P. Mendes
Sun, 21 Jun 2009 13:04:59 +, Lie Ryan escreveu: Luis P. Mendes wrote: Hi, I have a program that uses a lot of resources: memory and cpu but it never returned this error before with other loads: MemoryError c/vcompiler.h:745: Fatal Python error: psyco cannot recover from the error

question about c++ and python

2009-06-21 Thread Issa Kamar
Dear Sirs; I'm a PhD student,i have a question i wish if you can help me really.I'm working in Linux ubuntu 8.10,i have a c++ file which i need to connect this file to a python file and run it,i wish really if u can send me the method that can help me to do this and really I'm very thankful.

Re: class or instance method

2009-06-21 Thread Paul Johnston
Hi, class class_or_instance(object):     def __init__(self, fn): ... This works a treat, thank-you. Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: MemoryError c/vcompiler.h:745: Fatal Python error (Psycopg2)

2009-06-21 Thread Lie Ryan
Luis P. Mendes wrote: Sun, 21 Jun 2009 13:04:59 +, Lie Ryan escreveu: Have you tried running without psyco? Psyco increases memory usage quite significantly. If it runs well without psyco, you can try looking at your code and selectively psyco parts that need the speed boost the most.

Re: question about c++ and python

2009-06-21 Thread Diez B. Roggisch
Issa Kamar schrieb: Dear Sirs; I'm a PhD student,i have a question i wish if you can help me really.I'm working in Linux ubuntu 8.10,i have a c++ file which i need to connect this file to a python file and run it,i wish really if u can send me the method that can help me to do this and

Re: KeyboardInterrupt eats my error and then won't be caught

2009-06-21 Thread Philip Semanchuk
On Jun 20, 2009, at 10:21 PM, greg wrote: Philip Semanchuk wrote: Best of all, PyErr_CheckSignals() doesn't interfere with a Python- level signal handler if one is set. Ah, I hadn't realised that you were doing this in C code, and I was trying to think of a Python-level solution. For C

python needs a tutorial for install and setup on a Mac

2009-06-21 Thread Vincent Davis
I am running python on a mac and when I was getting going it was difficult to setup information. Specifically how modify bash_profile, how pythonpath works and how to set it up. how to switch between python versions. How/where to install modules if you have multiple installed versions. I am

docs error for PyBuffer_FillInfo?

2009-06-21 Thread Diez B. Roggisch
I'm trying to wrap a C++-lib with SIP need to return a buffer-object from one method. I'm on python2.6 (OS X, but that doesn't matter I guess), and http://docs.python.org/c-api/buffer.html#Py_buffer gives a signature like this: int PyBuffer_FillInfo(Py_buffer *view, void *buf, Py_ssize_t

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Aahz
In article 90303b55-8686-4d56-b89c-01e31d0a6...@l8g2000vbp.googlegroups.com, =?windows-1252?Q?Jure_Erzno=9Enik?= jure.erznoz...@gmail.com wrote: So, recently I started writing a part of this new system in Python. A report generator to be exact. Let's not go into existing offerings, they are

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Aahz
In article h1l6m3$3f...@gemini.csx.cam.ac.uk, Jeremy Sanders jeremy+complangpyt...@jeremysanders.net wrote: Jesse Noller wrote: Sorry, you're incorrect. I/O Bound threads do in fact, take advantage of multiple cores. I don't know whether anyone else brought this up, but it looks like Python

urllib2 urlopen takes too much time

2009-06-21 Thread Filip Gruszczyński
I have encountered a performance problem using suds, which was traced down to _socket.recv. I am calling some web services and each of them uses about 0.2 sec and 99% of this time is spent on urllib2.urlopen, while the rest of the call is finished in milliseconds. Because of this, my web app works

Re: generator expression works in shell, NameError in script

2009-06-21 Thread guthrie
On Jun 18, 11:28 pm, greg g...@cosc.canterbury.ac.nz wrote: nn wrote: This is certainly an odd one. This code works fine under 2.6 but fails in Python 3.1. class x: ...     lst=[2] ...     gen=[lst.index(e) for e in lst] In 3.x it was decided that the loop variables in a list

urllib2 content-type headers

2009-06-21 Thread TYR
I have a little application that wants to send data to a Google API. This API requires an HTTP header to be set as follows: Authorization: GoogleLogin auth=[value of auth token goes here] Unfortunately, I'm getting nothing but 400 Bad Requests. I suspect this is due to an unfeature of urllib2.

Re: urllib2 content-type headers

2009-06-21 Thread Philip Semanchuk
On Jun 21, 2009, at 12:01 PM, TYR wrote: I have a little application that wants to send data to a Google API. This API requires an HTTP header to be set as follows: Authorization: GoogleLogin auth=[value of auth token goes here] Unfortunately, I'm getting nothing but 400 Bad Requests. I

Re: docs error for PyBuffer_FillInfo?

2009-06-21 Thread Christian Heimes
Diez B. Roggisch wrote: And obviously enough, compiling my wrapper fails because there is an argument missing. So, I'm in need for a guide on how to use PyBuffer_FillInfo properly - all I've got is a void* and a total size of the buffer. The second argument points to the (optional) object

os.system vs subprocess

2009-06-21 Thread Nate
I get different behavior with os.system and subprocess (no surprise there I guess), but I was hoping for some clarification, namely why. If I type this directly into the command window: java -Xms128M -Xmx512M -jar gmapcreator.jar -dfile=censettings.xml mapoutput.txt mapoutput.txt stores the

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Paul Rubin
Hendrik van Rooyen m...@microcorp.co.za writes: I think that this is because (like your link has shown) the problem is really not trivial, and also because the model that can bring sanity to the party (independent threads/processes that communicate with queued messages) is seen as inefficient

Re: os.system vs subprocess

2009-06-21 Thread Chris Rebert
On Sun, Jun 21, 2009 at 10:12 AM, Natewalton.nathan...@gmail.com wrote: I get different behavior with os.system and subprocess (no surprise there I guess), but I was hoping for some clarification, namely why. If I type this directly into the command window: java -Xms128M -Xmx512M -jar

Re: Meta question: disappearing posts (was Re: calculating a self.value, self.randomnum = normalvariate(x, y))

2009-06-21 Thread Chris Rebert
On Sun, Jun 21, 2009 at 5:25 AM, Piet van Oostrump...@cs.uu.nl wrote: I notice that I see several postings on news:comp.lang.python that are replies to other postings that I don't see. Examples are the postings by Dennis Lee Bieber wlfr...@ix.netcom.com that I am replying to (but I As

Re: raw_input with a pre-compiled data

2009-06-21 Thread Dave Angel
Peter Otten wrote: Luca wrote: On Sat, Jun 20, 2009 at 6:38 PM, Chris Rebertc...@rebertia.com wrote: On Sat, Jun 20, 2009 at 7:17 AM, Lucaluca...@gmail.com wrote: Hi all. I need to use a function like the raw_input to read data from user command line, but I really like to

Re: Meta question: disappearing posts

2009-06-21 Thread Piet van Oostrum
Chris Rebert c...@rebertia.com (CR) wrote: CR On Sun, Jun 21, 2009 at 5:25 AM, Piet van Oostrump...@cs.uu.nl wrote: I notice that I see several postings on news:comp.lang.python that are replies to other postings that I don't see. Examples are the postings by Dennis Lee Bieber

Re: os.system vs subprocess

2009-06-21 Thread Nate
On Jun 21, 2:12 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jun 21, 2009 at 10:12 AM, Natewalton.nathan...@gmail.com wrote: I get different behavior with os.system and subprocess (no surprise there I guess), but I was hoping for some clarification, namely why. If I type this directly

Re: urllib2 content-type headers

2009-06-21 Thread Miles Kaufmann
On Jun 21, 2009, at 12:01 PM, TYR wrote: Unfortunately, I'm getting nothing but 400 Bad Requests. I suspect this is due to an unfeature of urllib2. Notably, although you can use urllib2.Request's add_header method to append a header, the documentation

Re: generator expression works in shell, NameError in script

2009-06-21 Thread Miles Kaufmann
On Jun 19, 2009, at 8:45 AM, Bruno Desthuilliers wrote: class Foo(object): ... bar = ['a', 'b', 'c'] ... baaz = list((b, b) for b in bar) but it indeed looks like using bar.index *in a generator expression* fails (at least in 2.5.2) : class Foo(object): ... bar = ['a', 'b',

Re: os.system vs subprocess

2009-06-21 Thread Christian Heimes
Nate wrote: gmapcreator = subprocess.Popen(java -Xms128M -Xmx512M -jar gmapcreator.jar -dfile=censettings.xml, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) Try this: gmapcreator = subprocess.Popen( [java, -Xms128M, -Xmx512M, -jar, gmapcreator.jar,

Re: Can I replace this for loop with a join?

2009-06-21 Thread Paul Watson
On Mon, 2009-04-13 at 17:03 +0200, WP wrote: Hello, I have dictionary {1:astring, 2:anotherstring, etc} I now want to print: Press 1 for astring Press 2 for anotherstring etc I could do it like this: dict = {1:'astring', 2:'anotherstring'} for key in dict.keys(): print 'Press %i

Re: docs error for PyBuffer_FillInfo?

2009-06-21 Thread Diez B. Roggisch
Christian Heimes schrieb: Diez B. Roggisch wrote: And obviously enough, compiling my wrapper fails because there is an argument missing. So, I'm in need for a guide on how to use PyBuffer_FillInfo properly - all I've got is a void* and a total size of the buffer. The second argument points

Re: Meta question: disappearing posts (was Re: calculating a self.value, self.randomnum = normalvariate(x, y))

2009-06-21 Thread Terry Reedy
Piet van Oostrum wrote: I notice that I see several postings on news:comp.lang.python that are replies to other postings that I don't see. Examples are the postings by Dennis Lee Bieber wlfr...@ix.netcom.com that I am replying to (but I break the thread on purpose). For example the posting with

GNUstep and Python

2009-06-21 Thread Paul Watson
Has anyone used GNUstep? In addition to Objective-C, there are Java and Ruby bindings. Has anyone created a Python binding to GNUstep? -- http://mail.python.org/mailman/listinfo/python-list

RE: RE: Good books in computer science?

2009-06-21 Thread Phil Runciman
-From: Bob Martin [mailto:bob.mar...@excite.com] -.Sent: Thursday, 18 June 2009 6:07 p.m. -Subject: Re: RE: Good books in computer science? -in 117815 20090617 221804 Phil Runciman ph...@aspexconsulting.co.nz wrote: -Because it reminds me of when things went badly wrong. IBM360, Von Neumann =

Re: Inheritance and forward references (prototypes)

2009-06-21 Thread Scott David Daniels
Lorenzo Di Gregorio wrote: On 21 Jun., 01:54, Dave Angel da...@ieee.org wrote: ... class B(object): def __init__(self,test=None): if test==None: test = A() self.obj =() return ... I had also thought of using None (or whatever else) as a marker but I was

Re: GNUstep and Python

2009-06-21 Thread Diez B. Roggisch
Paul Watson schrieb: Has anyone used GNUstep? In addition to Objective-C, there are Java and Ruby bindings. Has anyone created a Python binding to GNUstep? There is the pyobjc-binding for OSX, maybe that's suitable for GNUStep. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: class or instance method

2009-06-21 Thread Scott David Daniels
Hrvoje Niksic wrote: ... class class_or_instance(object): def __init__(self, fn): self.fn = fn def __get__(self, obj, cls): if obj is not None: return lambda *args, **kwds: self.fn(obj, *args, **kwds) else: return lambda *args, **kwds:

Re: class or instance method

2009-06-21 Thread Miles Kaufmann
On Jun 21, 2009, at 5:23 PM, Scott David Daniels wrote: Hrvoje Niksic wrote: ... class class_or_instance(object): def __init__(self, fn): self.fn = fn def __get__(self, obj, cls): if obj is not None: return lambda *args, **kwds: self.fn(obj, *args, **kwds)

Re: Can I replace this for loop with a join?

2009-06-21 Thread Ben Finney
Paul Watson paul.hermeneu...@gmail.com writes: On Mon, 2009-04-13 at 17:03 +0200, WP wrote: dict = {1:'astring', 2:'anotherstring'} for key in dict.keys(): print 'Press %i for %s' % (key, dict[key]) In addition to the comments already made, this code will be quite broken if there

Re: os.system vs subprocess

2009-06-21 Thread Nate
On Jun 21, 3:49 pm, Christian Heimes li...@cheimes.de wrote: Nate wrote: gmapcreator = subprocess.Popen(java -Xms128M -Xmx512M -jar gmapcreator.jar -dfile=censettings.xml, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) Try this: gmapcreator = subprocess.Popen(  

Re: Meta question: disappearing posts (was Re: calculating a self.value, self.randomnum = normalvariate(x, y))

2009-06-21 Thread Steven D'Aprano
Piet van Oostrum wrote: I notice that I see several postings on news:comp.lang.python that are replies to other postings that I don't see. I see the same problem. I suspect it's because of over-vigorous spam filtering from Usenet providers. Some even block everything from anyone using Google

Re: os.system vs subprocess

2009-06-21 Thread Christian Heimes
Nate wrote: Thanks for your response. Related to this talk about shells, maybe you could point me towards a resource where I could read about how windows commands are processed w/w/o shells? I guess I assumed all subprocess commands were intepreted by the same thing, cmd.exe., or perhaps the

Re: dynamically associate radio buttons with droplists

2009-06-21 Thread Aahz
In article f28e2bcc-3b51-4d43-81e7-9a7810040...@o36g2000vbi.googlegroups.com, Leo Brugud sakradevanamin...@gmail.com wrote: Not being very familiar with python, nor with cgi/http, I intend to have 3 of buttons in a webpage, each of them is associate with a file (so I have 3 files, too) What I

pyinstaller

2009-06-21 Thread Arlie
Newbie here using Python 2.6.2 on MS WinXP Pro SP3. I'm trying create an frozen exec and was able to generate and exe file. python D:\pyinstaller-1.3\Makespec.py -F myprog.py python D:\pyinstaller-1.3\Build.py myprog.spec --paths=D: \pyinstaller-1.3;D:\PROJECTS\pyproject but when I ran

Re: Meta question: disappearing posts (was Re: calculating a self.value, self.randomnum = normalvariate(x, y))

2009-06-21 Thread greg
Dennis Lee Bieber wrote: unless one is reading from a server that interprets X-no-archive to mean delete before reading. Can't be too careful with security. Destroy it, memorize it and then read it! -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller

2009-06-21 Thread Arlie
Renamed the project directory. from ... File D:\PROJECTS\python.paging.system.client \buildpaging_system_client\out1.p ... to ... File D:\PROJECTS\pyproject \buildpyproject\out1.p ... -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expression works in shell, NameError in script

2009-06-21 Thread greg
guthrie wrote: -- I don't get this - the only local loop variable is e, not lst. Yes, but the whole list comprehension gets put into a nested function, including the part that evaluates lst. (It's not strictly *necessary* to do that, but that's the way it happens to be implemented at the

Re: pyinstaller

2009-06-21 Thread Arlie
Imported files in myprog.py: import MySQLdb import os # works on Windows or Linux, also Vista import os.path import time import mp3 ~~~ Content of mp3.py: # -*- coding: utf-8 -*- #Michel Claveau import time from ctypes import windll, c_buffer class mci: def __init__(self):

Re: pyinstaller

2009-06-21 Thread Arlie
Content of warnmyprog.txt: W: no module named posix (conditional import by os) W: no module named optik.__all__ (top-level import by optparse) W: no module named readline (delayed, conditional import by cmd) W: no module named readline (delayed import by pdb) W: no module named pwd (delayed,

Re: os.system vs subprocess

2009-06-21 Thread Lawrence D'Oliveiro
In message mailman.1925.1245613790.8015.python-l...@python.org, Christian Heimes wrote: The subprocess doesn't use the shell ... It can if you tell it to. -- http://mail.python.org/mailman/listinfo/python-list

RE: RE: Good books in computer science?

2009-06-21 Thread Lawrence D'Oliveiro
In message mailman.1928.1245616909.8015.python-l...@python.org, Phil Runciman wrote: What I can say is that for scientific/engineering calculations the RPN of KDF9 was Great because assembler was no harder than using algol60 for the calculations part of the problems I worked on.

Re: Meta question: disappearing posts (was Re: calculating a self.value, self.randomnum = normalvariate(x, y))

2009-06-21 Thread Aahz
In article m21vpddb9y.fsf...@cs.uu.nl, Piet van Oostrum p...@cs.uu.nl wrote: I notice that I see several postings on news:comp.lang.python that are replies to other postings that I don't see. As stated previously, my suspicion is that at least some is caused by a problem with MIME messages and

Re: File Syncing

2009-06-21 Thread Tim Roberts
dads wayne.dads.b...@gmail.com wrote: On Jun 20, 11:21 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message b2c37939-f921-4ea5- b0d7-586b1b332...@t10g2000vbg.googlegroups.com, dads wrote: What would I have to learn to be able to sync the text files on each server?

Idioms and Anti-Idioms Question

2009-06-21 Thread Ben Charrow
I have a question about the Using Backslash to Continue Statements in the howto Idioms and Anti-Idioms in Python (http://docs.python.org/howto/doanddont.html#using-backslash-to-continue-statements) It says: ...if the code was: value = foo.bar()['first'][0]*baz.quux(1, 2)[5:9] \ +

Re: Good books in computer science?

2009-06-21 Thread Chris Jones
On Sun, Jun 14, 2009 at 06:42:50PM EDT, Lawrence D'Oliveiro wrote: In message mailman.1558.1245010564.8015.python-l...@python.org, Chris Jones wrote: Vivaldi vs. Mozart And the latter especially had definitely mastered his editor. Just think of the sheer volume of the coding he

Re: Idioms and Anti-Idioms Question

2009-06-21 Thread Steven D'Aprano
On Mon, 22 Jun 2009 00:14:50 -0400, Ben Charrow wrote: I have a question about the Using Backslash to Continue Statements in the howto Idioms and Anti-Idioms in Python (http://docs.python.org/howto/doanddont.html#using-backslash-to- continue-statements) It says: ...if the code was:

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2009-06-21 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Added file: http://bugs.python.org/file14326/py3k_winsound.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6317 ___

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2009-06-21 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file14325/py3k_winsound.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6317 ___

[issue6318] HTMLParser Attributes Containing Javascript

2009-06-21 Thread Eric
New submission from Eric e.rykwal...@gmail.com: The line: n.feed('a onclick=alert(\\test\\)test/a') is not matched by the regular expressions for attributes. -- components: Library (Lib) messages: 89555 nosy: ericryk severity: normal status: open title: HTMLParser Attributes Containing

[issue6318] HTMLParser Attributes Containing Escaped Quotes

2009-06-21 Thread Eric
Eric e.rykwal...@gmail.com added the comment: More specifically, the attributes cannot contain escaped quotes of the same kind that the attribute value is wrapped in. -- title: HTMLParser Attributes Containing Javascript - HTMLParser Attributes Containing Escaped Quotes

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2009-06-21 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Even for 3k, I would defer this patch after the 3.1 release, as it is an incompatible change (requiring a Unicode string where a byte string was acceptable before). -- nosy: +loewis ___ Python

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2009-06-21 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: release blocker - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6317 ___ ___

[issue6318] HTMLParser Attributes Containing Escaped Quotes

2009-06-21 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: That snippet is not valid HTML. The attribute string is not a JS string, so quotes in it must be escaped with 'quot;', not '\'. -- nosy: +georg.brandl resolution: - wont fix status: open - closed ___

[issue4856] Remove checks for win NT

2009-06-21 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is an updated patch with Py_GetFileAttributesEx[AW] removal. I propose to commit this to trunk, and merge it to py3k after 3.1 will be released. -- Added file: http://bugs.python.org/file14327/remove_w9x_code.patch

[issue6266] cElementTree.iterparse ElementTree.iterparse return differently encoded strings

2009-06-21 Thread Fredrik Lundh
Fredrik Lundh fred...@effbot.org added the comment: It should definitely give what's intended (either a Unicode string, or, if the content is plain ASCII, an 8-bit string). What did you get instead? -- ___ Python tracker rep...@bugs.python.org

[issue6317] winsound.PlaySound doesn't accept non-unicode string

2009-06-21 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I agree. By the way, I created the patch for trunk experimentally. -- Added file: http://bugs.python.org/file14328/py2x_winsound.patch ___ Python tracker rep...@bugs.python.org

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-06-21 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Finally I'm looking into this again. So, for now, I decided to only move the tk load tests to Lib/lib-tk/test/test_tkinter under a new module named test_loadtk. Lib/test/test_tcl remains almost the same, except it no longer it contain those

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: On Sun, 21 Jun 2009 at 14:57, Guilherme Polo wrote: Patch attached. May I reassign it to me David ? Absolutely. -- title: test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped - test_tcl

[issue6266] cElementTree.iterparse ElementTree.iterparse return differently encoded strings

2009-06-21 Thread nlopes
nlopes shelika.v...@gmail.com added the comment: I got pure gibberish output, but I know why. It was a compilation gone wrong. To get the output as ElementTree, I think instead of parcel = Py_BuildValue(sN, (prefix) ? prefix : , makestring(uri)); it should be parcel = Py_BuildValue(sN,

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-06-21 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Running tk tests through both Lib/test/test_tk.py and Lib/test/regrtest.py show the desired behaviour (from what I understood from your description and from what I tested). It has been committed now, r73495 (trunk). Should 2.6 and 3.0 really

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: No, I don't see any reason to bother backporting. From my understanding we're not backporting anything to 3.0 at this point anyway. -- ___ Python tracker rep...@bugs.python.org

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-06-21 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Fine, closing then. Committed as r73497 on py3k. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5450 ___

  1   2   >