Re: developing web spider

2008-04-02 Thread Stefan Scholl
abeen <[EMAIL PROTECTED]> wrote: > I would want to know which could be the best programming language for > developing web spider. Since you ask in comp.lang.python: I'd suggest APL -- Web (en): http://www.no-spoon.de/ -*- Web (de): http://www.frell.de/ -- http://mail.python.org/mailman/listinf

Re: the scaling of pics in pygame

2008-04-02 Thread Ramsey Nasser
Isn't PIL best suited for things like this? The resize function should do what you're looking for: http://www.pythonware.com/library/pil/handbook/image.htm On Wed, Apr 2, 2008 at 6:59 AM, <[EMAIL PROTECTED]> wrote: > On Apr 1, 9:44 pm, Jimmy <[EMAIL PROTECTED]> wrote: > > Hi, everyone > > > >

Re: bsddb3 thread problem

2008-04-02 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Using threads with bsddb3.  I spent weeks trying to get it to behave > > when threading.  I gave up in the end and changed to sqlite :-( > > > So does it mean that I will have to use threading locks around access > methods? or that will also fai

IM status with appscript

2008-04-02 Thread Oolon Colluphid
hi, i need access to application attributes of IM (like Adium, aMsn, MS Messenger) on Mac platform via appscript module. once instantiated the application object with: app=app("Adium") i don't know how recover information like status, and i have find no references. can someone help me? -- http://m

Re: Why prefer != over <> for Python 3.0?

2008-04-02 Thread Hendrik van Rooyen
John J. Lee wrote: >How did programmers manage back then in 32k? Some of the answers, in no particular sequence, are: Tight, small operating systems that did the minimum. Assembler. Sequential Processing: - small tasks with multiple passes on tape ( like the concept of Unix pipes ) Overlay

Re: IM status with appscript

2008-04-02 Thread Diez B. Roggisch
Oolon Colluphid wrote: > hi, > i need access to application attributes of IM (like Adium, aMsn, MS > Messenger) on Mac platform via appscript module. > once instantiated the application object with: app=app("Adium") > i don't know how recover information like status, and i have find no > reference

Rationale for read-only property of co_code

2008-04-02 Thread João Neves
Hello all, I've got this question that has been nagging me for a few days now. What are the reasons for us to have co_code as read-only? I've been trying to get some info about it, but I kept hitting the wall. Correct me if I'm wrong, but as far as I understand, co_code represents the compiled by

Re: the scaling of pics in pygame

2008-04-02 Thread alex23
On Apr 2, 12:44 pm, Jimmy <[EMAIL PROTECTED]> wrote: > I am using Pygame to write a small program. I tried to load a .jpg > picture into > the screen, however, the size of the pic doesn't fit into the window > properly. Can > anyone tell me how to scale the picture into the window? Have you tried

Re: Why prefer != over <> for Python 3.0?

2008-04-02 Thread Bob Martin
in 340625 20080402 094139 "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: >John J. Lee wrote: > >>How did programmers manage back then in 32k? > >Some of the answers, in no particular sequence, are: > >Tight, small operating systems that did the minim

plpythonu+postgrs anybody using it?

2008-04-02 Thread Martin Marcher
Hello, I just started on working with a postgres project, the DB looks really bad and isn't normalized in any way... 4k Text messages representing a whole protocol which need to be transformed. Somehow it just doesn't seem right to put this stuff directly in the database and creating a bunch of st

Re: object-relational mappers

2008-04-02 Thread Bruno Desthuilliers
hdante a écrit : > On Apr 1, 5:40 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: >> I've been poking around the world of object-relational >> mappers and it inspired me to coin a corellary to the >> the famous quote on regular expressions: >> >> "You have objects and a database: that's 2 problems. >>

Re: object-relational mappers

2008-04-02 Thread Bruno Desthuilliers
Aaron Watters a écrit : > I've been poking around the world of object-relational > mappers and it inspired me to coin a corellary to the > the famous quote on regular expressions: > > "You have objects and a database: that's 2 problems. > So: get an object-relational mapper: > now you have 2**3 pr

Re: Python-by-example - new online guide to Python Standard Library

2008-04-02 Thread GHUM
Tobu, I like this idea. Deducting from an example is really another way to wisdom. What struck me as most diffuclt to understand: abs(-5.5) - 5.5 -> you are using "-" as symbol for "will give the result", which is really, really hard to parse. Take something else, please. Unicode has THAT many

Re: Prototype OO

2008-04-02 Thread sam
Bruno Desthuilliers napisał(a): > Sam, seriously, why don't start with *learning* about Python's object > model ? Seriously ? Not that it's "perfect", not that you have to like > it Ok -- thank you for your time and your strong opinions about current solutions. -- http://mail.pyt

Re: Where can I find :

2008-04-02 Thread lbonafide
On Mar 31, 11:07 am, Laurent Pointal <[EMAIL PROTECTED]> wrote: > You may look at "Dive into Python", there is an online version, > translation in some languages other than english (if needed). It propose > a line by line explanation on many scripts targetting language and > libraries usage. > > h

splitting an XML file on the basis on basis of XML tags

2008-04-02 Thread bijeshn
Hi all, i have an XML file with the following structure:: -| | | . | . | > constitutes one record. . | . | . | | | | . . .---| . | .

Re: Where can I find :

2008-04-02 Thread lbonafide
On Mar 30, 1:22 am, [EMAIL PROTECTED] wrote: > > That's weird. I feel like I could go on about an introductory program > for days and days, la. > > I usually start (both times) with interpreted vs. compiled. It's a > layer of abstraction. But it's very weird; the layers can't tell > either of ea

Re: Prototype OO

2008-04-02 Thread sam
Gabriel Genellina napisał(a): 1. You have different syntax for named and unnamed (lambdas) functions. Functions and methods are different things in Python even if they have same syntax. But all these are still a pieces of code that you use repeatedly to make some task. >>>

Self-referencing decorator function parameters

2008-04-02 Thread Thomas Dimson
Hello, Originally I posted this as a bug but it was shot down pretty quickly. I am still mildly curious about this as I'm missing a bit of understanding of Python here. Why is it that the following code snippet: def decorator( call ): def inner(func): def application( *args, **kwargs

Re: splitting an XML file on the basis on basis of XML tags

2008-04-02 Thread Chris
[EMAIL PROTECTED] wrote: > Hi all, > > i have an XML file with the following structure:: > > > -| > | > | > . | > . | > constitutes one record. > . | > . | > . | > | > | > | > > . > .

Re: IM status with appscript

2008-04-02 Thread has
On 2 Apr, 10:40, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Oolon Colluphid wrote: > > hi, > > i need access to application attributes of IM (like Adium, aMsn, MS > > Messenger) on Mac platform via appscript module. > > once instantiated the application object with: app=app("Adium") > > i don'

Re: Python-by-example - new online guide to Python Standard Library

2008-04-02 Thread tatu . kairi
On Apr 2, 2:43 pm, GHUM <[EMAIL PROTECTED]> wrote: > Tobu, > > I like this idea. Deducting from an example is really another way to > wisdom. > > What struck me as most diffuclt to understand: > > abs(-5.5) - 5.5 > > -> you are using "-" as symbol for "will give the result", which is > really, real

Re: Adding Images to MySQL

2008-04-02 Thread Victor Subervi
I have tried the following code: #!/usr/local/bin/python import _mysql import MySQLdb host = 'mysqldb2.ehost-services.com' user = 'user' passwd = 'pass' db = 'bre' print 'Content-Type: image/jpeg\r\n' print '\nHi!\n' db=MySQLdb.connect(host=host, user=user, passwd=passwd, db=db) c=db.cursor() imgf

Nested try...except

2008-04-02 Thread Magnus . Moraberg
Hi, I found the following code on the net - http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200509.mbox/[EMAIL PROTECTED] def count(self): -db = sqlite.connect(self.filename, isolation_level=ISOLATION_LEVEL) -try: -try: -cur

Re: Python in High School

2008-04-02 Thread Gabriel Rossetti
sprad wrote: > I'm a high school computer teacher, and I'm starting a series of > programming courses next year (disguised as "game development" classes > to capture more interest). The first year will be a gentle > introduction to programming, leading to two more years of advanced > topics. > > I

Re: Nested try...except

2008-04-02 Thread cokofreedom
On Apr 2, 3:06 pm, [EMAIL PROTECTED] wrote: > Hi, > > I found the following code on the net - > > http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200509.mbox/[EMAIL > PROTECTED] > > def count(self): > -db = sqlite.connect(self.filename, > isolation_level=ISOLATION_LEVEL) > -

Re: Nested try...except

2008-04-02 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Hi, > > I found the following code on the net - > > http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200509.mbox/% > [EMAIL PROTECTED] > > def count(self): > -db = sqlite.connect(self.filename, > isolation_level=ISOLATION_LEVEL) > -tr

Re: Nested try...except

2008-04-02 Thread Magnus . Moraberg
On 2 Apr, 15:12, [EMAIL PROTECTED] wrote: > On Apr 2, 3:06 pm, [EMAIL PROTECTED] wrote: > > > > > Hi, > > > I found the following code on the net - > > > http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200509.mbox/[EMAIL > > PROTECTED] > > > def count(self): > > -db = sqlite.

Re: Homework help

2008-04-02 Thread David C. Ullrich
On Tue, 1 Apr 2008 09:11:12 -0700 (PDT), [EMAIL PROTECTED] wrote: >Hey guys >I haev this homework assignment due today >I don't necessarily want the answers, but need help on how to approach >it/the steps i need to solve the problems I can see at least two possible approaches: Approach 1: (i)

who said python can't be obsfucated!?

2008-04-02 Thread cokofreedom
def s(c):return[]if c==[]else s([_ for _ in c[1:]if _=c[0]]) Anyone else got some wonders...? -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested try...except

2008-04-02 Thread Magnus . Moraberg
On 2 Apr, 15:15, [EMAIL PROTECTED] wrote: > On 2 Apr, 15:12, [EMAIL PROTECTED] wrote: > > > > > On Apr 2, 3:06 pm, [EMAIL PROTECTED] wrote: > > > > Hi, > > > > I found the following code on the net - > > > > http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200509.mbox/[EMAIL > > > PROTECT

ThreadingTCPServer: sock.recv() doesn't block?

2008-04-02 Thread Prepscius, Colin (IT)
So I'm using the ThreadingTCPServer from the python standard library SocketServer, and calling serve_forever on it. In my handler's handle method, I call self.request.recv(x) in a loop until I've received n bytes. But recv() returns immediately with nothing, over and over. It all still works, bu

Re: object-relational mappers

2008-04-02 Thread hdante
On Apr 2, 8:25 am, Bruno Desthuilliers wrote: > hdante a écrit : > > > > > > Try Rails' ActiveRecord. Your problems should reduce to (lg lg > > 2)^(1/12). > > Correct me if I'm wrong, but IIRC ActiveRecord requires you use numeric > auto_increment fields for primary key. As far as I'm concerned,

Re: Prototype OO

2008-04-02 Thread Bruno Desthuilliers
sam a écrit : > Bruno Desthuilliers napisał(a): > > >> Sam, seriously, why don't start with *learning* about Python's object >> model ? Seriously ? Not that it's "perfect", not that you have to like it > > Ok -- thank you for your time and your strong opinions about current > solutions. Don't

april fools email backfires

2008-04-02 Thread Aaron Watters
Grapevine says that an architect/bigot at a java/spring shop sent out an April Fools email saying they had decided to port everything to Django ASAP. Of course the email was taken seriously and he got a lot of positive feedback from line developers and savvy users/managers that they thought it wou

Re: generator functions: why won't this work?

2008-04-02 Thread zillow10
On Apr 2, 4:42 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 01 Apr 2008 23:56:50 -0300, <[EMAIL PROTECTED]> escribió: > > > I'm trying to understand generator functions and the yield keyword. > > I'd like to understand why the following code isn't supposed to work. > > (What I would

Python queue madness

2008-04-02 Thread nnp
Hey guys, Basically I have a system where component 1, 2 and 3 communicate with each other using two Python Queues, we'll call them R and W. Here is what is happening 1 writes data to W and reads from R 2 reads data from W and writes data it receives from 3 to R (but not data it receives from 1)

Re: object-relational mappers

2008-04-02 Thread Aaron Watters
> Try Rails' ActiveRecord. Your problems should reduce to (lg lg > 2)^(1/12). python> (log(log(2)))**(1.0/12.0) Traceback (most recent call last): File "", line 1, in ? ValueError: negative number cannot be raised to a fractional power So you are saying the problems will get really complex? :

Re: Python-by-example - new online guide to Python Standard Library

2008-04-02 Thread sjf
Indeed, the first thing I saw on the front page was "math.sqrt(9) - 3.0". Ok, I thought, random arithmetic expression, so what? There is already a standard way of showing a piece of code and its results. It's the interactive prompt: >>> import math >>> math.sqrt(9) 3.0 >>> Tada! On Apr 2, 12:43

Re: Python-by-example - new online guide to Python Standard Library

2008-04-02 Thread Panzerlurch
Why don't use the normal Python shell syntax as used by doctest? >>> abs(-5.5) 5.5 That would be much more readable. -- http://mail.python.org/mailman/listinfo/python-list

Re: developing web spider

2008-04-02 Thread zillow10
On Apr 2, 6:37 am, abeen <[EMAIL PROTECTED]> wrote: > Hello, > > I would want to know which could be the best programming language for > developing web spider. > More information about the spider, much better,, > > thanks > > http://www.imavista.com Just saw this while passing by... There's a nice

Re: developing web spider

2008-04-02 Thread zillow10
On Apr 2, 2:54 pm, [EMAIL PROTECTED] wrote: > On Apr 2, 6:37 am, abeen <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I would want to know which could be the best programming language for > > developing web spider. > > More information about the spider, much better,, > > > thanks > > >http://www.ima

Re: object-relational mappers

2008-04-02 Thread hdante
On Apr 2, 10:50 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > > Try Rails' ActiveRecord. Your problems should reduce to (lg lg > > 2)^(1/12). > > python> (log(log(2)))**(1.0/12.0) > Traceback (most recent call last): > File "", line 1, in ? > ValueError: negative number cannot be raised to a fr

Re: generator functions: why won't this work?

2008-04-02 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Apr 2, 4:42 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >> En Tue, 01 Apr 2008 23:56:50 -0300, <[EMAIL PROTECTED]> escribió: >> >>> I'm trying to understand generator functions and the yield keyword. >>> I'd like to understand why the following code isn't suppos

wsdl (soap) without code generation

2008-04-02 Thread Thomas Guettler
Hi, I looked for a solution to talk to a web service which offers its signature with a wsdl file. I googled for 'wsdl python' and found ZSI. This project uses code generation. That's something I don't like. The book 'dive into python' uses SOAPpy. This looks better since it does not generate so

Re: developing web spider

2008-04-02 Thread Pete Wright
The O'Reilly Spidering Hacks book is also really good, albeit a little too focussed on Perl. On Apr 2, 9:54 am, [EMAIL PROTECTED] wrote: > On Apr 2, 6:37 am, abeen <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I would want to know which could be the best programming language for > > developing we

Re: xlrd and cPickle.dump

2008-04-02 Thread patrick . waldo
Still no luck: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework \scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\text analysis\pickle_test2.py", line 13, in ? cPickle.dump(Data_sheet, pickle_file, -1)

Re: Self-referencing decorator function parameters

2008-04-02 Thread George Sakkis
On Apr 2, 8:30 am, Thomas Dimson <[EMAIL PROTECTED]> wrote: > Hello, > > Originally I posted this as a bug but it was shot down pretty quickly. > I am still mildly curious about this as I'm missing a bit of > understanding of Python here. Why is it that the following code > snippet: > > def decora

Re: Prototype OO

2008-04-02 Thread sam
Bruno Desthuilliers napisał(a): > Don't misunderstand me : I'm not saying that class-based is better (or > worse) than prototype, I'm not saying that Python is perfect, I'm not > saying that your points are not worth any consideration, I'm just saying > that, from your arguments, I have the ver

Re: generator functions: why won't this work?

2008-04-02 Thread Mel
[EMAIL PROTECTED] wrote: I'd just like to test my > understanding of this. Suppose I create the following generator > object: > > g = getNextScalar(1, 2, (3, 4), 5) > > when the iterator reaches the tuple argument (3, 4) then, according to > Steve and George, the * in *arg causes this tuple to be

Manipulate Large Binary Files

2008-04-02 Thread Derek Tracy
I am trying to write a script that reads in a large binary file (over 2Gb) saves the header file (169088 bytes) into one file then take the rest of the data and dump it into anther file. I generated code that works wonderfully for files under 2Gb in size but the majority of the files I am dealing

Re: april fools email backfires

2008-04-02 Thread Paul McGuire
On Apr 2, 8:36 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > Grapevine says that an architect/bigot at a java/spring > shop sent out an April Fools email saying they had > decided to port everything to Django ASAP. > > Of course the email was taken seriously and he > got a lot of positive feedback

Re: Self-referencing decorator function parameters

2008-04-02 Thread Thomas Dimson
On Apr 2, 10:31 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On Apr 2, 8:30 am, Thomas Dimson <[EMAIL PROTECTED]> wrote: > > > > > > > Hello, > > > Originally I posted this as a bug but it was shot down pretty quickly. > > I am still mildly curious about this as I'm missing a bit of > > understan

Re: who said python can't be obsfucated!?

2008-04-02 Thread Paddy
On Apr 2, 2:19 pm, [EMAIL PROTECTED] wrote: > def s(c):return[]if c==[]else s([_ for _ in c[1:]if _ +s([_ for _ in c[1:]if _>=c[0]]) > > Anyone else got some wonders...? Nope. -- http://mail.python.org/mailman/listinfo/python-list

Hello, everybody!

2008-04-02 Thread Dolphin.o0O...
C++ Java Python All of them are critical! -- Best regards. Yours sincerely, Dolphin.o0O... ~~ Dedicate in what you love so much! Dolphin.o0O ~~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Self-referencing decorator function parameters

2008-04-02 Thread castironpi
On Apr 2, 7:30 am, Thomas Dimson <[EMAIL PROTECTED]> wrote: > Hello, > > Originally I posted this as a bug but it was shot down pretty quickly. > I am still mildly curious about this as I'm missing a bit of > understanding of Python here. Why is it that the following code > snippet: > > def decorat

Re: Rationale for read-only property of co_code

2008-04-02 Thread castironpi
On Apr 2, 5:00 am, João Neves <[EMAIL PROTECTED]> wrote: > Hello all, > > I've got this question that has been nagging me for a few days now. > What are the reasons for us to have co_code as read-only? I've been > trying to get some info about it, but I kept hitting the wall. > > Correct me if I'm

Re: Self-referencing decorator function parameters

2008-04-02 Thread Erich
On Apr 2, 10:13 am, Thomas Dimson <[EMAIL PROTECTED]> wrote: > > I guess my real question is: why does wrapping the call to be > "call=lambda x: DecorateMe.callMe(x)" somehow fix the issue with this > temporary namespace? It seems strange to me that defining an > additional function (through lambda

Re: Manipulate Large Binary Files

2008-04-02 Thread Derek Martin
On Wed, Apr 02, 2008 at 10:59:57AM -0400, Derek Tracy wrote: > I generated code that works wonderfully for files under 2Gb in size > but the majority of the files I am dealing with are over the 2Gb > limit > > ary = array.array('H', INPUT.read()) You're trying to read the file all at once. You n

Re: developing web spider

2008-04-02 Thread John Nagle
abeen wrote: > Hello, > > I would want to know which could be the best programming language for > developing web spider. > More information about the spider, much better,, As someone who actually runs a Python based web spider in production, I should comment. You need a very robust parse

Re: wsdl (soap) without code generation

2008-04-02 Thread João Neves
On Apr 2, 3:06 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > I looked for a solution to talk to a web service which > offers its signature with a wsdl file. > > I googled for 'wsdl python' and found ZSI. > > This project uses code generation. That's something > I don't like. > > The book

Re: wsdl (soap) without code generation

2008-04-02 Thread sam
Thomas Guettler napisał(a): > I googled for 'wsdl python' and found ZSI. This is current solution, but it is quite new and actively developed, so newer versions are sometimes not compatibile with old ones. So if you use distribution provided packages (eg Debian) you can have troubles after sy

Re: Python-by-example - new online guide to Python Standard Library

2008-04-02 Thread ajaksu
On Apr 1, 10:15 pm, AK <[EMAIL PROTECTED]> wrote: > Hello, Hiya > I find that I learn easier when I go from specific examples to a more > general explanation of function's utility and I made a reference guide > that will eventually document all functions, classes and methods in > Python's Standard

Re: ThreadingTCPServer: sock.recv() doesn't block?

2008-04-02 Thread Steve Holden
Prepscius, Colin (IT) wrote: > So I'm using the ThreadingTCPServer from the python standard library > SocketServer, and calling serve_forever on it. In my handler's handle > method, I call self.request.recv(x) in a loop until I've received n > bytes. But recv() returns immediately with nothing

non-terminating regex match

2008-04-02 Thread Maurizio Vitale
Has to be something really stupid, but the following never finish (running Python 2.5.1 (r251:54863, Jan 10 2008, 18:00:49) [GCC 4.2.1 (SUSE Linux)] on linux2). The intention is to match C++ identifiers, with or without namespace qualification, with or without arguments (e.g. variables, function

class / module introspection?

2008-04-02 Thread Brian Munroe
I'm struggling with an architectural problem and could use some advice. I'm writing an application that will gather statuses from disparate systems. Because new systems show up all the time, I'm trying to design a plugin architecture that will allow people to contribute new backends by just dropp

Re: Manipulate Large Binary Files

2008-04-02 Thread Steve Holden
Derek Tracy wrote: > I am trying to write a script that reads in a large binary file (over > 2Gb) saves the header file (169088 bytes) into one file then take the > rest of the data and dump it into anther file. I generated code that > works wonderfully for files under 2Gb in size but the major

Re: april fools email backfires

2008-04-02 Thread Aaron Watters
On Apr 2, 11:07 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > > Can you post a link? > > -- Paul Sorry. It came from private email. And I don't want to get anyone in trouble... -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=secret+feature -- http://mail.python.or

Re: Rationale for read-only property of co_code

2008-04-02 Thread João Neves
On Apr 2, 4:35 pm, [EMAIL PROTECTED] wrote: > Are Python bytes codes Python byte codes? I'm not quite sure I understood your question, sorry. > Do you foresee any machine-dependent optimizations? In my personal case, I am not looking for optimizations in the generated bytecode. Let me give a ve

Re: Nested try...except

2008-04-02 Thread Nanjundi
On Apr 2, 9:22 am, [EMAIL PROTECTED] wrote: > On 2 Apr, 15:15, [EMAIL PROTECTED] wrote: > > > > > On 2 Apr, 15:12, [EMAIL PROTECTED] wrote: > > > > On Apr 2, 3:06 pm, [EMAIL PROTECTED] wrote: > > > > > Hi, > > > > > I found the following code on the net - > > > > > http://mail-archives.apache.org/m

Re: Rationale for read-only property of co_code

2008-04-02 Thread Diez B. Roggisch
> I'm not quite sure I understood your question, sorry. And you won't. He's one of the resident trolls... Better killfile him ASAP :) Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Rationale for read-only property of co_code

2008-04-02 Thread Dan Upton
> The thing I've been wondering is why _is_ it read-only? In what > circumstances having write access to co_code would break the language > or do some other nasty stuff? > > João Neves I can't speak to Python's implementation in particular, but self-modifying code in general is unpleasant. It

Re: Rationale for read-only property of co_code

2008-04-02 Thread castironpi
On Apr 2, 11:41 am, "Dan Upton" <[EMAIL PROTECTED]> wrote: > >  The thing I've been wondering is why _is_ it read-only? In what > >  circumstances having write access to co_code would break the language > >  or do some other nasty stuff? > > >  João Neves > > I can't speak to Python's implementatio

Re: Manipulate Large Binary Files

2008-04-02 Thread George Sakkis
On Apr 2, 11:50 am, Derek Martin <[EMAIL PROTECTED]> wrote: > On Wed, Apr 02, 2008 at 10:59:57AM -0400, Derek Tracy wrote: > > I generated code that works wonderfully for files under 2Gb in size > > but the majority of the files I am dealing with are over the 2Gb > > limit > > > ary = array.array('

Re: Python-by-example - new online guide to Python Standard Library

2008-04-02 Thread Terry Reedy
"AK" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] || I'll be glad to hear comments/suggestions/etc: | | http://www.lightbird.net/py-by-example/ Using - as the example/return delimiter does not work. If you do not want to substantially lengthen the document by going to >>> sqrt(9

Re: Python in High School

2008-04-02 Thread Jan Claeys
Op Tue, 01 Apr 2008 10:27:18 -0700, schreef sprad: > I'm a high school computer teacher, and I'm starting a series of > programming courses next year (disguised as "game development" classes > to capture more interest). The first year will be a gentle introduction > to programming, leading to two

Re: generator functions: why won't this work?

2008-04-02 Thread castironpi
On Apr 1, 10:42 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 01 Apr 2008 23:56:50 -0300, <[EMAIL PROTECTED]> escribió: > >    yield *iterable > > could be used as a shortcut for this: > >    for __temp in iterable: yield __temp How serious were you about that? -- http://mail.pytho

Re: object-relational mappers

2008-04-02 Thread castironpi
On Apr 2, 8:25 am, hdante <[EMAIL PROTECTED]> wrote: > On Apr 2, 8:25 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > > hdante a écrit : > > > >  Try Rails' ActiveRecord. Your problems should reduce to (lg lg > > > 2)^(1/12). > > > Correct me if I'm wrong, but IIRC ActiveRecord requires you

Re: april fools email backfires

2008-04-02 Thread Paul Rubin
Aaron Watters <[EMAIL PROTECTED]> writes: > Grapevine says that an architect/bigot at a java/spring shop sent > out an April Fools email saying they had decided to port everything > to Django ASAP. > > Of course the email was taken seriously and he got a lot of positive > feedback from line develo

py.test and test coverage analysis ?

2008-04-02 Thread j vickroy
Hello all, I am using py.test (http://codespeak.net/py/dist/test.html) to perform unit testing. I would like to include test coverage analysis using coverage.py (http://nedbatchelder.com/code/modules/coverage.html), but I do not know how to simultaneously apply the two tools in a single run.

Re: april fools email backfires

2008-04-02 Thread Grant Edwards
On 2008-04-02, Paul Rubin wrote: > Django, pah. They should switch to something REALLY advanced: > > http://www.coboloncogs.org/INDEX.HTM ROTFLMAO! That's absolutely brilliant! I particularly like the flashing effect that simulates an old screen-at-time mode terminal (or maybe a storage-scope

Re: april fools email backfires

2008-04-02 Thread George Sakkis
On Apr 2, 1:23 pm, Paul Rubin wrote: > Aaron Watters <[EMAIL PROTECTED]> writes: > > Grapevine says that an architect/bigot at a java/spring shop sent > > out an April Fools email saying they had decided to port everything > > to Django ASAP. > > > Of course the email was

Re: april fools email backfires

2008-04-02 Thread George Sakkis
On Apr 2, 1:29 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-04-02, Paul Rubin wrote: > > > Django, pah.  They should switch to something REALLY advanced: > > >http://www.coboloncogs.org/INDEX.HTM > > ROTFLMAO! > > That's absolutely brilliant!  I particularly like the flashing > effect th

Re: xlrd and cPickle.dump

2008-04-02 Thread Konstantin Veretennicov
On Wed, Apr 2, 2008 at 5:23 PM, <[EMAIL PROTECTED]> wrote: > Still no luck: > > Traceback (most recent call last): > File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework > \scriptutils.py", line 310, in RunScript >exec codeObject in __main__.__dict__ > File "C:\text analysis\pickle_

Re: Python-by-example - new online guide to Python Standard Library

2008-04-02 Thread AK
Terry Reedy wrote: > "AK" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > || I'll be glad to hear comments/suggestions/etc: > | > | http://www.lightbird.net/py-by-example/ > > Using - as the example/return delimiter does not work. > If you do not want to substantially lengthen

Understanding bmp image files

2008-04-02 Thread pranav
Hello, I want to read a BMP file, do some processing and then write it in a new file. The problem is in the third step. For reading the file, i have converted the file into decimal numbers, representing the pixel values. Then i perform calculations on those decimal numbers. Now i am unable to conve

Re: Manipulate Large Binary Files

2008-04-02 Thread James Tanis
"Derek Tracy" <[EMAIL PROTECTED]> wrote: > > INPUT = open(infile, 'rb') > header = FH.read(169088) > > ary = array.array('H', INPUT.read()) > > INPUT.close() > > OUTF1 = open(outfile1, 'wb') > OUTF1.write(header) > > OUTF2 = open(outfile2, 'wb') > ary.tofile(OUTF2) > > > When I try to use th

Re: who said python can't be obsfucated!?

2008-04-02 Thread Francesco Bochicchio
On Wed, 02 Apr 2008 07:19:08 -0700, cokofreedom wrote: > def s(c):return[]if c==[]else s([_ for _ in c[1:]if _ +s([_ for _ in c[1:]if _>=c[0]]) > > Anyone else got some wonders...? Not so good: it took me only one minute to anderstand that is a recursive sort ... or it is? I read it as: """ th

Re: april fools email backfires

2008-04-02 Thread [EMAIL PROTECTED]
On 2 avr, 19:23, Paul Rubin wrote: > Aaron Watters <[EMAIL PROTECTED]> writes: > > Grapevine says that an architect/bigot at a java/spring shop sent > > out an April Fools email saying they had decided to port everything > > to Django ASAP. > > > Of course the email was t

Re: Understanding bmp image files

2008-04-02 Thread Marc 'BlackJack' Rintsch
On Wed, 02 Apr 2008 10:51:39 -0700, pranav wrote: > I want to read a BMP file, do some processing and then write it in a > new file. The problem is in the third step. For reading the file, i > have converted the file into decimal numbers, representing the pixel > values. You have converted the da

Re: class / module introspection?

2008-04-02 Thread [EMAIL PROTECTED]
On 2 avr, 18:03, Brian Munroe <[EMAIL PROTECTED]> wrote: > I'm struggling with an architectural problem and could use some > advice. > > I'm writing an application that will gather statuses from disparate > systems. Because new systems show up all the time, I'm trying to > design a plugin architec

Re: Manipulate Large Binary Files

2008-04-02 Thread Derek Tracy
On Wed, Apr 2, 2008 at 10:59 AM, Derek Tracy <[EMAIL PROTECTED]> wrote: > I am trying to write a script that reads in a large binary file (over 2Gb) > saves the header file (169088 bytes) into one file then take the rest of the > data and dump it into anther file. I generated code that works won

Re: Understanding bmp image files

2008-04-02 Thread Paul McGuire
On Apr 2, 12:51 pm, pranav <[EMAIL PROTECTED]> wrote: > Hello, > I want to read a BMP file, do some processing and then write it in a > new file. The problem is in the third step. For reading the file, i > have converted the file into decimal numbers, representing the pixel > values. Then i perform

Re: python persistence

2008-04-02 Thread castironpi
On Apr 1, 3:21 pm, [EMAIL PROTECTED] wrote: > On Apr 1, 11:34 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > > > > > > En Tue, 01 Apr 2008 08:47:33 -0300, <[EMAIL PROTECTED]> escribió: > > > >> c['0']= type('None',(),{}) > > >> > Traceback (most recent call last): > > >> > pickle.Pic

Re: non-terminating regex match

2008-04-02 Thread Marc 'BlackJack' Rintsch
On Wed, 02 Apr 2008 16:01:59 +, Maurizio Vitale wrote: > And yes, I'm a total beginner when it comes to Python, but it seems > very strange to me that a regex match on a finite length string > doesn't terminate It does terminate, you just don't wait long enough. Try it with fewer characters

Hyphenation: PyHyphen-0.7 released

2008-04-02 Thread Dr. leo
Hi, I have just uploaded the latest sources of PyHyphen (http://cheeseshop.python.org/pypi/PyHyphen). The tarball also contains Windows binaries of the C extension for Python 2.4 and 2.5. So most Windows users will get going without compiling. Just enter the usual 'python setup.py install'. There

Re: Prototype OO

2008-04-02 Thread Carl Banks
On Apr 2, 10:52 am, sam <[EMAIL PROTECTED]> wrote: > Then I say: > > -- __id is awful, because it is a trick to prefix names > > and gurus say: > > -- it is good solution for name conflicts > > But somebody may prefix his names with class names and cause nameconflict, so > maybe it

Re: ANN: pry unit testing framework

2008-04-02 Thread j vickroy
Aldo Cortesi wrote: > We are happy to announce the first release of Pry, a unit testing framework. > > Features > > > * Built-in coverage analysis, profiling, and quick-and-dirty benchmarking > * Assertion-based tests - no ugly failUnless*, failIf*, etc. methods > * Tree-base

Re: Prototype OO

2008-04-02 Thread [EMAIL PROTECTED]
On 2 avr, 16:52, sam <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers napisał(a): > > > Don't misunderstand me : I'm not saying that class-based is better (or > > worse) than prototype, I'm not saying that Python is perfect, I'm not > > saying that your points are not worth any consideration, I'm j

Re: License of Python

2008-04-02 Thread Jan Claeys
Op Sun, 30 Mar 2008 08:16:39 -0700, schreef iu2: > Due to Competitors... I don't want to expost the language I use If they are clever, they already know that you want to use python by now, after you posted this on a public mailing list / newsgroup... -- JanC -- http://mail.python.org/mailman

  1   2   >