Re: Good books in computer science?

2009-06-15 Thread Lie Ryan
Bob Martin wrote: > in 117455 20090615 044816 Steven D'Aprano > wrote: >> On Mon, 15 Jun 2009 10:39:50 +1200, Lawrence D'Oliveiro wrote: >> >>>> Shame on you for deliberately cutting out my more serious and nuanced >>>> answer while leaving

Re: itertools.intersect?

2009-06-15 Thread Raymond Hettinger
[David Wilson] > The problem is simple: given one or more ordered sequences, return > only the objects that appear in each sequence, without reading the > whole set into memory. This is basically an SQL many-many join. FWIW, this is equivalent to the Welfare Crook problem in David Gries book, The

Impossible to reinstall python-opensync which made unusable my package installation tools

2009-06-15 Thread Cassian Braconnier
Hi, Recently, I decided to install a package for python-opensync on my Ubuntu 9.04 (Jaunty). This package was here : http://www.progweb.com/modules/blackberry/opensync/ (I was said later that this package was for Debian SID) This was a very bad idea : it completely broke Synaptic, and made it im

Re: Alter list items within loop

2009-06-15 Thread Lie Ryan
Tim Harig wrote: > On 2009-06-11, Duncan Booth wrote: >> Tim Harig wrote: number 3 never gets printed. Does Python make a copy of a list before it iterates through it?: >>> No, complex types are passed by reference unless explicity copied. >> *All* types are passed by reference unless

Re: python-2.6.2 Exception: TypeError: "'NoneType' object is not callable" in ignored

2009-06-15 Thread John Machin
On Jun 15, 9:49 am, Terry Reedy wrote: > Poor Yorick wrote: > > The following code produces an error (python-2.6.2). > > You forgot to post the error traceback. The exception was IGNORED ... so no traceback. -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing json using simplejson

2009-06-15 Thread Diez B. Roggisch
deostroll wrote: > I need to be able to parse a json data object using the simplejson > package. First of all I need to know all the task needed for this job. - install simplejson - read documentation of simplejson - use simplejson as documented - ??? - profit! Diez -- http://mail.python.o

Re: waling a directory with very many files

2009-06-15 Thread Nick Craig-Wood
tom wrote: > On Jun 14, 1:35 pm, Tim Golden wrote: > > > > If you're on Windows, you can use the win32file.FindFilesIterator > > function from the pywin32 package. (Which wraps the Win32 API > > FindFirstFile / FindNextFile pattern). > > thanks, tim. > > however, i'm not using windows. freeb

Re: Impossible to reinstall python-opensync which made unusable my package installation tools

2009-06-15 Thread Ulrich Eckhardt
Cassian Braconnier wrote: > [...] completely broke Synaptic, and made it impossible to install any > (other, non python) package with apt-get or dpkg commands. This is not a Python error and it doesn't actually belong here. > So far I could not get any useful advice on the french ubuntu users > f

Mysterious hang

2009-06-15 Thread Johannes Bauer
Hello group, I'm pretty despereate right now and apologize for my diffuse question in advance - but I do not know how to continue right now. I'm writing a GUI client (pygtk) which talks to a server (TCP/IP), fetches pictures (FITS format) and displays them. This works nicely. Now I have a plugin

: an integer is required

