Python-URL! - weekly Python news and links (Nov 28)

2007-11-27 Thread Gabriel Genellina
QOTW: Given that C++ has pointers and typecasts, it's really hard to have a serious conversation about type safety with a C++ programmer and keep a straight face. It's kind of like having a guy who juggles chainsaws wearing body armor arguing with a guy who juggles rubber chickens wearing a

ANN: PyTables PyTables Pro 2.0.2 are out!

2007-11-27 Thread Ivan Vilata i Balaguer
Hi everyone, We at Carabos are happy to announce the simultaneous release of the new 2.0.2 versions of both PyTables and PyTables Pro. They are mainly bugfix releases, and users of previous versions are encouraged to upgrade. And now the official announce:

Wing IDE 3.0.2 released

2007-11-27 Thread Wingware
Hi, We're happy to announce version 3.0.2 of Wing IDE, an advanced development environment for the Python programming language. It is available from: http://wingware.com/downloads This release focuses on fixing usability issues found in Wing 3.0.1, including missed Search in Project matches,

Re: the annoying, verbose self

2007-11-27 Thread Steven D'Aprano
On Mon, 26 Nov 2007 21:48:36 +0100, Ton van Vliet wrote: On Mon, 26 Nov 2007 20:14:50 +0100, Bruno Desthuilliers [EMAIL PROTECTED] wrote: However, I was more thinking in terms of attributes only Too bad : in Python, everything's an object, so 'methods' are attributes too. Right, but I'm

FREE AIR TICKET

2007-11-27 Thread amutharr
AIR TICKET FOR SWIZ ANSWER SIMPLE QUESTIONhttp://rexmier.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Rss Feed Creator

2007-11-27 Thread Stefan Behnel
Shane Geiger wrote: James Matthews wrote: I am looking for a library that will create Rss/Atom feeds in python. It needs to format the XML in a readable format! Does anyone have any suggestions? http://trac.openplans.org/openplans/browser/TaggerClient/trunk/taggerclient/atom.py?rev=6717 The

Re: Rss Feed Creator

2007-11-27 Thread Vladimir Rusinov
On 11/27/07, James Matthews [EMAIL PROTECTED] wrote: I am looking for a library that will create Rss/Atom feeds in python. It needs to format the XML in a readable format! Does anyone have any suggestions? You can also use some xml-based template engine (Kid or Genshi). -- Vladimir Rusinov

Re: the annoying, verbose self

2007-11-27 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Mon, 26 Nov 2007 21:48:36 +0100, Ton van Vliet wrote: On Mon, 26 Nov 2007 20:14:50 +0100, Bruno Desthuilliers [EMAIL PROTECTED] wrote: However, I was more thinking in terms of attributes only Too bad : in Python, everything's an object, so 'methods' are

Why are class methods not classmethods?

2007-11-27 Thread Steven D'Aprano
There's some subtle behaviour going on here that I don't really follow. Class methods apparently aren't classmethods. class Parrot(object): ... def method(self, *args): ... return self, args ... @classmethod ... def cmethod(cls, *args): ... return cls, args

Re: gnosis XML objectify

2007-11-27 Thread Stefan Behnel
Wang, Harry wrote: Test Suite Started @ 2007-11-26 11:34:46.617000 Traceback (most recent call last): File C:\UDR2\UDRxmlGateway.py, line 370, in module ParseAll() File C:\UDR2\UDRxmlGateway.py, line 286, in ParseAll py_obj =

Re: the annoying, verbose self

2007-11-27 Thread Roy Smith
In article [EMAIL PROTECTED], Bruno Desthuilliers [EMAIL PROTECTED] wrote: Steven D'Aprano a écrit : On Mon, 26 Nov 2007 21:48:36 +0100, Ton van Vliet wrote: On Mon, 26 Nov 2007 20:14:50 +0100, Bruno Desthuilliers [EMAIL PROTECTED] wrote: However, I was more thinking in terms of

Re: Why are class methods not classmethods?

2007-11-27 Thread Marc 'BlackJack' Rintsch
On Tue, 27 Nov 2007 09:12:28 +, Steven D'Aprano wrote: Can anyone explain why class methods bound to a class are instancemethods rather than classmethods? I'd say because they are bound to the class which is the instance that is passed as first argument. Just like unbound methods turn

