Re: RE: RE: Good books in computer science?

2009-06-21 Thread Bob Martin
in 118305 20090621 214008 Phil Runciman wrote: >How many instruction sets have you used? I have used at least 9. IBM 1401 IBM 1410 IBM 7090/7094 IBM 1620 IBM 360 IBM System/7 IBM 1130 IBM 1800 IBM Series/1 Intel 8080 etc Motorola 6800 etc Texas 9900 (my second favourite) plus a bunch of

Re: Re: Help: Group based synchronize decorator

2009-06-21 Thread Vishal Shetye
Thanks. - vishal > -Original Message- > Sent: Friday, June 19, 2009 3:15 PM > To: python-list@python.org > Subject: Python-list Digest, Vol 69, Issue 214 > > Message: 6 > Date: Fri, 19 Jun 2009 10:53:27 +0200 > From: Piet van Oostrum > To: python-list@python.org > Subject: Re: Help: Grou

Re: Idioms and Anti-Idioms Question

2009-06-21 Thread Lie Ryan
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: > > value = foo.bar()['first

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 c

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 , 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 managed during his short > > life. > > > > Not

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: File Syncing

2009-06-21 Thread Tim Roberts
dads wrote: >On Jun 20, 11:21 am, Lawrence D'Oliveiro central.gen.new_zealand> wrote: >> In message > >> 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 smal

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

2009-06-21 Thread Aahz
In article , 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. As stated previously, my suspicion is that at least some is caused by a problem with MIME messages and the mail->news gateway on python.org

RE: RE: Good books in computer science?

2009-06-21 Thread Lawrence D'Oliveiro
In message , 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. Unfortunately, we had to learn the hard way that machine inst

Re: os.system vs subprocess

2009-06-21 Thread Lawrence D'Oliveiro
In message , 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: 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, condi

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): sel

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 mom

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: 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

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 "myprog.ex

Re: dynamically associate radio buttons with droplists

2009-06-21 Thread Aahz
In article , Leo Brugud 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 would like to have is, when users choose a button, the droplist >update automatically t

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 t

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 Nate
On Jun 21, 3:49 pm, Christian Heimes 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: Can I replace this for loop with a join?

2009-06-21 Thread Ben Finney
Paul Watson 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 is ever a need to

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) e

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: self.

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: Inheritance and forward references (prototypes)

2009-06-21 Thread Scott David Daniels
Lorenzo Di Gregorio wrote: On 21 Jun., 01:54, Dave Angel 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 curious to fi

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 wrote: ->Because it reminds me of when things went badly wrong. IBM360, Von Neumann = ->architecture, no hardware

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: 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 that I am replying to (but I break the thread on purpose). For example the posting with Message-ID: reference

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 to

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(): >

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: 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: 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 (http://docs.python.org/library/urllib2.html

Re: os.system vs subprocess

2009-06-21 Thread Nate
On Jun 21, 2:12 pm, Chris Rebert wrote: > On Sun, Jun 21, 2009 at 10:12 AM, Nate 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

Re: Meta question: disappearing posts

2009-06-21 Thread Piet van Oostrum
> Chris Rebert (CR) wrote: >CR> On Sun, Jun 21, 2009 at 5:25 AM, 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 that I am replying to (but I

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 Rebert wrote: On Sat, Jun 20, 2009 at 7:17 AM, Luca 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 abl

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 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 that I am replying to (but I As addressed in an earlier thread, Mr. Bieb

Re: os.system vs subprocess

2009-06-21 Thread Chris Rebert
On Sun, Jun 21, 2009 at 10:12 AM, Nate 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 gmapcreator.jar -dfile=cens

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

2009-06-21 Thread Paul Rubin
"Hendrik van Rooyen" 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 at small scale.

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 ou

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 suspe

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) o

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. No

Re: generator expression works in shell, NameError in script

2009-06-21 Thread guthrie
On Jun 18, 11:28 pm, greg 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 > comprehension

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: Status of Python threading support (GIL removal)?

2009-06-21 Thread Aahz
In article , Jeremy Sanders 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 has problems with even this form of threading > >http://www.dab

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?= 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 insufficient for our ne

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 le

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 thinkin

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 co

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 really

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 th

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

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. b

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 reco

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 observati

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

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. -- http://mail.python.or

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 that I am replying to (but I break the thread on purpose). For example the posting with Message-ID: references: <77e831100906192220y553

Re: Inheritance and forward references (prototypes)

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

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 run

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

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

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

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 Rebert wrote: >> On Sat, Jun 20, 2009 at 7:17 AM, Luca 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 this. T

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 thi

Re: waling a directory with very many files

2009-06-21 Thread rkl
On Jun 15, 2:35 am, tom 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 > adirector

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

2009-06-21 Thread Hendrik van Rooyen
"Kay Schluehr" 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 it succinctly.

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 nagaraj 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 device in non-block

Re: Developing GUI applications

2009-06-21 Thread Hendrik van Rooyen
"Grant Ito" 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 wxPython and Ti

Re: raw_input with a pre-compiled data

2009-06-21 Thread Luca
On Sat, Jun 20, 2009 at 6:38 PM, Chris Rebert wrote: > On Sat, Jun 20, 2009 at 7:17 AM, Luca 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 this. There is some other fu

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

2009-06-21 Thread Jure Erznožnik
On Jun 21, 9:32 am, OdarR 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 Xcode first) Mul

Re: Newbie queue question

2009-06-21 Thread Jure Erznožnik
On Jun 21, 9:43 am, Чеширский Кот 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 final applicatio

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

2009-06-21 Thread OdarR
On 21 juin, 03:27, Jure Erznožnik 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 benefit from multiple cp

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/ ☄ -- http://mail.pytho

Re: File Syncing

2009-06-21 Thread Lawrence D'Oliveiro
In message , 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, instead of having a local copy. -- http://mail.python.org/mailm

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. Pipi

Re: File Syncing

2009-06-21 Thread dads
On Jun 20, 11:21 am, Lawrence D'Oliveiro wrote: > In message > 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

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 oppositio