PyDev 0.9.8.4 released

2005-11-04 Thread Fabio Zadrozny
Hi All, PyDev - Python IDE (Python Development Enviroment for Eclipse) version 0.9.8.4 has been released. Check the homepage (http://pydev.sourceforge.net/) for more details. Details for Release: 0.9.8.4 Major highlights: * The license was changed to EPL. It can

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-11-03, Stefan Arentz schreef [EMAIL PROTECTED]: [...] It is all according to how things have been in Python for a long time. Unsane behaviour for a long time is still unsane behaviour. As your continued

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-03, Steven D'Aprano schreef [EMAIL PROTECTED]: On Thu, 03 Nov 2005 04:30:09 -0800, Paul Rubin wrote: Steve Holden [EMAIL PROTECTED] writes: class A: a = 1 b = A() b.a += 2 print b.a print A.a Which results in 3 1 I don't suppose you'd care to enlighten us on

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-03, Steven D'Aprano schreef [EMAIL PROTECTED]: On Thu, 03 Nov 2005 12:53:37 +, Antoon Pardon wrote: I don't suppose you'd care to enlighten us on what you'd regard as the superior outcome? No. I don't think a superior outcome is necessary to see that this is not sane

Re: Class Variable Access and Assignment

2005-11-04 Thread Stefan Arentz
Antoon Pardon [EMAIL PROTECTED] writes: ... Ah yes. Well, good luck with that. You seem to have decided that it is not sane and who am I to argue with that. It depends on your state of mind :-) I can just say the opposite, that you seem to have decided that it is sane. I have. I like

Re: Web automation with twill

2005-11-04 Thread Michele Simionato
BTW, O'Reilly just published an article of mines on twill: http://www.onlamp.com/pub/a/python/2005/11/03/twill.html Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-03, Magnus Lycka schreef [EMAIL PROTECTED]: Antoon Pardon wrote: There is no instance variable at that point. How can it add 2, to something that doesn't exist at the moment. Because 'a += 1' is only a shorthand for 'a = a + 1' if a is an immutable object? Anyway, the behaviour is

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-03, Magnus Lycka schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-11-03, Steven D'Aprano schreef [EMAIL PROTECTED]: There are two possible fixes, either by prohibiting instance variables with the same name as class variables, which would allow any reference to an instance

Re: Cheapest pocket device to code python on

2005-11-04 Thread Sybren Stuvel
Devan L enlightened us with: I would not recommend trying to code on a handheld device. Small screen size and [usually] small keyboards make it less-than-practical. Stick with a laptop, or write it in a notebook, if you must. Although it isn't the pinnacle of usability, I can program just

[no subject]

2005-11-04 Thread Terry Hancock
On Thursday 03 November 2005 07:28 am, venk wrote: Microsoft can create a competing version of Windows. TCP/IP became a standard long before Microsoft even acknowledged it's existence. So did ASCII, the IBM BIOS, and serial ports, to name just a few. Does the term ISO standard mean anything

[no subject]

2005-11-04 Thread Terry Hancock
On Thursday 03 November 2005 04:29 pm, Steven D'Aprano wrote: On Thu, 03 Nov 2005 14:56:44 -0500, Tim Daneliuk wrote: There is a difference between what is *illegal* and what constitutes a *crime*. Why thank you, you've really made my day. That's the funniest thing I've heard in months.

I Need Motivation Part 2

2005-11-04 Thread [EMAIL PROTECTED]
i m currently in a network (LAN). i started python because i heard that it has great ability for networking programs and/or scripts, but i m losing my motivation with python because there are sooo many modules, that i cant just learn them all, this deters from c or c++ in which there are only

Re: I need Motivation

2005-11-04 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: Martin P. Hellwig wrote: [EMAIL PROTECTED] wrote: I m not a python Expert or anythin i need help, i m losin my motivation to continue with python can anyone inspire me again.??? Ooh that is easy, start learning other programming languages, you'll go back continuing

Re: I Need Motivation Part 2