Re: the annoying, verbose self

2007-11-27 Thread MonkeeSage
On Nov 27, 3:20 am, Roy Smith [EMAIL PROTECTED] wrote: If you want to have a little fun: class peverse: def __call__(self): raise AttributeError (peverse instance has no __call__ method) x = peverse() x() That is peverse, but still... from types import FunctionType type(x)

Re: Rss Feed Creator

2007-11-27 Thread James Matthews
Thank you everyone! On Nov 27, 2007 10:13 AM, Vladimir Rusinov [EMAIL PROTECTED] wrote: On 11/27/07, James Matthews [EMAIL PROTECTED] wrote: I am looking for a library that will create Rss/Atom feeds in python. It needs to format the XML in a readable format! Does anyone have any

Re: Find Replace hyperlinks in a string

2007-11-27 Thread MonkeeSage
On Nov 27, 1:37 am, Nico Grubert [EMAIL PROTECTED] wrote: Hi there, I have a string containing some hyperlinks. I'd like to replace every hyperlink with a HTML style link. Example: Replace 'http://www.foo.com/any_url' with 'a

vanga machan vanga

2007-11-27 Thread abi
http://goast.50webs.com/ http://bigchurch.com/go/g912753-pmem http://indianfriendfinder.com/go/g912753-pmem -- http://mail.python.org/mailman/listinfo/python-list

Re: the annoying, verbose self

2007-11-27 Thread Bruno Desthuilliers
Colin J. Williams a écrit : Bruno Desthuilliers wrote: [snip] Too bad : in Python, everything's an object, so 'methods' are attributes too. What do you see as a problem here? You snipped too much... Tony wrote However, I was more thinking in terms of attributes only (implying: attributes

Re: the annoying, verbose self

2007-11-27 Thread Bruno Desthuilliers
MonkeeSage a écrit : On Nov 27, 3:20 am, Roy Smith [EMAIL PROTECTED] wrote: If you want to have a little fun: class peverse: def __call__(self): raise AttributeError (peverse instance has no __call__ method) x = peverse() x() print callable(x) = True That is peverse, but

Re: spawning a process with subprocess

2007-11-27 Thread Nick Craig-Wood
MonkeeSage [EMAIL PROTECTED] wrote: Couple of things. You should use poll() on the Popen instance, and should check it explicitly against None (since a 0 return code, meaning exit successfully, will be treated as a false condition the same as None). Also, in your second example, you block

Re: trouble selling twisted

2007-11-27 Thread Nick Craig-Wood
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have a lot of trouble selling twisted a a client lib for network access (on embedded platform) the group i'm a member of wants to write some unmaintainable threaded blocking junk in c--. Finish the code in the time it takes them to work out what

Re: Find Replace hyperlinks in a string

2007-11-27 Thread gsal
You mean in Python? 'cause if it is a one time shot kind of thing, I would simply open the file in my favorite editor (NEdit) and use a Search and Replace, check the regexp box and type my expression...something along the lines of ([^:]+)://([^:/]+)(: ([0-9]+))?(/.*) to find URLs and then replace

Re: spawning a process with subprocess