2009-06-15 Thread jeni
I have developed in python a game for OPLC. When I run the game in Python 2.5.2 at Windows there is no problem. But after I play a game at OLPC I get the following message: Traceback (most recent call last) /home/olpc/Activities/Kremala.activity/Kremala.py in add_letter (self=, widget=, grama='i

Re: TypeError: int argument required

2009-06-15 Thread Rhodri James
On Mon, 15 Jun 2009 01:33:50 +0100, Lawrence D'Oliveiro wrote: In message , Rhodri James wrote: On Sun, 14 Jun 2009 10:43:30 +0100, Lawrence D'Oliveiro wrote: In message , Rhodri James wrote: 2. That output string has severe "leaning toothpick" syndrome. Python accepts both singl

Re: Measuring Fractal Dimension ?

2009-06-15 Thread pdpi
On Jun 15, 5:55 am, Steven D'Aprano wrote: > On Sun, 14 Jun 2009 14:29:04 -0700, Kay Schluehr wrote: > > On 14 Jun., 16:00, Steven D'Aprano > > wrote: > > >> Incorrect. Koch's snowflake, for example, has a fractal dimension of > >> log 4/log 3 ≈ 1.26, a finite area of 8/5 times that of the initia

Error in Pango while using cairo/librsvg

2009-06-15 Thread Hilmar Bunjes
Hi, I try using Python (on Windows) with Cairo and librsvg to convert a svg file to a png image. I got some help from the German python newsgroup to get this running but now I run into some problems with pango I don't know how to solve. Running the python script in the console it tells me: (p

Re: waling a directory with very many files

2009-06-15 Thread Hrvoje Niksic
Terry Reedy writes: > You did not specify version. In Python3, os.walk has become a > generater function. So, to answer your question, use 3.1. os.walk has been a generator function all along, but that doesn't help OP because it still uses os.listdir internally. This means that it both create

Re: waling a directory with very many files

2009-06-15 Thread Hrvoje Niksic
Nick Craig-Wood writes: > Here is a ctypes generator listdir for unix-like OSes. ctypes code scares me with its duplication of the contents of system headers. I understand its use as a proof of concept, or for hacks one needs right now, but can anyone seriously propose using this kind of code i

Re: waling a directory with very many files

2009-06-15 Thread Diez B. Roggisch
tom wrote: > i can traverse a directory using os.listdir() or os.walk(). but if a > directory has a very large number of files, these methods produce very > large objects talking a lot of memory. if we assume the number of files to be a million (which certainly qualifies as one of the larger dire

Re: Multi-Threading and KeyboardInterrupt

2009-06-15 Thread OdarR
On 13 juin, 07:25, Mike Kazantsev wrote: > There was quite interesting explaination of what happens when you send > ^C with threads, posted on concurrency-sig list recently: > >  http://blip.tv/file/2232410 >  http://www.dabeaz.com/python/GIL.pdf > > Can be quite shocking, but my experience w/ thr

Re: persistent composites

2009-06-15 Thread Diez B. Roggisch
Aaron Brady wrote: > Hi, please forgive the multi-posting on this general topic. > > Some time ago, I recommended a pursuit of keeping 'persistent > composite' types on disk, to be read and updated at other times by > other processes. Databases provide this functionality, with the > exception th

Re: TypeError: int argument required

2009-06-15 Thread Bearophile
Lawrence D'Oliveiro: >So no, using alternative quotes does not make things more readable.< You think that this: ' ' Isn't a bit more readable and simpler to write than: " " I think lot of doesn't agree with you. In such situation it can also be positive to split such string in two or more pa

Re: Observer implementations

2009-06-15 Thread Gerhard Häring
Tobias Weber wrote: > Hi, > how to use the Observer pattern in Python? Implement it in your classes? > I found PubSub and PyDispatcher, both of which are abandoned. [...] I haven't searched for these, but googling for "python observer pattern" yields http://code.activestate.com/recipes/131499/ a

Re: How to get the total size of a local hard disk?

2009-06-15 Thread Paul Boddie
On 15 Jun, 14:58, willgun wrote: > > How to get the total size of a local hard disk? > I mean total size,not free space. Which platform are you using? On a Linux-based system you might look at the contents of /proc/partitions and then, presumably with Python, parse the contents to yield a number

unsuccessful post request hangs, what gives?

2009-06-15 Thread Travis Altman
i'm trying to use a post request to authenticate to a web application. let's say username = alice is valid but username = bob does not exits. making the request with alice works like a charm but when i try username = bob it hangs? any suggestions? -- http://mail.python.org/mailman/listinfo/python

Re: How to get the total size of a local hard disk?

2009-06-15 Thread Tim Golden
Paul Boddie wrote: On 15 Jun, 14:58, willgun wrote: How to get the total size of a local hard disk? I mean total size,not free space. Which platform are you using? On a Linux-based system you might look at the contents of /proc/partitions and then, presumably with Python, parse the contents t

Re: How to get the total size of a local hard disk?

2009-06-15 Thread Tim Golden
willgun wrote: Unfortunately,I'm on win32. Actually,I prefer a cross-platform method. Thanks. These kind of things tend to be fairly platform specific. Obviously, nothing's stopping anyone writing a module which does some platform-sniffing and conditional imports and provides a consistent inter

Re: How to get the total size of a local hard disk?

2009-06-15 Thread willgun
Unfortunately,I'm on win32. Actually,I prefer a cross-platform method. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: waling a directory with very many files

2009-06-15 Thread Nick Craig-Wood
Hrvoje Niksic wrote: > Nick Craig-Wood writes: > > > Here is a ctypes generator listdir for unix-like OSes. > > ctypes code scares me with its duplication of the contents of system > headers. I understand its use as a proof of concept, or for hacks one > needs right now, but can anyone ser

Re: waling a directory with very many files

2009-06-15 Thread Jean-Paul Calderone
On Mon, 15 Jun 2009 09:29:33 -0500, Nick Craig-Wood wrote: Hrvoje Niksic wrote: Nick Craig-Wood writes: > Here is a ctypes generator listdir for unix-like OSes. ctypes code scares me with its duplication of the contents of system headers. I understand its use as a proof of concept, or f

Re: itertools.intersect?

2009-06-15 Thread Andrew Henshaw
"Raymond Hettinger" wrote in message news:fb1feeeb-c430-4ca7-9e76-fea02ea3e...@v23g2000pro.googlegroups.com... > [David Wilson] >> The problem is simple: given one or more ordered sequences, return >> only the objects that appear in each sequence, without reading the >> whole set into memory. Th

Re: unsuccessful post request hangs, what gives?

2009-06-15 Thread Ken Seehart
Travis Altman wrote: i'm trying to use a post request to authenticate to a web application. let's say username = alice is valid but username = bob does not exits. making the request with alice works like a charm but when i try username = bob it hangs? any suggestions? Can you show us the re

Re: Perl's @foo[3,7,1,-1] ?

2009-06-15 Thread J. Cliff Dyer
On Sun, 2009-06-14 at 23:01 +1000, Steven D'Aprano wrote: > Write a helper function: > > def getitems(L, *indexes): > if len(indexes) == 1: > indexes = indexes[0] > return [L[i] for i in indexes] > Whoops! Your example is broken: >>> cars = ['Ford', 'Toyota', 'Edsel'] >>> getit

ImageEnhance.Contrast - is this fishy or what?

2009-06-15 Thread roop
I was browsing ImageEnhace.py, and found something that I thought was odd in class Contrast: class Contrast(_Enhance): "Adjust image contrast" def __init__(self, image): self.image = image mean = reduce(lambda a,b: a+b, image.convert("L").histogram())/ 256.0 self.de

Re: persistent composites

2009-06-15 Thread Aahz
In article <79mtt7f1r480...@mid.uni-berlin.de>, Diez B. Roggisch wrote: >Aaron Brady wrote: >> >> Some time ago, I recommended a pursuit of keeping 'persistent >> composite' types on disk, to be read and updated at other times by >> other processes. Databases provide this functionality, with the

Re: how to get the path of a module (myself) ?

2009-06-15 Thread jh
Stef Mientki gmail.com> writes: > I don't seem to have pkg_utils, > only pkgutil, which doesn't have an apropiate function. > > But I found another way, don't know if that's reliable: > import inspect > print inspect.currentframe().f_code.co_filenameE Eeek. > head -999 foo/* ==> foo/__init__.py

cross platform method Re: How to get the total size of a local hard disk?

2009-06-15 Thread Tim Harig
On 2009-06-15, Tim Golden wrote: > These kind of things tend to be fairly platform specific. There is however a way to do it in a cross platform manner which will return an appoximation of the available space. 1. delete all of the files (and folders) on the partition that you want to te

Re: weakrefs, threads,, and object ids

2009-06-15 Thread Aahz
In article <84397edd-4830-4c90-9fb6-f72c74028...@i28g2000prd.googlegroups.com>, Jeremy wrote: > >While guaranteed unique for simultaneously existing objects, how often >will an object assume an ID previously held by former object? Given >that the ID is a memory address in Python's heap, I assume

ANN: openopt 0.24 - free numerical optimization framework

2009-06-15 Thread dmitrey
Hi all, OpenOpt 0.24, a free Python-written numerical optimization framework with some own solvers and connections to tens of 3rd party ones, has been released. BSD license allows to use it in both free opensource and commercial closed-code software. Currently we have ~80 unique visitors daily, 1

Re: matplotlib installation

2009-06-15 Thread Ross Ridge
David Cournapeau wrote: > Basically, there are some functions which are erroneously "declared" > in the .lib, but they don't actually exist in the MS C runtime. Lawrence D'Oliveiro wrote: > Isn't this a MinGW bug? No, MinGW runtime library isn't supposed to be fully compatible with the Microsof

Re: Programming language comparison examples?

2009-06-15 Thread Juergen Hermann
pobox.com> writes: > but that's not what I was thinking of. I thought there was a site with a > bunch of smaller examples. http://langref.org/ is another one. -- http://mail.python.org/mailman/listinfo/python-list

Re: install Python-2.4.4 from source (parallel to existing Python-2.6)

2009-06-15 Thread S. Dornseifer
Simon wrote: Christian Heimes wrote: Simon schrieb: Christian Heimes wrote: Simon wrote: I installed Python-2.4.4.tar.bz2 from python.org, using gcc-4.3 (within openSUSE 11.1 x86_64) via 'make altinstall'. First, I tried to configure with the following flags: --prefix=/opt/python-24 --enabl

Re: Multi-Threading and KeyboardInterrupt

2009-06-15 Thread Mike Kazantsev
On Mon, 15 Jun 2009 05:37:14 -0700 (PDT) OdarR wrote: > On 13 juin, 07:25, Mike Kazantsev wrote: > > There was quite interesting explaination of what happens when you send > > ^C with threads, posted on concurrency-sig list recently: > > > >  http://blip.tv/file/2232410 > >  http://www.dabeaz.co

Re: persistent composites

2009-06-15 Thread Aaron Brady
On Jun 15, 5:45 am, "Diez B. Roggisch" wrote: > Aaron Brady wrote: > > Hi, please forgive the multi-posting on this general topic. > > > Some time ago, I recommended a pursuit of keeping 'persistent > > composite' types on disk, to be read and updated at other times by > > other processes.  Databa

Re: persistent composites

2009-06-15 Thread Aaron Brady
On Jun 14, 10:18 am, Jaime Fernandez del Rio wrote: > On Sun, Jun 14, 2009 at 4:27 PM, Aaron Brady wrote: > > > Before I go and flesh out the entire interfaces for the provided > > types, does anyone have a use for it? > > A real-world application of persistent data structures can be found here: >

Re: parsing json using simplejson

2009-06-15 Thread Mike Kazantsev
On Sun, 14 Jun 2009 22:45:38 -0700 (PDT) deostroll wrote: > I need to be able to parse a json data object using the simplejson > package. First of all I need to know all the task needed for this job. Note that py2.6 has a bundled json module. -- Mike Kazantsev // fraggod.net signature.asc De

Re: Question about None

2009-06-15 Thread Aaron Brady
On Jun 14, 9:50 pm, Steven D'Aprano wrote: > On Sun, 14 Jun 2009 19:14:10 -0400, Terry Reedy wrote: > > Steven D'Aprano wrote: > > >> So-called "vacuous truth". It's often useful to have all([]) return > >> true, but it's not *always* useful -- there are reasonable cases where > >> the opposite be

Re: persistent composites

2009-06-15 Thread Aaron Brady
On Jun 15, 8:37 am, a...@pythoncraft.com (Aahz) wrote: > In article <79mtt7f1r480...@mid.uni-berlin.de>, > Diez B. Roggisch wrote: > > >Aaron Brady wrote: > > >> Some time ago, I recommended a pursuit of keeping 'persistent > >> composite' types on disk, to be read and updated at other times by >

Re: Good books in computer science?

2009-06-15 Thread dads
I remember someone earlier in the thread mentioning reading source code from good coders. I've been wanting to give this a go as it makes perfect sense, I suppose the standard library would be a good start. What would your recommendations be, something not too too hard, so I don't understand. -- h

Re: twisted server

2009-06-15 Thread Jean-Paul Calderone
On Mon, 15 Jun 2009 10:02:54 -0700 (PDT), Mikie wrote: I am setting up a simple twisted server looks like this [snip] I would like to have an image loaded in the html page, but when I use the port is inserted and the image will not load. Is there a way to load the image? This isn't a good

Limit (max) connections SimpleHTTPServer

2009-06-15 Thread Daniel
Hello, I would like to know if there is some way to limit the maximum number of connections to my SimpleHTTPServer. I have built a system that sends out work from one box to worker boxes and am using SimpleHTTPServer to send the work. The files are very large (sometimes as much as 20-30MB). Whe

catch/block assertion pop-up?

2009-06-15 Thread Christoffer Hulusjo
Hi. I'm using a 32bit Python module to control a graphics application (Eyeon Fusion), that the developer of the application has released to allow python scripting. The module is known to have a bunch of bugs and the company that made it tells me that there is not a scheduled update anytime so

Re: Limit (max) connections SimpleHTTPServer

2009-06-15 Thread Jean-Paul Calderone
On Mon, 15 Jun 2009 12:14:28 -0700 (PDT), Daniel wrote: Hello, I would like to know if there is some way to limit the maximum number of connections to my SimpleHTTPServer. I have built a system that sends out work from one box to worker boxes and am using SimpleHTTPServer to send the work. T

Re: waling a directory with very many files

2009-06-15 Thread Terry Reedy
Christian Heimes wrote: Terry Reedy wrote: You did not specify version. In Python3, os.walk has become a generater function. So, to answer your question, use 3.1. I'm sorry to inform you that Python 3.x still returns a list, not a generator. >>> type(os.walk('.')) However, it is a genera

Re: Multi-Threading and KeyboardInterrupt

2009-06-15 Thread Matt
I'm going to use the multipocessing library from here forward so I can take advantage of multiple cores and clusters. Either one should work for my use, since in my non-demonstration code each thread spends most of it's time waiting for a separate non-Python subprocess (created with subproc

Re: Question about None

2009-06-15 Thread Terry Reedy
Steven D'Aprano wrote: On Sun, 14 Jun 2009 19:14:10 -0400, Terry Reedy wrote: Steven D'Aprano wrote: So-called "vacuous truth". It's often useful to have all([]) return true, but it's not *always* useful -- there are reasonable cases where the opposite behaviour would be useful: [...] It see

Re: python-2.6.2 Exception: TypeError: "'NoneType' object is not callable" in ignored

2009-06-15 Thread Terry Reedy
John Machin wrote: On Jun 15, 9:49 am, Terry Reedy wrote: Poor Yorick wrote: The following code produces an error (python-2.6.2). You forgot to post the error traceback. The exception was IGNORED ... so no traceback. Yes, I forgot that Exception TypeError: "'NoneType' object is not callab

Re: Good books in computer science?

2009-06-15 Thread Terry Reedy
Phil Runciman wrote: Gain access to one of the IEEE or ACM web sites and their resources. I used to sneak into my local university library before the 'Net to read this stuff. Beyond that I check up on the reading lists for CS students from time to time. This often throws up real gems and preven

Re: itertools.intersect?

2009-06-15 Thread Arnaud Delobelle
"Andrew Henshaw" writes: > "Raymond Hettinger" wrote in message > news:fb1feeeb-c430-4ca7-9e76-fea02ea3e...@v23g2000pro.googlegroups.com... >> [David Wilson] >>> The problem is simple: given one or more ordered sequences, return >>> only the objects that appear in each sequence, without reading

Re: Good books in computer science?

2009-06-15 Thread Terry Reedy
A classic that I found valuable is Science of Programming David Gries, 1981 http://www.amazon.com/gp/product/0387964800 It is still in print as a paperback. Several ssed copies are $11 shipped to US - a bargain. Gries is a died-in-the-wool iterationist. His cursory discussion of recursion is not

Re: ImageEnhance.Contrast - is this fishy or what?

2009-06-15 Thread Scott David Daniels
roop wrote: I was browsing ImageEnhace.py, and found something that I thought was odd in class Contrast: class Contrast(_Enhance): "Adjust image contrast" def __init__(self, image): self.image = image mean = reduce(lambda a,b: a+b, image.convert("L").histogram())/ 256.0

Re: waling a directory with very many files

2009-06-15 Thread Nick Craig-Wood
Jean-Paul Calderone wrote: > On Mon, 15 Jun 2009 09:29:33 -0500, Nick Craig-Wood > wrote: > >Hrvoje Niksic wrote: > >> Nick Craig-Wood writes: > >> > >> > Here is a ctypes generator listdir for unix-like OSes. > >> > >> ctypes code scares me with its duplication of the contents of system >

parsing json using simplejson

2009-06-15 Thread deostroll
I need to be able to parse a json data object using the simplejson package. First of all I need to know all the task needed for this job. --deostroll -- http://mail.python.org/mailman/listinfo/python-list

efficient undo/redo in pyqt

2009-06-15 Thread CoolGenie
Hello, I'm writing a small component for drawing, in PyQt4. Currently I'm implementing undo/redo through Qt's framework. I create a list which contains points, lines, etc. which appear as the user draws on the screen. On every paint event the list is read, processed and drawn. This way doing is jus

Re: : an integer is required

2009-06-15 Thread Ulrich Eckhardt
jeni wrote: [ ..large backtrace.. ] For your own sake and that of your readers, try next time to reduce the code that causes the problems to a minimal example. This prevents people from guessing or simply ignoring your problems. > /home/Activities/Kremala.activity/Kremala.py in insert_text_file >

Re: Good books in computer science?

2009-06-15 Thread member thudfoo
On 6/15/09, Terry Reedy wrote: > Phil Runciman wrote: > > > > > Gain access to one of the IEEE or ACM web sites and their resources. > > I used to sneak into my local university library before the 'Net to > > read this stuff. > > > > Beyond that I check up on the reading lists for CS students from

Re: waling a directory with very many files

2009-06-15 Thread Mike Kazantsev
On Mon, 15 Jun 2009 15:35:04 -0400 Terry Reedy wrote: > Christian Heimes wrote: > > Terry Reedy wrote: > >> You did not specify version. In Python3, os.walk has become a generater > >> function. So, to answer your question, use 3.1. > > > > I'm sorry to inform you that Python 3.x still returns

Build problem on Solaris 9

2009-06-15 Thread kai
Hi All, When I run make after successively running ./configure, I got the following Error message: ./Parser/asdl_c.py -c ./Python ./Parser/Python.asdl /usr/bin/env: No such file or directory make: *** [Python/Python-ast.c] Error 127 /usr/bin/env deos exist Can anyone help me with this? Kai

Re: persistent composites

2009-06-15 Thread Aaron Brady
On Jun 15, 11:10 am, Paul Rubin wrote: > Aaron Brady writes: > > > A real-world application of persistent data structures can be found here: > > >http://stevekrenzel.com/persistent-list > > > Jaime, thanks for the link.  I contacted its author. > > You might also loo

Re: TypeError: int argument required

2009-06-15 Thread Lawrence D'Oliveiro
In message , Rhodri James wrote: > On Mon, 15 Jun 2009 01:33:50 +0100, Lawrence D'Oliveiro > wrote: > >> Perl allows just about any printable character as a quote. I tried >> alternative quotes for many years, and decided making that choice was a >> waste of brain cells. >> >> So no, using alte

Re: Observer implementations

2009-06-15 Thread Carl Banks
On Jun 15, 5:22 pm, Tobias Weber wrote: > In article , >  Gerhard Häring wrote: > > > Implement it in your classes? > > No time to reinvent the wheel Hmm, observer pattern seems to be one of those things simple enough that reimplementing the wheel might actually be less work than adapting a thir

How to get the total size of a local hard disk?

2009-06-15 Thread willgun
Hi,everyone! How to get the total size of a local hard disk? I mean total size,not free space. Thanks in advance! -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-15 Thread ISF (Computer Scientists without Frontiers, Italy)
Hello All, good readings can be found among free e-books too: I'd like to share with you feeds to following free directories http://feeds2.feedburner.com/E-booksDirectory http://www.freetechbooks.com/rss.php warmest regards, Aldo -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-15 Thread Graham Ashton
On 2009-06-14 06:38:32 +0100, koranthala said: The Pragmatic Programmer - Planning to buy, Refactoring: Improving the Design of Existing Code - again planning to buy, These are my top two recommendations for people who can already code a bit, but who want to get really really good. The first

On the property function

2009-06-15 Thread Virgil Stokes
Does anyone have a good example (or examples) of when "property(...)" can be useful? Thank you, --V. Stokes -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-15 Thread Paul Rubin
Roy Smith writes: > In the same vein, Death March, by Ed Yourdon. I've been wanting to read "Antipatterns". -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-15 Thread Paul Rubin
Roy Smith writes: > > I've been wanting to read "Antipatterns". > > I didn't think that was so great. It had a lot of hype, which lead to be > believe it would be something wonderful, but I wasn't so impressed. Hmm, good to know. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-15 Thread james
this mit course in the open courseware catalog is focused specifically on python: http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2007/Syllabus/index.htm Quoting Terry Reedy : Phil Runciman wrote: Gain access to one of the IEEE or ACM web sites and their reso

Re: Good books in computer science?

2009-06-15 Thread Paul Rubin
dads writes: > I'm wanting to purchase some of the titles that have been raised in > this thread. When I look they are very expensive books which is > understandable. Do you think getting earlier editions that are cheaper > is a daft thing or should I fork out the extra £10-£30 to get the > latest

Re: persistent composites

2009-06-15 Thread Paul Rubin
Aaron Brady writes: > > A real-world application of persistent data structures can be found here: > > http://stevekrenzel.com/persistent-list > > Jaime, thanks for the link. I contacted its author. You might also look at www.couchdb.org . -- http://mail.python.org/mailman/listinfo/python-list

Please advise me for a right solution

2009-06-15 Thread VP
Hi all, Please advise me for a right solution based on your experience. I need to create a web based inventory tool with specific requirements such as: * More then one group is going to use it. * Authentication and authorization system based on user and group privileges. For example based on a g

Re: OT: Periodic table gets a new element

2009-06-15 Thread Lawrence D'Oliveiro
So, is this only accessible with Python 3.x, or will it be backported to 2.x as well? -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-15 Thread Lawrence D'Oliveiro
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 many bugs either… I thought Vivaldi did more. The style of music was such that they co

Re: Good books in computer science?

2009-06-15 Thread koranthala
> There are huge numbers (millions?) of lousy programmers who program every > single day and never become good programmers. I think I can attest to that. I was a programmer (in a low level language) in a huge MNC code monkey shop for > 7 years. I consider myself to be Ok - not great, but not very

Re: Good books in computer science?

2009-06-15 Thread Roy Smith
In article , "Rhodri James" wrote: > The Mythical Man-Month (Brooks) is a must. What's amazing about this book is just how relevant it is today, 35 years after it was written. Some of the technical details have changed (how many of us still keep our project notes on microfiche?), but cross o

left brain and right brain permutations

2009-06-15 Thread pataphor
left brain: Generate permutations by index, see previous newsgroup posts. Code not now available here. They are very pragmatic and practical, can start right away, and can be efficiently spread over many independent computing cores. right brain: from itertools import izip, chain from math

Re: python-2.6.2 Exception: TypeError: "'NoneType' object is not callable" in ignored

2009-06-15 Thread John Machin
On Jun 16, 6:06 am, Terry Reedy wrote: > John Machin wrote: > > On Jun 15, 9:49 am, Terry Reedy wrote: > >> Poor Yorick wrote: > >>> The following code produces an error (python-2.6.2). > >> You forgot to post the error traceback. > > > The exception was IGNORED ... so no traceback. > > Yes, I fo

python tutorial

2009-06-15 Thread steve
I was just looking at the python tutorial, and I noticed these lines: http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files "Windows makes a distinction between text and binary files; "the end-of-line characters in text files are automatically altered "slightly when data is r

Re: parsing json using simplejson

2009-06-15 Thread deostroll
I want to be able to parse it into python objects. Any ideas? --deostroll -- http://mail.python.org/mailman/listinfo/python-list

Re: Observer implementations

2009-06-15 Thread I V
On Mon, 15 Jun 2009 15:29:34 +0200, Tobias Weber wrote: > Despite the confusion all those are useable, but I ran into the problem > that I can't register a @classmethod because weakref doesn't like them. What do you mean by weakref not liking class methods? This seems to work OK on python 2.6 cl

Re: python tutorial

2009-06-15 Thread Carl Banks
On Jun 15, 7:56 pm, "steve" wrote: > I was just looking at the python tutorial, and I noticed these lines: > > http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-... > > "Windows makes a distinction between text and binary files; > "the end-of-line characters in text files are au

Re: parsing json using simplejson

2009-06-15 Thread Carl Banks
On Jun 15, 8:01 pm, deostroll wrote: > I want to be able to parse it into python objects. Any ideas? 1. If applicable, pay better attention in class. 2. Install simplejson and try to use it, then, if you still need help, come back and post your question along with your honest attempt to do it. P

Re: : an integer is required

2009-06-15 Thread Dave Angel
Ulrich Eckhardt wrote: open() doesn't take a string as second parameter, see 'help(open)'. Instead, it takes one of the integers which are defined as symbols in the os module, see 'dir(os)'. Where'd you get that misinformation? The second parameter to the builtin function open() is a strin

Label (or other widget) auto refresh?

2009-06-15 Thread Matias Hernandez Arellano
Hi list... I have a question for you.. First... sorry for my english, but i speak spanish xD.. I have a little GUI made with Glade and GtkBuilder... in his gui when i click on a button i show a dialog window.. in this dialog i put a label.. this label show some value.. this value was reading from s

Re: On the property function

2009-06-15 Thread Chris Rebert
On Mon, Jun 15, 2009 at 5:43 AM, Virgil Stokes wrote: > Does anyone have a good example (or examples) of when "property(...)" can be > useful? Erm, when you want to create a property (i.e. computed attribute). from __future__ import division class TimeDelta(object): def __init__(self, secs):

RE: Good books in computer science?

2009-06-15 Thread Phil Runciman
FWIW I actually dislike this book! Gasp... Much of the material is excellent but IBM got into the huge mess with the 360. Brooks observed failure from the inside and IMHO did a great job of it. Project managers can never rescue stuffed concepts especially if a lot of money has been spent! Such

Re: python tutorial

2009-06-15 Thread Steven D'Aprano
On Mon, 15 Jun 2009 20:58:47 -0700, Carl Banks wrote: > On Jun 15, 7:56 pm, "steve" wrote: >> I was just looking at the python tutorial, and I noticed these lines: >> >> http://docs.python.org/tutorial/inputoutput.html#reading-and- writing-... >> >> "Windows makes a distinction between text and b

FW: Good books in computer science?

2009-06-15 Thread Phil Runciman
Oh dear the "latter" referred to VME/K but got lost in my editing. Sorry about that. Phil > -Original Message- > From: Phil Runciman > Sent: Tuesday, 16 June 2009 4:26 p.m. > To: python-list@python.org > Subject: RE: Good books in computer science? > > FWIW I actually dislike this book!

Re: parsing json using simplejson

2009-06-15 Thread Mike Kazantsev
On Mon, 15 Jun 2009 20:01:58 -0700 (PDT) deostroll wrote: > I want to be able to parse it into python objects. Any ideas? JSON objects behave like python dicts (key:val pairs), so why not just use them? Both simplejson and py2.6-json (which is quite similar to the former) do just that, but if y

Re: Exceptions and Object Destruction (was: Problem with apsw and garbage collection)

2009-06-15 Thread Lawrence D'Oliveiro
In message , Piet van Oostrum wrote: > The exact time of the destruction of objects is an implementation detail > and should not be relied upon. That may be true in Java and other corporate-herd-oriented languages, but we know that dynamic languages like Perl and Python make heavy use of refere

Error in reg dll

2009-06-15 Thread Girish
Hello. I am not able to register DLL generated from py2exe I have written following code to generate the DLL: ## from distutils.core import setup import py2exe import sys # If run without args, build executables, in

Re: Multi-Threading and KeyboardInterrupt

2009-06-15 Thread Mike Kazantsev
On Mon, 15 Jun 2009 15:43:13 -0400 Matt wrote: > I'm going to use the multipocessing library from here forward so I can > take advantage of multiple cores and clusters. Either one should work > for my use, since in my non-demonstration code each thread spends most > of it's time waiting for

Re: python tutorial

2009-06-15 Thread Dave Angel
steve wrote: I was just looking at the python tutorial, and I noticed these lines: http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files "Windows makes a distinction between text and binary files; "the end-of-line characters in text files are automatically altered "slightly

  1   2   >