2005-11-04 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: i m currently in a network (LAN). i started python because i heard that it has great ability for networking programs and/or scripts, but i m losing my motivation with python because there are sooo many modules, that i cant just learn them all, this deters from c or

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-03, Steven D'Aprano schreef [EMAIL PROTECTED]: On Thu, 03 Nov 2005 13:35:35 +, Antoon Pardon wrote: Suppose I have code like this: for i in xrange(1,11): b.a = b.a + i Now the b.a on the right hand side refers to A.a the first time through the loop but not the next

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-03, Steven D'Aprano schreef [EMAIL PROTECTED]: On Thu, 03 Nov 2005 13:01:40 +, Antoon Pardon wrote: Seems perfectly sane to me. What would you expect to get if you wrote b.a = b.a + 2? I would expect a result consistent with the fact that both times b.a would refer to the

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-03, Mike Meyer schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: What would you expect to get if you wrote b.a = b.a + 2? I would expect a result consistent with the fact that both times b.a would refer to the same object. Except they *don't*. This happens in any

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-11-03, Stefan Arentz schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: ... No matter wat the OO model is, I don't think the following code exhibits sane behaviour: class A: a = 1 b = A()

Re: Class Variable Access and Assignment

2005-11-04 Thread Stefan Arentz
Antoon Pardon [EMAIL PROTECTED] writes: ... Would it be too much to ask that in a line like. x = x + 1. both x's would resolve to the same namespace? This is starting to look more like a nagging contest than a real discussion imo. Consider changing the semantics of what you are

Re: Class Variable Access and Assignment

2005-11-04 Thread Stefan Arentz
Antoon Pardon [EMAIL PROTECTED] writes: Op 2005-11-03, Mike Meyer schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: What would you expect to get if you wrote b.a = b.a + 2? I would expect a result consistent with the fact that both times b.a would refer to the same

Re: I Need Motivation Part 2

2005-11-04 Thread Sybren Stuvel
blahman ([EMAIL PROTECTED]) enlightened us with: i m losing my motivation with python because there are sooo many modules, that i cant just learn them all, this deters from c or c++ in which there are only a limited number of header files. There are over 2800 header files on my system in

Re: help converting some perl code to python

2005-11-04 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: the problem is the '..' operator in perl. Is there any equivalent in python? any suggestions ? I have a suggestion: stop assuming we know perl, and explain what this '..' operator does. Sybren -- The problem with the world is stupidity. Not saying there

Re: I Need Motivation Part 2

2005-11-04 Thread bruno at modulix
[EMAIL PROTECTED] wrote: i m currently in a network (LAN). i started python because i heard that it has great ability for networking programs and/or scripts, but i m losing my motivation with python because there are sooo many modules, that i cant just learn them all, Why would you learn

NLTK

2005-11-04 Thread Persi
Hi! I´m beginning to useNLTK python libraries to make PLN (natural language processing). I have problems about how to do CFG (context free grammar) and about exactly what library I should use (ShiftReduce or ChartParser). I´d like to know if someone could help me. thanks Correo

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Stefan Arentz schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: ... Ah yes. Well, good luck with that. You seem to have decided that it is not sane and who am I to argue with that. It depends on your state of mind :-) I can just say the opposite, that you

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
Stefan Arentz [EMAIL PROTECTED] writes: Would it be too much to ask that in a line like. x = x + 1. both x's would resolve to the same namespace? ... Consider changing the semantics of what you are proposing and think about all those Python projects that will break because they depend

Re: Class Variable Access and Assignment

2005-11-04 Thread Stefan Arentz
Paul Rubin http://[EMAIL PROTECTED] writes: Stefan Arentz [EMAIL PROTECTED] writes: Would it be too much to ask that in a line like. x = x + 1. both x's would resolve to the same namespace? ... Consider changing the semantics of what you are proposing and think about all those

Re: help converting some perl code to python

2005-11-04 Thread Ben Sizer
[EMAIL PROTECTED] wrote: the problem is the '..' operator in perl. Is there any equivalent in python? I can't think of anything with a similar operation, to be honest. I'd try using while loops which look out for the next section delimiter. -- Ben Sizer. --

Re: Class Variable Access and Assignment

2005-11-04 Thread Magnus Lycka
Antoon Pardon wrote: Because b.a += 2 expands to b.a = b.a + 2. Why would you want b.a = something to correspond to b.__class__.a = something? That is an implemantation detail. The only answer that you are given means nothing more than: because it is implemented that way. Something that is

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
Antoon Pardon [EMAIL PROTECTED] writes: Op 2005-11-03, Mike Meyer schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: What would you expect to get if you wrote b.a = b.a + 2? I would expect a result consistent with the fact that both times b.a would refer to the same object.