2007-11-27 Thread MonkeeSage
On Nov 27, 4:30 am, Nick Craig-Wood [EMAIL PROTECTED] wrote: MonkeeSage [EMAIL PROTECTED] wrote: Couple of things. You should use poll() on the Popen instance, and should check it explicitly against None (since a 0 return code, meaning exit successfully, will be treated as a false

Re: spawning a process with subprocess

2007-11-27 Thread Ove Svensson
bhunter [EMAIL PROTECTED] writes: Hi, I've used subprocess with 2.4 several times to execute a process, wait for it to finish, and then look at its output. Now I want to spawn the process separately, later check to see if it's finished, and if it is look at its output. I may want to send

Re: the annoying, verbose self

2007-11-27 Thread MonkeeSage
On Nov 27, 4:22 am, Bruno Desthuilliers You don't have to subclass function to define a callable type that implements the descriptor protocol so it behaves just like a function in the context of an attribute lookup. I'm aware, and I understand that python's types (as with other duck- typed

Re: the annoying, verbose self

2007-11-27 Thread Iain King
On Nov 27, 9:20 am, Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Bruno Desthuilliers [EMAIL PROTECTED] wrote: Steven D'Aprano a écrit : On Mon, 26 Nov 2007 21:48:36 +0100, Ton van Vliet wrote: On Mon, 26 Nov 2007 20:14:50 +0100, Bruno Desthuilliers [EMAIL

Re: the annoying, verbose self

2007-11-27 Thread Bruno Desthuilliers
MonkeeSage a écrit : On Nov 27, 4:22 am, Bruno Desthuilliers You don't have to subclass function to define a callable type that implements the descriptor protocol so it behaves just like a function in the context of an attribute lookup. I'm aware, and I understand that python's types (as

see most important news

2007-11-27 Thread RANI
see most important news http://earnmac.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: the annoying, verbose self

2007-11-27 Thread Duncan Booth
Iain King [EMAIL PROTECTED] wrote: FTR, I won't be using this :) I do like this syntax though: class Vector: def __init__(self, x, y, z): self.x = x self.y = y self.z = z def abs(self): using self: return math.sqrt(.x*.x + .y*.y +

Re: the annoying, verbose self

2007-11-27 Thread Iain King
On Nov 27, 12:03 pm, Duncan Booth [EMAIL PROTECTED] wrote: Iain King [EMAIL PROTECTED] wrote: FTR, I won't be using this :) I do like this syntax though: class Vector: def __init__(self, x, y, z): self.x = x self.y = y self.z = z def abs(self):

It works! Was: Installing Python 3000 on Leopard (Mac OS) fails...

2007-11-27 Thread André
On Nov 26, 9:59 pm, André [EMAIL PROTECTED] wrote: While I made some progress in trying to install Py3k from source (for the first time), it has failed... Here are the steps I went through (not necessarily in that order - except for those that matter). 1. After installing Leopard, install

Re: How to Teach Python Variables

2007-11-27 Thread Neil Cerutti
On 2007-11-26, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hrvoje Niksic wrote: greg [EMAIL PROTECTED] writes: none wrote: IIRC, I once saw an explanation how Python doesn't have variables in the sense that, say, C does, and instead has bindings from names to objects. IMHO, this is

reading/writing files

2007-11-27 Thread sandipm
Hi, I am trying to read a file and write into other file. if I do it for simple text file, it works well. but for pdfs or some other mime types, its failing. actually main problem is i am uploading file using cgi, in this process I am getting content of file, and I am trying to save the file.

Keyword passing to superclass written in C

2007-11-27 Thread Sven Erik Knop
Hi I am getting slightly frustrated and wonder if you can help me. Consider a Python class Foo implemented in C++. I have declared an initialization method like this static int Foo_init(P4Adapter *self, PyObject *args, PyObject *kwds) { } and I am subclassing Foo in Python, which works fine

Re: reading/writing files

2007-11-27 Thread sandipm
f1= open(file1.pdf, rb) x = f1.read() open(file2.pdf, wb).write(x) works... thanks sandip On Nov 27, 5:43 pm, sandipm [EMAIL PROTECTED] wrote: Hi, I am trying to read a file and write into other file. if I do it for simple text file, it works well. but for pdfs or some other mime

Re: How can I create customized classes that have similar properties as 'str'?

2007-11-27 Thread Licheng Fang
On Nov 27, 10:45 am, Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 25 Nov 2007 02:42:36 -0800, Licheng Fang wrote: I mentioned trigram counting as an illustrative case. In fact, you'll often need to define patterns more complex than that, and tens of megabytes of text may generate

Different kinds of Import Errors

2007-11-27 Thread Thomas Guettler
If you look at this code, you see there are two kind of ImportErrors: 1. app_name has no attribute or file managment.py: That's OK. 2. managment.py exists, but raises an ImportError: That's not OK: reraise # Import the 'management' module within each installed app, to register #

Re: Best ways of managing text encodings in source/regexes?

2007-11-27 Thread J. Clifford Dyer
On Tue, Nov 27, 2007 at 01:30:15AM +0200, tinker barbet wrote regarding Re: Best ways of managing text encodings in source/regexes?: Hi Thanks for your responses, as I said on the reply I posted I thought later it was a bit long so I'm grateful you held out! I should have said (but see

Re: Different kinds of Import Errors

2007-11-27 Thread kyosohma
On Nov 27, 7:35 am, Thomas Guettler [EMAIL PROTECTED] wrote: If you look at this code, you see there are two kind of ImportErrors: 1. app_name has no attribute or file managment.py: That's OK. 2. managment.py exists, but raises an ImportError: That's not OK: reraise # Import the

Re: Best ways of managing text encodings in source/regexes?

2007-11-27 Thread Kumar McMillan
On Nov 26, 2007 4:27 PM, Martin v. Löwis [EMAIL PROTECTED] wrote: myASCIIRegex = re.compile('[A-Z]') myUniRegex = re.compile(u'\u2013') # en-dash then read the source file into a unicode string with codecs.read(), then expect re to match against the unicode string using either of those

you want?

2007-11-27 Thread shoplife0001
Dear Friends The Shoplifes.com belongs to Shoplife Limited Company who mainly sell personal stylish electronic consumable products such as Mobile phones, Laptops, Digital Cameras, Digital Videos,Mp3,Mp4 and bulk products such as LCD TV, Motorcycles and so on. The specific item please visit our

Re: the annoying, verbose self

2007-11-27 Thread Neil Cerutti
On 2007-11-26, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Patrick Mullen a écrit : (snip) Still an unnecessary lookup on tmp though :) And it would be useless to use it for one assignment, the idea is to eliminate all the typing with this: self.var1 = 5 self.var2 = a value self.var3 =

Re: How to Teach Python Variables

2007-11-27 Thread hdante
On Nov 25, 5:31 pm, none atavory\@(none) wrote: Aurélien Campéas wrote: none a écrit : Hello, IIRC, I once saw an explanation how Python doesn't have variables in the sense that, say, C does, and instead has bindings from names to objects. Does anyone have a link?

read/write to java socket in python

2007-11-27 Thread madsornomads
Hi all, I have a problem with reading from a Java server after I have written to it - it just hangs. It works fine if I just write to the server and not try to write. I have read the HOWTO on sockets - and it states that there is a problem (something about flushing), but not what the solutions

Re: reading/writing files

2007-11-27 Thread BartlebyScrivener
On Nov 27, 7:14 am, sandipm [EMAIL PROTECTED] wrote: f1= open(file1.pdf, rb) x = f1.read() open(file2.pdf, wb).write(x) works... thanks sandip You might also like: http://pybrary.net/pyPdf/ -- http://mail.python.org/mailman/listinfo/python-list

Re: read/write to java socket in python

2007-11-27 Thread Jean-Paul Calderone
On Tue, 27 Nov 2007 07:08:04 -0800 (PST), [EMAIL PROTECTED] wrote: Hi all, I have a problem with reading from a Java server after I have written to it - it just hangs. It works fine if I just write to the server and not try to write. I have read the HOWTO on sockets - and it states that there is

Re: read/write to java socket in python

2007-11-27 Thread hdante
On Nov 27, 1:08 pm, [EMAIL PROTECTED] wrote: Hi all, I have a problem with reading from a Java server after I have written to it - it just hangs. It works fine if I just write to the server and not try to write. I have read the HOWTO on sockets - and it states that there is a problem

A bug in Python's regular expression engine?

2007-11-27 Thread Just Another Victim of the Ambient Morality
This won't compile for me: regex = re.compile('(.*\\).*') I get the error: sre_constants.error: unbalanced parenthesis I'm running Python 2.5 on WinXP. I've tried this expression with another RE engine in another language and it works just fine which leads me to believe the

Re: Why are class methods not classmethods?

2007-11-27 Thread Chris Mellon
On Nov 27, 2007 3:12 AM, Steven D'Aprano [EMAIL PROTECTED] wrote: There's some subtle behaviour going on here that I don't really follow. Class methods apparently aren't classmethods. class Parrot(object): ... def method(self, *args): ... return self, args ...

Re: A bug in Python's regular expression engine?

2007-11-27 Thread Diez B. Roggisch
Just Another Victim of the Ambient Morality wrote: This won't compile for me: regex = re.compile('(.*\\).*') I get the error: sre_constants.error: unbalanced parenthesis I'm running Python 2.5 on WinXP. I've tried this expression with another RE engine in

Re: Keyword passing to superclass written in C

2007-11-27 Thread Chris Mellon
On Nov 27, 2007 6:47 AM, Sven Erik Knop [EMAIL PROTECTED] wrote: Hi I am getting slightly frustrated and wonder if you can help me. Consider a Python class Foo implemented in C++. I have declared an initialization method like this static int Foo_init(P4Adapter *self, PyObject *args,

Re: A bug in Python's regular expression engine?

2007-11-27 Thread Neil Cerutti
On 2007-11-27, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: This won't compile for me: regex = re.compile('(.*\\).*') I get the error: sre_constants.error: unbalanced parenthesis Hint 1: Always assume that errors are in your own code. Blaming library

Re: A bug in Python's regular expression engine?

2007-11-27 Thread Paul Hankin
On Nov 27, 3:48 pm, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: This won't compile for me: regex = re.compile('(.*\\).*') I get the error: sre_constants.error: unbalanced parenthesis I'm running Python 2.5 on WinXP. I've tried this expression with

Re: A bug in Python's regular expression engine?

2007-11-27 Thread Just Another Victim of the Ambient Morality
Paul Hankin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Nov 27, 3:48 pm, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: This won't compile for me: regex = re.compile('(.*\\).*') I get the error: sre_constants.error: unbalanced parenthesis

Re: It works! Was: Installing Python 3000

2007-11-27 Thread jim-on-linux
On Tuesday 27 November 2007 07:20, André wrote: On Nov 26, 9:59 pm, André [EMAIL PROTECTED] wrote: While I made some progress in trying to install Py3k from source (for the first time), it has failed... Here are the steps I went through (not necessarily in that order - except for those

Re: Should proxy objects lie about their class name?

2007-11-27 Thread Fuzzyman
On Nov 26, 11:56 pm, Carl Banks [EMAIL PROTECTED] wrote: On Nov 20, 3:50 pm, [EMAIL PROTECTED] (John J. Lee) wrote: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is it? Would

Re: How to Teach Python Variables

2007-11-27 Thread Aaron Watters
On Nov 27, 10:06 am, hdante [EMAIL PROTECTED] wrote: On Nov 25, 5:31 pm, none atavory\@(none) wrote: And that's it. I think that there is confusion because everything we do with python variables are pointer dereferences, except for the attribution, that instead of dereferencing and

count pages in a pdf

2007-11-27 Thread belred
is it possible to parse a pdf file in python? for starters, i would like to count the number of pages in a pdf file. i see there is a project called ReportLab, but it seems to be a pdf generator... i can't tell if i would be able to parse a pdf file programmically. thanks for any

Re: How to Teach Python Variables

2007-11-27 Thread Chris Mellon
On Nov 27, 2007 10:25 AM, Aaron Watters [EMAIL PROTECTED] wrote: On Nov 27, 10:06 am, hdante [EMAIL PROTECTED] wrote: On Nov 25, 5:31 pm, none atavory\@(none) wrote: And that's it. I think that there is confusion because everything we do with python variables are pointer

Re: Should proxy objects lie about their class name?

2007-11-27 Thread Steven Bethard
Fuzzyman wrote: On Nov 26, 11:56 pm, Carl Banks [EMAIL PROTECTED] wrote: On Nov 20, 3:50 pm, [EMAIL PROTECTED] (John J. Lee) wrote: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is

Re: A bug in Python's regular expression engine?

2007-11-27 Thread MonkeeSage
On Nov 27, 10:52 am, MonkeeSage [EMAIL PROTECTED] wrote: On Nov 27, 10:19 am, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: That is funny. Thank you for your help... Just for clarification, what does the r in your code do? It means a raw string (as you know

Re: Keyword passing to superclass written in C

2007-11-27 Thread Sven Erik Knop
Duh of course. Not sure what I had done in Python/Python. Now it works. Thanks a lot. Sven Erik Chris Mellon wrote: On Nov 27, 2007 6:47 AM, Sven Erik Knop [EMAIL PROTECTED] wrote: Hi I am getting slightly frustrated and wonder if you can help me. Consider a Python class Foo

Re: Should proxy objects lie about their class name?

2007-11-27 Thread Robin Becker
Steven Bethard wrote: ... The Python 3 machinery allows *other* classes to lie about whether or not your object is an instance or subclass of them, without requiring them to set your __class__ or __bases__. So, for example, you can create a class ``Integer`` and make ``issubclass(int,

Re: How can I create customized classes that have similar properties as 'str'?

2007-11-27 Thread Chris Mellon
On Nov 27, 2007 7:16 AM, Licheng Fang [EMAIL PROTECTED] wrote: On Nov 27, 10:45 am, Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 25 Nov 2007 02:42:36 -0800, Licheng Fang wrote: I mentioned trigram counting as an illustrative case. In fact, you'll often need to define patterns more

os.path.islink documentation error?

2007-11-27 Thread Giampaolo Rodola'
os.path.islink documentation says: Return True if path refers to a directory entry that is a symbolic link. Always False if symbolic links are not supported. It's not clear to me why it is mentioned the DIRECTORY term. Shouldn't os.path.islink be used to just check if the *path* passed as

Re: count pages in a pdf

2007-11-27 Thread Andreas Lobinger
Tim Golden wrote: [EMAIL PROTECTED] wrote: is it possible to parse a pdf file in python? for starters, i would like to count the number of pages in a pdf file. i see there is a project called ReportLab, but it seems to be a pdf generator... i can't tell if i would be able to parse a pdf

Re: count pages in a pdf

2007-11-27 Thread Jon Ribbens
On 2007-11-27, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: is it possible to parse a pdf file in python? for starters, i would like to count the number of pages in a pdf file. i see there is a project called ReportLab, but it seems to be a pdf generator... i can't tell if i would be able to

Unsupported operator for Decimal: + (or -)

2007-11-27 Thread Todd O'Bryan
This seems to have come up earlier... http://mail.python.org/pipermail/python-list/2007-July/451187.html but no resolution. We're seeing the same thing. We're using Django's DecimalField type and when we try to add or subtract values--which should be decimal.Decimal objects--we occasionally get

Looking for a Python tutor

2007-11-27 Thread hong2221
I'm looking for a Python programmar that is willing write simple functions, prices can be talked over. Contact me asap. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.islink documentation error?

2007-11-27 Thread Diez B. Roggisch
Giampaolo Rodola' schrieb: os.path.islink documentation says: Return True if path refers to a directory entry that is a symbolic link. Always False if symbolic links are not supported. It's not clear to me why it is mentioned the DIRECTORY term. Shouldn't os.path.islink be used to just

Re: Unsupported operator for Decimal: + (or -)

2007-11-27 Thread Diez B. Roggisch
Todd O'Bryan schrieb: This seems to have come up earlier... http://mail.python.org/pipermail/python-list/2007-July/451187.html but no resolution. We're seeing the same thing. We're using Django's DecimalField type and when we try to add or subtract values--which should be

Re: How to Teach Python Variables

2007-11-27 Thread Donn Cave
In article [EMAIL PROTECTED], Aaron Watters [EMAIL PROTECTED] wrote: I would try to avoid talking in generalities about python variables versus C or lisp or whatever, unless I was teaching an upper division college programming languages survey class. Instead, I'd fire up the interactive

Re: Unsupported operator for Decimal: + (or -)

2007-11-27 Thread Chris Mellon
On Nov 27, 2007 11:45 AM, Todd O'Bryan [EMAIL PROTECTED] wrote: This seems to have come up earlier... http://mail.python.org/pipermail/python-list/2007-July/451187.html but no resolution. We're seeing the same thing. We're using Django's DecimalField type and when we try to add or subtract

Re: How to Teach Python Variables

2007-11-27 Thread hdante
On Nov 26, 7:49 am, Hrvoje Niksic [EMAIL PROTECTED] wrote: greg [EMAIL PROTECTED] writes: none wrote: IIRC, I once saw an explanation how Python doesn't have variables in the sense that, say, C does, and instead has bindings from names to objects. If you're talking to C

Re: read/write to java socket in python

2007-11-27 Thread madsornomads
On Nov 27, 4:21 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Tue, 27 Nov 2007 07:08:04 -0800 (PST), [EMAIL PROTECTED] wrote: Hi all, I have a problem with reading from a Java server after I have written to it - it just hangs. It works fine if I just write to the server and not try to

Pulling data from a .asps site

2007-11-27 Thread hall . jeff
There's a government website which shows public data for banks. We'd like to pull the data down programmatically but the data is hidden behind .aspx... Is there anyway in Python to hook in directly to a browser (firefox or IE) to do the following... 1) Fill the search criteria 2) Press the

Re: read/write to java socket in python

2007-11-27 Thread James Matthews
It's a socket interface it should be universal! On Nov 27, 2007 4:08 PM, [EMAIL PROTECTED] wrote: Hi all, I have a problem with reading from a Java server after I have written to it - it just hangs. It works fine if I just write to the server and not try to write. I have read the HOWTO on

Fwd: Pulling data from a .asps site

2007-11-27 Thread Todd O'Bryan
-- Forwarded message -- From: Todd O'Bryan [EMAIL PROTECTED] Date: Nov 27, 2007 1:48 PM Subject: Re: Pulling data from a .asps site To: [EMAIL PROTECTED] Check out Selenium Remote Control! It's very easy to use. On Nov 27, 2007 1:37 PM, [EMAIL PROTECTED] wrote: There's a

Re: How to Teach Python Variables

2007-11-27 Thread Robin Kåveland Hansen
Aurélien Campéas [EMAIL PROTECTED] wrote (Sun, 25 Nov 2007 20:09:59 +0100): none a écrit : That's something I've often heard and I don't get it. Somehow I don't understand how C variables are not like python bindings (the differences being that C variables are statically typed and

Re: spawning a process with subprocess

2007-11-27 Thread bhunter
Wow, everyone. Great comments. Thanks so much! A few points on all of the above, just so I don't look too stupid: * The problem with the testcase, I believe, was the size of the file and the output pipe filling up, as Nick suggested. When run on a smaller file, with Jordan's suggestions, it

Re: How to Teach Python Variables

2007-11-27 Thread Brian Blais
On Nov 27, 2007, at Nov 27:1:21 PM, hdante wrote: This shouldn't confuse a C programmer if he understands that assignment changes the pointer address, instead of copying the value: Coming from C, I found the pointer analogy to work pretty well, but in my head I always felt that integers

Re: How to Teach Python Variables

2007-11-27 Thread Aaron Watters
On Nov 27, 11:52 am, Chris Mellon [EMAIL PROTECTED] wrote: I would try to avoid talking in generalities about python variables versus C or lisp or whatever, unless I was teaching an upper division college programming languages survey class. I disagree, although it's not really on topic

Re: read/write to java socket in python

2007-11-27 Thread madsornomads
On Nov 27, 4:29 pm, hdante [EMAIL PROTECTED] wrote: On Nov 27, 1:08 pm, [EMAIL PROTECTED] wrote: Hi all, I have a problem with reading from a Java server after I have written to it - it just hangs. It works fine if I just write to the server and not try to write. I have read the HOWTO

Re: Looking for a Python tutor

2007-11-27 Thread James Matthews
Please post on the job section! On Nov 27, 2007 6:46 PM, hong2221 [EMAIL PROTECTED] wrote: I'm looking for a Python programmar that is willing write simple functions, prices can be talked over. Contact me asap. -- http://mail.python.org/mailman/listinfo/python-list --

create pywintypes.CreateGuid() compatible guids on Linux ?

2007-11-27 Thread GHUM
Hello, I created lots of guids via pywintypes.CreateGuid() on windows. Now I would like to run the same software on Linux / Solaris / FreeBSD. So I should produce compatible GUIDS on that systems. compatible having the meaining: Providing similiar likelehood of collisions. of course google

Re: How to Teach Python Variables

2007-11-27 Thread hdante
On Nov 27, 2:25 pm, Aaron Watters [EMAIL PROTECTED] wrote: I hope the participants in this thread realize that this sort of discussion will cause any programming newbie to immediately melt into the floor. All right, answering the original question is good. :-P 1) If the students can't

Re: Looking for a Python tutor

2007-11-27 Thread Arnaud Delobelle
On Nov 27, 5:46 pm, hong2221 [EMAIL PROTECTED] wrote: I'm looking for a Python programmar that is willing write simple ^^ functions, prices can be talked over. Contact me asap. You should start with a prospelling :) -- Arnaud --

Re: create pywintypes.CreateGuid() compatible guids on Linux ?

2007-11-27 Thread Chris Mellon
On Nov 27, 2007 1:09 PM, GHUM [EMAIL PROTECTED] wrote: Hello, I created lots of guids via pywintypes.CreateGuid() on windows. Now I would like to run the same software on Linux / Solaris / FreeBSD. So I should produce compatible GUIDS on that systems. compatible having the meaining:

Re: How to Teach Python Variables

2007-11-27 Thread MonkeeSage
On Nov 27, 11:50 am, Donn Cave [EMAIL PROTECTED] wrote: In contrast, I suspect that someone who learns Python concepts in terms of explanations like `boxes' or `pointers' or whatnot is at some disadvantage while that lasts, like translating a foreign language to your own instead of attaching

Re: It works! Was: Installing Python 3000

2007-11-27 Thread André
On Nov 27, 11:17 am, jim-on-linux [EMAIL PROTECTED] wrote: On Tuesday 27 November 2007 07:20, André wrote: On Nov 26, 9:59 pm, André [EMAIL PROTECTED] wrote: While I made some progress in trying to install Py3k from source (for the first time), it has failed... Here are the steps I

chdir() problem

2007-11-27 Thread Hodginshut
I am trying to get a hold of anyone at Fenix in Thailand. Can you be of any help? Pizza Hut London, Ont. Canada -- http://mail.python.org/mailman/listinfo/python-list

Re: read/write to java socket in python

2007-11-27 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: I have a problem with reading from a Java server after I have written to it - it just hangs. It works fine if I just write to the server and not try to write. Excuse me? I have read the HOWTO on sockets - and it states that there is a problem (something about

Passing arguments to subclasses of unittest.TestCase

2007-11-27 Thread Tom Harris
Hi, Is there a way to pass arguments to TestCases when running tests? I have a test suite that need to be configured slightly differently for 3 different products, and rather than do a hack I wondered if there was a canonical way to do it. I _know_ that py.test can do it trivially. I am

Re: Pulling data from a .asps site

2007-11-27 Thread Zepo Len
On Tue, 27 Nov 2007 20:37:19 +0200, [EMAIL PROTECTED] wrote: There's a government website which shows public data for banks. We'd like to pull the data down programmatically but the data is hidden behind .aspx... Is there anyway in Python to hook in directly to a browser (firefox or IE) to

Re: Running unmodified CGI scripts persistently under mod_wsgi.

2007-11-27 Thread Istvan Albert
On Nov 25, 1:55 am, Graham Dumpleton [EMAIL PROTECTED] wrote: The other question is whether there is even a demand for this. Do people want to be able to take unmodified Python CGI scripts and try to run them persistently in this way, or would they be better off converting them to proper WSGI

Re: spawning a process with subprocess

2007-11-27 Thread Thomas Bellman
bhunter [EMAIL PROTECTED] wrote: * The problem with the testcase, I believe, was the size of the file and the output pipe filling up, as Nick suggested. When run on a smaller file, with Jordan's suggestions, it works fine. With a larger file, it's necessary to do as Nick says. If the size

Re: Should proxy objects lie about their class name?

2007-11-27 Thread John J. Lee
Diez B. Roggisch [EMAIL PROTECTED] writes: John J. Lee schrieb: [EMAIL PROTECTED] (John J. Lee) writes: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is it? Would this surprise

get mouse

2007-11-27 Thread Shawn Minisall
I'm just trying to test and see if the get mouse statements are working in my program. If they are, in the console window, it should go back to the prompt. It doesn't for all of them, just the last rectangle...sometimes. Am I setting them up correctly? here's the relevant code...thx The

Re: fork/exec with input redirection

2007-11-27 Thread Dan Upton
./gobmk_base.linux_x86 --quiet --mode gtp 13x13.tst The only thing I could really think of to try was os.execv(./gobmk_base.linux_x86, [./gobmk_base.linux_x86, --quiet, --mode, gtp, , 13x13.tst]) but this apparently doesn't work. Is there some other way to accomplish

Re: How to Teach Python Variables

2007-11-27 Thread Aaron Watters
On Nov 27, 2:20 pm, MonkeeSage [EMAIL PROTECTED] wrote: On Nov 27, 11:50 am, Donn Cave [EMAIL PROTECTED] wrote: I agree with your point, but I think the distinction is this: pedagogical analogies should be truly *analogous* -- they should not be analogies that are only vaguely similar and

Re: Pulling data from a .asps site

2007-11-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: There's a government website which shows public data for banks. We'd like to pull the data down programmatically but the data is hidden behind .aspx... Is there anyway in Python to hook in directly to a browser (firefox or IE) to do the following... 1) Fill the

  1   2   >