Re: Most efficient way of storing 1024*1024 bits

2005-11-04 Thread Ben Sizer
Tom Anderson wrote: On Wed, 2 Nov 2005, Dan Bishop wrote: Tor Erik Sønvisen wrote: I need a time and space efficient way of storing up to 6 million bits. The most space-efficient way of storing bits is to use the bitwise operators on an array of bytes: Actually, no, it's to xor all

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
Would it be too much to ask that in a line like. x = x + 1. both x's would resolve to the same namespace? Yes. That's to much bondage for programmers who've become accustomed to freedom. Explain why this should be illegal: class C: ... def __getattr__(self, name): ... x = 1 ...

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
Stefan Arentz [EMAIL PROTECTED] writes: Are you seriously saying there's lots of Python projects that would break if this particular weirdness were fixed? I have no numbers of course. But, why is this a weirdness? Do you seriously think the number is larger than zero? Do you think that's

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Magnus Lycka schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Because b.a += 2 expands to b.a = b.a + 2. Why would you want b.a = something to correspond to b.__class__.a = something? That is an implemantation detail. The only answer that you are given means nothing more than:

how to compile c-extensions under WinXP?

2005-11-04 Thread severa
What should I do to be able to compile C-extensions (with python 2.4, winXP)? I get an error message, approximately The .NET Framework SDK needs to be installed; I tried to get something from the Microsoft web site, but maybe not the right version (or didn't set some variables), since the

Re: Most efficient way of storing 1024*1024 bits

2005-11-04 Thread Alex Stapleton
On 4 Nov 2005, at 10:26, Ben Sizer wrote: Tom Anderson wrote: On Wed, 2 Nov 2005, Dan Bishop wrote: Tor Erik Sønvisen wrote: I need a time and space efficient way of storing up to 6 million bits. The most space-efficient way of storing bits is to use the bitwise operators on an

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Mike Meyer schreef [EMAIL PROTECTED]: Would it be too much to ask that in a line like. x = x + 1. both x's would resolve to the same namespace? Yes. That's to much bondage for programmers who've become accustomed to freedom. Explain why this should be illegal: class

Re: Python and Lotus Notes

2005-11-04 Thread Marco Aschwanden
The second line of your code is already a show stopper in my case: from win32com.client import Dispatch session = Dispatch('Lotus.NotesSession') session.Initialize('my_secret_passwort') When started, ends: File C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py, line

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Stefan Arentz schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: Op 2005-11-03, Mike Meyer schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: What would you expect to get if you wrote b.a = b.a + 2? I would expect a result consistent with the

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
Mike Meyer [EMAIL PROTECTED] writes: I've already argued that the kludges suggested to solve this problem create worse problems than this. The most obvious solution is to permit (or even require) the programmer to list the instance variables as part of the class definition. Anything not in the

Python is like COBOL! was: Re: Getting Python Accepted in my Organisation

2005-11-04 Thread Magnus Lycka
Steve Holden wrote: To put things into perspective, it's important to get beyond the very broad categories of programming languages. It's pointless to judge Python on the merits of Perl or AWK, just because a certain label is sometimes applied to all three. That would be like saying that Java

Re: Learning multiple languages (question for general discussion)

2005-11-04 Thread Magnus Lycka
Alex Martelli wrote: Yes, but I haven't found knowing (and using) Python dampens my enthusiasms for learning new languages. But you're more enthusiatic than most of us Alex. I wish I could say the same, but I must admit that I only did halfhearted attempts at learning new languages after

Fork() and exec() dont work

2005-11-04 Thread [EMAIL PROTECTED]
i m using Windows XP, and by tomorrow i will have have fedora core installed too. the problem is, when i use these fork() and exec() my windows doesnt do anything, python gives an error about the module, the kind of error when u know u r wrong. is it because these commands work on linux? if

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Mike Meyer schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: Op 2005-11-03, Mike Meyer schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: What would you expect to get if you wrote b.a = b.a + 2? I would expect a result consistent with the fact

Re: Fork() and exec() dont work

2005-11-04 Thread [EMAIL PROTECTED]
fork( ) Fork a child process. Return 0 in the child, the child's process id in the parent. Availability: (!!!) Unix (!!!). -- http://mail.python.org/mailman/listinfo/python-list

Re: I Need Motivation Part 2

2005-11-04 Thread Leif K-Brooks
Sybren Stuvel wrote: There are over 2800 header files on my system in /usr/include. What do you mean a limited number of header files? I assume he's saying that the number is ∞. (Of course, the same is true of Python modules unless you use a special __import__ hook or something...) --

Re: help converting some perl code to python

2005-11-04 Thread Peter Otten
[EMAIL PROTECTED] wrote: i need help with converting a piece of perl code to python the problem is the '..' operator in perl. Is there any equivalent in python? Here is a class that emulates the .. operator: code import sys import re start, files, end = map(re.escape, [[start], [files],

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Graham schreef [EMAIL PROTECTED]: Once again, many thanks, your explainations are very detailed and i think i'm in full understanding of the what/when/why of it all. And with further introspection i can see why its done this way from a language processing point of view rather

Re: how to compile c-extensions under WinXP?

2005-11-04 Thread Gerhard Häring
[EMAIL PROTECTED] wrote: What should I do to be able to compile C-extensions (with python 2.4, winXP)? I get an error message, approximately The .NET Framework SDK needs to be installed; I tried to get something from the Microsoft web site, but maybe not the right version (or didn't set

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 07:31:46 +, Antoon Pardon wrote: The model makes sense in my opinion. If you don't like it then there are plenty of other languages to choose from that have decided to implement things differently. And again this argument. Like it or leave it, as if one can't in

Re: Fork() and exec() dont work

2005-11-04 Thread Maciej Dziardziel
blahman ([EMAIL PROTECTED]) wrote: i m using Windows XP, and by tomorrow i will have have fedora core installed too. the problem is, when i use these fork() and exec() my windows doesnt do anything, python gives an error about the module, the kind of error when u know u r wrong. is it

Re: Class Variable Access and Assignment

2005-11-04 Thread Steve Holden
Antoon Pardon wrote: Op 2005-11-04, Steve Holden schreef [EMAIL PROTECTED]: [...] I suppose ultimately I'm just more pragmatic than you. It has nothing to do with being more pragmatic. Being pragmatic is about how you handle things with real life projects. It has little to do with the

Re: how to compile c-extensions under WinXP?

2005-11-04 Thread Steve Holden
[EMAIL PROTECTED] wrote: What should I do to be able to compile C-extensions (with python 2.4, winXP)? I get an error message, approximately The .NET Framework SDK needs to be installed; I tried to get something from the Microsoft web site, but maybe not the right version (or didn't set

Re: Class Variable Access and Assignment

2005-11-04 Thread Steve Holden
Paul Rubin wrote: Stefan Arentz [EMAIL PROTECTED] writes: Are you seriously saying there's lots of Python projects that would break if this particular weirdness were fixed? I have no numbers of course. But, why is this a weirdness? Do you seriously think the number is larger than zero?

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-11-04, Steve Holden schreef [EMAIL PROTECTED]: [...] I suppose ultimately I'm just more pragmatic than you. It has nothing to do with being more pragmatic. Being pragmatic is about how you handle things

Re: Not Equal to Each Other?

2005-11-04 Thread ale . of . ginger
How do I 'define' set? Is there something to include (like import random)? while (choice == 3) and len(set(cellboard[0:8]))==len(cellboard[0:8]): # DEFINE TWO RANDOM VARIABLES (ONE FOR ARRAY, ONE FOR NUMBER VALUE) solvingrandom = random.randint(1,9) cellboardrandom =

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: There are good usage cases for the current inheritance behaviour. Can you name one? Any code that relies on it seems extremely dangerous to me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Steven D'Aprano schreef [EMAIL PROTECTED]: On Fri, 04 Nov 2005 07:31:46 +, Antoon Pardon wrote: The model makes sense in my opinion. If you don't like it then there are plenty of other languages to choose from that have decided to implement things differently. And again

Re: Class Variable Access and Assignment

2005-11-04 Thread Magnus Lycka
Antoon Pardon wrote: Would it be too much to ask that in a line like. x = x + 1. both x's would resolve to the same namespace? They always do Antoon. There is no such issue for local (or global) varibles. The issue has to do with c.x = c.x + 1. In this case it's clearly designed and

Re: Filepath string manipulation help

2005-11-04 Thread mjakowlew
Steve, the os commands don't run through zope, it denies access to them to be run at all through the webserver. So in turn, I had to use a work around to fix the IE problem. Also qwwee's suggestion to use: filepath.split('\\')[-1] works well too. Zope is very finicky about running specific

Re: Not Equal to Each Other?

2005-11-04 Thread Juho Schultz
[EMAIL PROTECTED] wrote: How do I 'define' set? Is there something to include (like import random)? set is a built-in type in Python 2.4 If you use 2.3 you can use the sets module with import sets while (choice == 3) and len(set(cellboard[0:8]))==len(cellboard[0:8]): # DEFINE TWO

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Magnus Lycka schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Would it be too much to ask that in a line like. x = x + 1. both x's would resolve to the same namespace? They always do Antoon. There is no such issue for local (or global) varibles. I meant those 'x' do be

Re: XML DOM: XML/XHTML inside a text node

2005-11-04 Thread Walter Dörwald
[EMAIL PROTECTED] wrote: In my program, I get input from the user and insert it into an XHTML document. Sometimes, this input will contain XHTML, but since I'm inserting it as a text node, xml.dom.minidom escapes the angle brackets ('' becomes 'lt;', '' becomes 'gt;'). I want to be able to

ExpatError attributes

2005-11-04 Thread Daniel Nogradi
According to the documentation the xml.parsers.expat module provides the exception ExpatError and this exception has 3 attributes, lineno, offset and code. I would like to use lineno, but can't. ExpatError itself works, for example if I do import sys from xml.dom import minidom from

Re: UART parity setting as mark or space (using Pyserial???)

2005-11-04 Thread Grant Edwards
On 2005-11-03, Petr Jakes [EMAIL PROTECTED] wrote: Using Pyserial it is possible to set the parity bit as ODD, EVEN or NONE. Correct. Those are the parity settings supported by pretty much all platforms. [...] Does anybody here knows some tricks how to set up the mark and space parity on

strange sockets

2005-11-04 Thread Skink
Hi, I'm preparing a python server that sends java classes and resources to custom java class loader. In order to make it faster I don't want to use URLClassLoader that uses HTTP protocol 1.0 and for each class/resource creates own connection. Instead I'd like to use raw sockets with simple

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Antoon Pardon wrote: Op 2005-11-03, Stefan Arentz schreef [EMAIL PROTECTED]: The model makes sense in my opinion. If you don't like it then there are plenty of other languages to choose from that have decided to implement things differently. And again this argument. Like it or leave it, as

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Steven D'Aprano wrote: On Thu, 03 Nov 2005 14:13:13 +, Antoon Pardon wrote: Fine, we have the code: b.a += 2 We found the class variable, because there is no instance variable, then why is the class variable not incremented by two now? Because b.a += 2 expands to b.a = b.a + 2.

pycrypto rsa inverse of p modulo q

2005-11-04 Thread jt
Looking up into Crypto.PublicKey.RSA, I see there is a computed value named u for which I can't see the use. The value of u is the inverse of p modulo q, in the code: obj.u = pubkey.inverse(obj.p, obj.q) Can someone tell me where this value could be used in the RSA scheme? (it is not used in

Re: __slots__ and class attributes

2005-11-04 Thread Ewald R. de Wit
Steven Bethard wrote: But why do you want a class level attribute with the same name as an instance level attribute? I would have written your class as: class A(object): __slots__ = ['value'] def __init__(self, value=1): self.value = value where the default value you

Re: I Need Motivation Part 2

2005-11-04 Thread projecktzero
[EMAIL PROTECTED] wrote: i m losing my motivation with python because there are sooo many modules If you think Python has too many modules, then you better stay away from Perl and CPAN. =) -- http://mail.python.org/mailman/listinfo/python-list

Re: reading a config file

2005-11-04 Thread Larry Bates
When I need something like this I have employed the following: [server_001] blah = some server destination=some destination [server_002] blah = some other server destination=some other destination [server_linux1] blah = some other server destination=some other destination Then I do something

Re: ExpatError attributes

2005-11-04 Thread Fredrik Lundh
Daniel Nogradi wrote: According to the documentation the xml.parsers.expat module provides the exception ExpatError and this exception has 3 attributes, lineno, offset and code. I would like to use lineno, but can't. try: minidom.parse(my.xml) except ExpatError: print 'The file

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Christopher Subich schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-11-03, Stefan Arentz schreef [EMAIL PROTECTED]: The model makes sense in my opinion. If you don't like it then there are plenty of other languages to choose from that have decided to implement things

Threading- Stopping

2005-11-04 Thread Tuvas
Is there a way to stop a thread with some command like t.stop()? Or any other neat way to get around it? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-04 Thread Antoon Pardon
Op 2005-11-04, Christopher Subich schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-11-03, Stefan Arentz schreef [EMAIL PROTECTED]: The model makes sense in my opinion. If you don't like it then there are plenty of other languages to choose from that have decided to implement things

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 09:03:56 +, Antoon Pardon wrote: Op 2005-11-03, Steven D'Aprano schreef [EMAIL PROTECTED]: On Thu, 03 Nov 2005 13:01:40 +, Antoon Pardon wrote: Seems perfectly sane to me. What would you expect to get if you wrote b.a = b.a + 2? I would expect a result

Re: Web automation with twill

2005-11-04 Thread qwweeeit
Hi Michele, I taught to be the smartest in town! But when the experts take the field it is better that us newbies retire in good order... Thank you for your article and, with respect to Grig Gheorghiu (another expert), I must apologize for having be a little rude. I hadn't discovered in Internet

How can I do this in Python?

2005-11-04 Thread Lad
Hi, I have a web program and a user can have access to a page only after he logged in. So, the program comes with a Login form and the user logins.But I do not know how to return the user back to where he came from, after a successful login. Something like this: PageWhereUserMustBeLogin

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Antoon Pardon wrote: Since ints are immutable objects, you shouldn't expect the value of b.a to be modified in place, and so there is an assignment to b.a, not A.a. You are now talking implementation details. I don't care about whatever explanation you give in terms of implementation

Re: help converting some perl code to python

2005-11-04 Thread [EMAIL PROTECTED]
The '..' operator is the flip-flop operator in perl. (It is rarely used.) It is exactly the same as the 'range' type operator. It returns false until the first condition is met, then it returns true until the last condition met, then it returns false. You could create a flip-flop with a python

Re: Web automation with twill

2005-11-04 Thread Michele Simionato
qwwwee: By the way, are you aware that C. Titus Brown (twill's author) tells peste e corna of Zope? No, but I am not surprised. I also say peste e corna of Zope ;) In general I am an anti-frameworks guy (in good company with many Pythonistas including Guido). Michele Simionato --

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Antoon Pardon wrote: Well I wonder. Would the following code be considered a name binding operation: b.a = 5 Try it, it's not. Python 2.2.3 (#1, Nov 12 2004, 13:02:04) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-42)] on linux2 Type help, copyright, credits or license for more information.

Shareware in Python

2005-11-04 Thread Ivan Sas
I want to create some shareware program in Python. Can I distribute this program with python24.dll file from Python 2.4.2? I'm not sure if Python GPL compatible license allowing for doing it. Thanks, Ivan Sas -- http://mail.python.org/mailman/listinfo/python-list

Re: I Need Motivation Part 2

2005-11-04 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: i m losing my motivation with python because there are sooo many modules, that i cant just learn them all, As other's have said, don't bother. If you ever need to use a module that you don't know, just go to http://docs.python.org/lib/lib.html (easily accessable

Re: Learning multiple languages (question for general discussion)

2005-11-04 Thread Alex Martelli
Magnus Lycka [EMAIL PROTECTED] wrote: Alex Martelli wrote: Yes, but I haven't found knowing (and using) Python dampens my enthusiasms for learning new languages. But you're more enthusiatic than most of us Alex. I wish I could say the same, but I must admit that I only did halfhearted

Re: Class Variable Access and Assignment

2005-11-04 Thread Magnus Lycka
Graham wrote: My question remains however, i suppose i'm not familiar with how this functions in other languages, but what is the common way of referring to a class variable. is class.var the norm? or instance.var the norm. It's not always that easy, due to inheritance. You might want the

Re: Cheapest pocket device to code python on

2005-11-04 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: What is the cheapest/affordable pocket device that I can code python on? I think the closest I have seen is pocketpc from this page: A used Fujitsu Lifebook running Linux and fairly large pockets? ;) There is some version of Python running on Palms, but it's stripped

Re: Class Variable Access and Assignment

2005-11-04 Thread Magnus Lycka
Antoon Pardon wrote: I have looked and didn't find it in the language reference. This is what I have found: An augmented assignment expression like x += 1 can be rewritten as x = x + 1 to achieve a similar, but not exactly equal effect. It's just a little further down. I'll post the

Re: Not Equal to Each Other?

2005-11-04 Thread [EMAIL PROTECTED]
will I have to write that out for each number? Not if you know how to use the 'for' statement. It will allow you to iterate through the rows or columns or whatnot. -- http://mail.python.org/mailman/listinfo/python-list

Re: Shareware in Python

2005-11-04 Thread David Wahler
Ivan Sas wrote: I want to create some shareware program in Python. Can I distribute this program with python24.dll file from Python 2.4.2? I'm not sure if Python GPL compatible license allowing for doing it. Thanks, Ivan Sas Python is distributed under its own license, not the GPL: see

Re: Threading- Stopping

2005-11-04 Thread David Wahler
Tuvas wrote: Is there a way to stop a thread with some command like t.stop()? Or any other neat way to get around it? Thanks! Sadly, no. While Java and many other programming languages have an interrupt() primitive, Python does not. You can approximate this by using a global variable to tell

Re: How can I do this in Python?

2005-11-04 Thread David Wahler
Lad wrote: Hi, I have a web program and a user can have access to a page only after he logged in. So, the program comes with a Login form and the user logins.But I do not know how to return the user back to where he came from, after a successful login. Something like this:

Re: Cheapest pocket device to code python on

2005-11-04 Thread Cameron Laird
In article [EMAIL PROTECTED], Sybren Stuvel [EMAIL PROTECTED] wrote: Devan L enlightened us with: I would not recommend trying to code on a handheld device. Small screen size and [usually] small keyboards make it less-than-practical. Stick with a laptop, or write it in a notebook, if you

Re: XML DOM: XML/XHTML inside a text node

2005-11-04 Thread uche . ogbuji
In my program, I get input from the user and insert it into an XHTML document. Sometimes, this input will contain XHTML, but since I'm inserting it as a text node, xml.dom.minidom escapes the angle brackets ('' becomes 'lt;', '' becomes 'gt;'). I want to be able to override this behavior

exec behaviour

2005-11-04 Thread N. Pourcelot
Hello, I can't understand some specific behaviour of the exec statment. For example, say that I create such a class A : class A: def __init__(self): self.n = 3 self.m = None def h(self, ini): n = self.n m = self.m if ini: exec(def m(x):

how to open a windows folder?

2005-11-04 Thread Bell, Kevin
I'd love to be able to open up a windows folder, like c:\temp, so that it pops up visually. I know how to drill down into a directory, but I can't figure out how to open one up on screen. Would I have to make a call to windows explorer in a similar way that I hit Excel with: from

RE: how to open a windows folder?

2005-11-04 Thread Tim Golden
[Bell, Kevin] I'd love to be able to open up a windows folder, like c:\temp, so that it pops up visually. I know how to drill down into a directory, but I can't figure out how to open one up on screen. Would I have to make a call to windows explorer in a similar way that I hit Excel

Re: how to open a windows folder?

2005-11-04 Thread Larry Bates
Not elegant but this works: import os os.system(r'start explorer.exe C:\temp') -Larry Bates Bell, Kevin wrote: I'd love to be able to open up a windows folder, like c:\temp, so that it pops up visually. I know how to drill down into a directory, but I can't figure out how to open one up on

RE: how to open a windows folder? THANKS!

2005-11-04 Thread Bell, Kevin
import os os.startfile (c:/temp) That was painless and did the trick! Thanks Tim! -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >