Re: The del statement

2008-05-08 Thread Arnaud Delobelle
George Sakkis wrote: > One of the few Python constructs that feels less elegant than > necessary to me is the del statement. For one thing, it is overloaded > to mean three different things: > (1) del x: Remove x from the current namespace > (2) del x[i]: Equivalent to x.__delitem__(i) > (3) del

Re: Am I missing something with Python not having interfaces?

2008-05-08 Thread Daniel Marcel Eichler
Am Mittwoch 07 Mai 2008 22:39:30 schrieb Luis Zarrabeitia: > There you have it, interfaces are not enough to ensure that the > implementors actually implement the methods. They are useful for > warning at compile time if there is a missing method, but nothing > more. It's not the fault of the en

python newbie: some surprises

2008-05-08 Thread v4vijayakumar
When I started coding in python, these two things surprised me. 1. my code is inconsistently indented with the combination of tabs and spaces. Even lines looked intended, but it is not. 2. python requires to pass "self" to all instance methods and I missed ":" often. :) -- http://mail.python.org

Re: strftime() argument 1 must be str, not unicode

2008-05-08 Thread Tim Roberts
"Andrii V. Mishkovskyi" <[EMAIL PROTECTED]> wrote: >2008/5/7 Alexandr N Zamaraev <[EMAIL PROTECTED]>: >> Subj is bag? >> >> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit >> (Intel)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> f

How to gather information about the system hardware?

2008-05-08 Thread Florencio Cano
Hi, I'm looking for a method of gathering information about the system hardware and software installed using Python. I would like to do it in UNIX and in Windows. I think that it would be good in Windows to look in the registry and be able to parse and search it. Any pointer to information would be

Re: Am I missing something with Python not having interfaces?

2008-05-08 Thread Daniel Marcel Eichler
Am Donnerstag 08 Mai 2008 00:12:26 schrieb [EMAIL PROTECTED]: > very often sees do-nothing catch-all try/catch blocks in Java - which > is way worse than just letting the exception propagate. I find all > this totally pointless, because there's just no way for a compiler to > check if your code i

Re: python newbie: some surprises

2008-05-08 Thread Martin P. Hellwig
v4vijayakumar wrote: When I started coding in python, these two things surprised me. 1. my code is inconsistently indented with the combination of tabs and spaces. Even lines looked intended, but it is not. Even the standard editor Idle tries to guess the intendation, so this was never a probl

Problems with os.walk

2008-05-08 Thread Dominique.Holzwarth
Hi everyone The following code: scriptPath = os.path.dirname(__file__) (dirpath, dirnames, filenames) = os.walk(scriptPath) print 'dirpath\n' print dirpath print 'dirnames\n' pprint.pprint(dirnames) print 'filenames\n' pprint.pprint(filnames) Fails on the os.walk call with the following error:

Re: What is the purpose of ptyhon in Windows

2008-05-08 Thread [EMAIL PROTECTED]
On May 7, 9:35 pm, Max Erickson <[EMAIL PROTECTED]> wrote: > WolfgangZ <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] schrieb: > >> hi All, > >>http://mail.python.org/mailman/listinfo/python-list > > > At least I'm living in a free country and nobody forces me to > > learn python. So I don't full

Re: DISLIN 9.3 stuck

2008-05-08 Thread michels
On 8 Mai, 02:55, adolfo <[EMAIL PROTECTED]> wrote: > ... > 1- The strange thing is that I went to thedislindirectory in the C: > drive and there was no disli.pyd file anywhere. I found the file in > the My Documents subdirectory where I had originally unzipped > thedislinarchived files I download

Re: anagram finder / dict mapping question

2008-05-08 Thread Kam-Hung Soh
On Thu, 08 May 2008 15:42:07 +1000, dave <[EMAIL PROTECTED]> wrote: This is what i've came up with. My problem is that I can't get them to properly evaluate.. when comparewords() runs it finds itself... Should I have the keys of mapdict iterate over itself? Is that possible? def annaf

Re: strftime() argument 1 must be str, not unicode

2008-05-08 Thread Alexandr N Zamaraev
Tim Roberts wrote: > I think that's a perfectly reasonable thing to expect. At the risk of > over-generalization, there is no good reason why, by this point in time, > all of the standard library routines that accept strings shouldn't also > accept Unicode strings. However, file(fname), open(fnam

Re: strftime() argument 1 must be str, not unicode

2008-05-08 Thread Andrii V. Mishkovskyi
2008/5/8 Tim Roberts <[EMAIL PROTECTED]>: > "Andrii V. Mishkovskyi" <[EMAIL PROTECTED]> wrote: > > >2008/5/7 Alexandr N Zamaraev <[EMAIL PROTECTED]>: > > >> Subj is bag? > >> > >> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit > >> (Intel)] on win32 > >> Type "help", "co

POP connection timeout.

2008-05-08 Thread Aspersieman
Hi All I am have written an application that queries a POP mailbox and downloads messages. When the application tries to connect to the mail server, but takes too long (eg. longer than 60 seconds) I want to have it time out. Something like try: pop = poplib.POP3(POPHOST, POPPORT) except

Re: The del statement

2008-05-08 Thread Duncan Booth
Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > George Sakkis wrote: >> One of the few Python constructs that feels less elegant than >> necessary to me is the del statement. For one thing, it is overloaded >> to mean three different things: >> (1) del x: Remove x from the current namespace >>

Re: The Importance of Terminology's Quality

2008-05-08 Thread John Thingstad
På Thu, 08 May 2008 04:14:35 +0200, skrev Kyle McGivney <[EMAIL PROTECTED]>: • Module, Block, in Mathematica is in lisp's various “let*”. The lisp's keywords “let”, is based on the English word “let”. That word is one of the English word with multitudes of meanings. If you look

Re: explain this function to me, lambda confusion

2008-05-08 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Here is a simple lambda that implements an exclusive or: > def XOR(x,y) : return lambda : ( ( x ) and not ( y ) ) or ( not ( x ) and ( y ) ) > > (Because of the resemblance to C macros, I have been cautious and > written the lambda with lots of parentheses

Re: The Importance of Terminology's Quality

2008-05-08 Thread kodifik
>          |   PLEASE DO NOT   |            :.:\:\:/:/:.: >          |  FEED THE TROLLS  |           :=.' -   - '.=: I don't think Xah is trolling here (contrary to his/her habit) but posing an interesting matter of discussion. Don't know to which point it fits, but I w

Re: Problems with os.walk

2008-05-08 Thread Hrvoje Niksic
<[EMAIL PROTECTED]> writes: > (dirpath, dirnames, filenames) = os.walk(scriptPath) You're supposed to loop over values in different directories, like this: for dirpath, dirnames, filenames in os.walk(scriptPath): ... handle dirpath with dirnames and filenames ... The loop will be execut

Re: How to gather information about the system hardware?

2008-05-08 Thread s0suk3
On May 8, 2:14 am, "Florencio Cano" <[EMAIL PROTECTED]> wrote: > Hi, > I'm looking for a method of gathering information about the system > hardware and software installed using Python. I would like to do it in > UNIX and in Windows. I think that it would be good in Windows to look > in the registr

Re: The del statement

2008-05-08 Thread Arnaud Delobelle
Duncan Booth wrote: > Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > > > > > George Sakkis wrote: > >> One of the few Python constructs that feels less elegant than > >> necessary to me is the del statement. For one thing, it is overloaded > >> to mean three different things: > >> (1) del x: R

Python module for SNMP bindings ?

2008-05-08 Thread Banibrata Dutta
Hi, While looking around for Python API's to do SNMP, found the following link with a high level comparison -- http://urchin.earth.li/~twic/SNMP_in_Python.html i.e. options seems to be: PySNMP (complete SNMP impl.), SNMPy, yapSNMP (Net-SNMP bindings). Of those, yapSNMP seems to be most promising

Re: Can't drag and drop onto .py in Windows XP?

2008-05-08 Thread Sizer
"Roger Upole" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Sizer wrote: >> It's just a little weird that I >> can't just drag and drop file names onto .pyw or .py files. Am I >> missing something here? >> >> Thanks for any help. > > You can register a DropHandler for the Python file cla

Re: The del statement

2008-05-08 Thread Duncan Booth
Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > Duncan Booth wrote: >> Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >> >> > >> > >> > George Sakkis wrote: >> >> One of the few Python constructs that feels less elegant than >> >> necessary to me is the del statement. For one thing, it is overlo

Re: how to use subprocess.Popen execute "find" in windows

2008-05-08 Thread Gabriel Genellina
En Wed, 07 May 2008 23:29:58 -0300, <[EMAIL PROTECTED]> escribió: > On 5月7日, 上午9时45分, Justin Ezequiel <[EMAIL PROTECTED]> > wrote: >> On May 6, 5:19 pm, [EMAIL PROTECTED] wrote: >> >> > p1 = Popen(['netstat', '-an'], stdout = PIPE) >> > p2 = Popen(['find', '"445"'], stdin = p1.stdout, stdout = PI

Re: PHP + TinyButStrong Python replacement

2008-05-08 Thread pistacchio
[EMAIL PROTECTED] ha scritto: On 7 mai, 16:17, pistacchio <[EMAIL PROTECTED]> wrote: George Sakkis ha scritto: (snip) What does it matter if it's a single file or a dozen under a package ? "Installation" for pure Python packages can be as simple as copying the package under any directory in yo

Re: The Importance of Terminology's Quality

2008-05-08 Thread Robert Maas, http://tinyurl.com/uh3t
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > the importance of naming of functions. I agree, that's a useful consideration in the design of any system based on keywords, such as names of functions or operators. (I'm not using "keyword" in the sense of a symbol in the KEYWORD package.) > the

Re: pickle problem

2008-05-08 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I'm wondering if anyone can help with a workaround for a problem I > currently have. I'm trying to set up a prefork tcp server. > Specifically, I'm setting up a server that forks children and has them > listen on pipes created with os.pipe(). The parent process for the

Re: The Importance of Terminology's Quality

2008-05-08 Thread Lew
[EMAIL PROTECTED] wrote: | PLEASE DO NOT |:.:\:\:/:/:.: | FEED THE TROLLS | :=.' - - '.=: I don't think Xah is trolling here (contrary to his/her habit) but posing an interesting matter of discussion. Interesting is in the eye of the beholder.

Re: The Importance of Terminology's Quality

2008-05-08 Thread Lew
Robert Maas, http://tinyurl.com/uh3t wrote: I have my own gripe against regular expressions ("regex" for short). I hate the extremely terse format, with horrible concoctions of escape and anti-escape magic characters, to fit within Unix's 255-character limit on command lines, compared to a nicely

Re: Newbie to python --- why should i learn !

2008-05-08 Thread A.T.Hofkamp
On 2008-05-08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? Yes, and all programs that people write typically look like the hello world program. Loo

Re: Am I missing something with Python not having interfaces?

2008-05-08 Thread J. Clifford Dyer
On Thu, 2008-05-08 at 09:12 +0200, Daniel Marcel Eichler wrote: > Am Mittwoch 07 Mai 2008 21:48:56 schrieben Sie: > > > > That's the point. Interfaces garantee that a duck is a duck, an not > > > only a chicken that quack. > > Which, in spite of your rhetorical flourish, is the exact opposite of >

Re: PHP + TinyButStrong Python replacement

2008-05-08 Thread Jeroen Ruigrok van der Werven
-On [20080507 15:06], Mike Driscoll ([EMAIL PROTECTED]) wrote: >http://genshi.edgewall.org/ >http://www.kid-templating.org/ >http://www.cheetahtemplate.org/ >http://turbogears.org/ Add the following to that list: http://jinja.pocoo.org/ http://www.makotemplates.org/ I think Jinja and Mako are cu

Re: Newbie to python --- why should i learn !

2008-05-08 Thread s0suk3
On May 8, 5:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? > > what can i do easily with python which is not easy in c++/java !? > Are you a

Urgent opening for Engineer (Open Source Technologies)

2008-05-08 Thread ranjan
Hi,This is regarding an opening for software Engineer(Open Source Technologies) The opening is with our client for their Noida branch.They are working on various platforms like Microsoft,Open Source Technology. The designation will be of software engineer/senior software engineer. Skillset Required

Re: Newbie to python --- why should i learn !

2008-05-08 Thread pistacchio
[EMAIL PROTECTED] ha scritto: Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. What's different (except syntax) ? well, it's similar in the sense that it is a programming language. So you can say that assembly is similar to BASIC, but t

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-08 Thread Brian Vanderburg II
This is sort of related, but I'm wondering what is different between "#!/usr/bin/env python" and "#!python". Wouldn't the second do the same thing, since an absolute path is not specified, find 'python' from the PATH environment, I don't really know. Brian Vanderburg II -- http://mail.python

Re: Newbie to python --- why should i learn !

2008-05-08 Thread maxinbjohn
Hi Raxit, One of the the tempting features of Python is that it is fun to code in Python. If you are really trying to learn python, you should read Adventures with Neko (http://gnuvision.com/books/pybook/) . It is an introductory book on Python programming for school children by Mr. Pramode CE. I

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-08 Thread Michael Mabin
For me, the difference is #!python doesn't work for me. I get a bad interpreter error. On Thu, May 8, 2008 at 6:31 AM, Brian Vanderburg II < [EMAIL PROTECTED]> wrote: > This is sort of related, but I'm wondering what is different between > "#!/usr/bin/env python" and "#!python". Wouldn't the se

RE: Newbie to python --- why should i learn !

2008-05-08 Thread Mark Jordaan
pls dont learn it Move on The world is full enough of 9 to 5 coders Mark> From: [EMAIL PROTECTED]> Subject: Newbie to python --- why should i learn !> Date: Thu, 8 May 2008 03:25:17 -0700> To: python-list@python.org> > Hi,> > i was reading/learning some hello world program in python.> I th

Re: Generate labels for a multi-level outline

2008-05-08 Thread python
Castironpi, > Do you want send and throw in it too? If its not too much trouble, I would love to see how you add these. > formatter.NullFormatter.format_counter > formatter.NullFormatter.format_letter > formatter.NullFormatter.format_roman I'm not sure what you mean by the above lines ... ...

framework build question for mac

2008-05-08 Thread Brian Blais
Hello, I just had to install an older version of python for a particular app. Afterward, I had some necessary clean-up so that my normal work python would work, but I noticed something odd about the installation. Python is installed on the Mac in the directory /Library/Frameworks/Python

Re: Newbie to python --- why should i learn !

2008-05-08 Thread cokofreedom
C# using System; namespace HelloWorld { Class HelloWorld { static void Main(String[] args) { Console.WriteLine("Hello World"); } } } -- http://mail.python.org/mailman/listinfo/python-list

python equivalent to perl's inplace edit mechanism

2008-05-08 Thread Michael Mabin
Does python have an equivalent to Perl's inplace-edit variable $^I? For example, the following perl code below changes mike to dave in a file that is passed as an argument. #!/usr/bin/env perl #chgit script $^I = ''; while(<>) { s/mike/dave/g; print; } The script would be used as below: chgit

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Krishnakant Mane
hello, I have programmed co insidentally in all the 3 languages. so out of my experience of 10 + years, I got my personal share of reasons to prefer python over the other 2 namely c++ and java. firstly as every one has already explained, python is easy, fun to learn and can do many things much prod

Re: Idea for P3K

2008-05-08 Thread Diez B. Roggisch
M�ta-MCI (MVP) wrote: > Hi! > >> I don't often feel like using this word > > Look at languages like OCAML or F # The point being? Yes, shockingly enough other languages have other syntax & semantics. Diez -- http://mail.python.org/mailman/listinfo/python-list

POP connection timeout.

2008-05-08 Thread Aspersieman
Hi All I have written an application that queries a POP mailbox and downloads messages. When the application tries to connect to the mail server, but takes too long (eg. longer than 60 seconds) I want to have it time out. Something like try: pop = poplib.POP3(POPHOST, POPPORT) except some

Re: Writing elapsed time as a string

2008-05-08 Thread Gabriel Genellina
En Fri, 02 May 2008 16:13:41 -0300, Simon Pickles <[EMAIL PROTECTED]> escribió: > I'm sorry if this has been asked a thousand (million) times. > > Is there a nifty pythonesque way to produce a string representing an > elapsed time period, in terms of years, months, days, hours, mins, seconds? > >

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-08 Thread D'Arcy J.M. Cain
On Thu, 08 May 2008 07:31:17 -0400 Brian Vanderburg II <[EMAIL PROTECTED]> wrote: > This is sort of related, but I'm wondering what is different between > "#!/usr/bin/env python" and "#!python". Wouldn't the second do the same > thing, since an absolute path is not specified, find 'python' from

Re: python equivalent to perl's inplace edit mechanism

2008-05-08 Thread David
> #!/usr/bin/env perl > #chgit script > $^I = ''; > while(<>) { > s/mike/dave/g; > print; > } > #!/usr/bin/python import sys lines = open(sys.argv[1]).readlines() open(sys.argv[1], 'w').writelines([line.replace('mike', 'dave') for line in lines]) -- http://mail.python.org/mailman/listinfo/pyth

Re: python equivalent to perl's inplace edit mechanism

2008-05-08 Thread Gabriel Genellina
En Thu, 08 May 2008 09:11:56 -0300, Michael Mabin <[EMAIL PROTECTED]> escribió: > Does python have an equivalent to Perl's inplace-edit variable $^I? > For example, the following perl code below changes mike to dave in a file > that is passed as an argument. > > #!/usr/bin/env perl > #chgit script

Re: slicing lists

2008-05-08 Thread Boris Borcic
Yves Dorfsman wrote: So would it be a worthy addition to python, to add it right in the core of the language, and hopefully in an efficient manner ? Note that the s[0,2:6] syntax is currently allowed because of the distinct semantics that the Numeric module and its successors numarray and

Re: Problems with os.walk

2008-05-08 Thread Scott David Daniels
Hrvoje Niksic wrote: <[EMAIL PROTECTED]> writes: (dirpath, dirnames, filenames) = os.walk(scriptPath) You're supposed to loop over values in different directories, like this: for dirpath, dirnames, filenames in os.walk(scriptPath): ... handle dirpath with dirnames and filenames ...

Re: python equivalent to perl's inplace edit mechanism

2008-05-08 Thread David
On Thu, May 8, 2008 at 2:11 PM, Michael Mabin <[EMAIL PROTECTED]> wrote: > Does python have an equivalent to Perl's inplace-edit variable $^I? > I misread your question. No, Python eschews magic characters and symbols. They make code ugly and harder to read and maintain. The first 3 lines of the

Re: POP connection timeout.

2008-05-08 Thread Scott David Daniels
Aspersieman wrote: I have written an application that queries a POP mailbox and ... > I want to have it time out I know that in python 2.5 I could pass an additional timeout parameter to the above statement ( ie: pop = poplib.POP3(POPHOST, POPPORT, TIMEOUTINSECONDS), but I am using python

Re: POP connection timeout.

2008-05-08 Thread Gabriel Genellina
En Thu, 08 May 2008 09:24:37 -0300, Aspersieman <[EMAIL PROTECTED]> escribió: > I have written an application that queries a POP mailbox and > downloads messages. When the application tries to connect to the mail > server, but takes too long (eg. longer than 60 seconds) I want to have > it time ou

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-08 Thread Brian Vanderburg II
D'Arcy J.M. Cain wrote: On Thu, 08 May 2008 07:31:17 -0400 Brian Vanderburg II <[EMAIL PROTECTED]> wrote: This is sort of related, but I'm wondering what is different between "#!/usr/bin/env python" and "#!python". Wouldn't the second do the same thing, since an absolute path is not specifi

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Eduardo O. Padoan
On Thu, May 8, 2008 at 7:25 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? > > what can i do easily with python which is not easy in c++/java !

Parsing Email 'References' header.

2008-05-08 Thread Aspersieman
Hi I have a python script that parses email headers to extract information from them. I need to get the _last_ messageid in the 'References' field (http://cr.yp.to/immhf/thread.html) to create a threaded view of these emails (these messageid's are stored in a database). Now, I can easily acc

PCBuild.sin - Attempt to compile Python using Visual Studio 2008

2008-05-08 Thread Colin J. Williams
The readme.txt has: All you need to do is open the workspace "pcbuild.sln" in Visual Studio, select the desired combination of configuration and platform and eventually build the solution. Unless you are going to debug a problem in the core or you are going to create an optimized build you w

listen on TCP port

2008-05-08 Thread petr . poupa
Hello, is it possibble listening on TCP port by python and how? I am trying chilkat but poorly :(. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: POP connection timeout.

2008-05-08 Thread Aspersieman
Gabriel Genellina wrote: Use socket.setdefaulttimeout(timeout_in_seconds) before you create the POP3 object; this value will be used by the initial connect. Once it is connected, you can set a different timeout for retrieving mail using pop.sock.settimeout(...) Note that setdefaulttimeout appl

Re: Parsing Email 'References' header.

2008-05-08 Thread David
On Thu, May 8, 2008 at 2:53 PM, Aspersieman <[EMAIL PROTECTED]> wrote: > Hi > > I have a python script that parses email headers to extract information > from them. I need to get the _last_ messageid in the 'References' field > (http://cr.yp.to/immhf/thread.html) to create a threaded view of these

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Marc 'BlackJack' Rintsch
On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote: > Are you a newbie to Python, or to programming in general? I'll assume > you are a newbie to programming in general because of that last > question you asked. Things in Python are easier than in almost any > other programming language. Here are th

Re: web client in Python Q

2008-05-08 Thread Jerry Hill
On Wed, May 7, 2008 at 11:22 PM, Jive Dadson <[EMAIL PROTECTED]> wrote: > I wonder why it does not work with > > http://stockcharts.com/webcgi/wb.exe?Data.web+SLW It looks like that is a subscription site. That makes things more complicated, because it means you'll need to figure out how to log

Re-launch of The Gadgets Forum

2008-05-08 Thread Blue Pikes
Re-launch of The Gadgets Forum Re-launch of "The Gadgets Forum - gadgets.pk" with new and stunning categories, now you can find latest news and reviews about the following: 1) Audio/Video Gadgets = MP3 Players, iPods, Speakers, Audio/Video Systems,

Re: PCBuild.sin - Attempt to compile Python using Visual Studio 2008

2008-05-08 Thread Gabriel Genellina
En Thu, 08 May 2008 09:55:36 -0300, Colin J. Williams <[EMAIL PROTECTED]> escribió: > The readme.txt has: > > All you need to do is open the workspace > "pcbuild.sln" in Visual Studio, > select the desired combination of > configuration and platform and eventually > build the solution. Unless you

Re: Parsing Email 'References' header.

2008-05-08 Thread David
> > "<.*>(<.*?>)" > Doesn't work if there is only one e-mail address: Here's another one: "<[^<]+>$" -- http://mail.python.org/mailman/listinfo/python-list

Re: PCBuild.sin - Attempt to compile Python using Visual Studio 2008

2008-05-08 Thread Colin J. Williams
Colin J. Williams wrote: The readme.txt has: All you need to do is open the workspace "pcbuild.sln" in Visual Studio, select the desired combination of configuration and platform and eventually build the solution. Unless you are going to debug a problem in the core or you are going to create an

Re: Parsing Email 'References' header.

2008-05-08 Thread J. Cliff Dyer
On Thu, 2008-05-08 at 14:53 +0200, Aspersieman wrote: > Hi > > I have a python script that parses email headers to extract information > from them. I need to get the _last_ messageid in the 'References' field > (http://cr.yp.to/immhf/thread.html) to create a threaded view of these > emails (the

Re: Newbie to python --- why should i learn !

2008-05-08 Thread pistacchio
Marc 'BlackJack' Rintsch ha scritto: On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote: Are you a newbie to Python, or to programming in general? I'll assume you are a newbie to programming in general because of that last question you asked. Things in Python are easier than in almost any other p

"prove"

2008-05-08 Thread Lucas Prado Melo
Hello, How could I "prove" to someone that python accepts this syntax using the documentation (I couldn't find it anywhere): classname.functionname(objectname) -- http://mail.python.org/mailman/listinfo/python-list

Re: listen on TCP port

2008-05-08 Thread J. Cliff Dyer
On Thu, 2008-05-08 at 05:56 -0700, [EMAIL PROTECTED] wrote: > Hello, > is it possibble listening on TCP port by python and how? I am trying > chilkat but poorly :(. > > Thanks > -- > http://mail.python.org/mailman/listinfo/python-list > You just asked this exact same question yesterday, and got

Re: The del statement

2008-05-08 Thread George Sakkis
On May 8, 2:58 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > One of the few Python constructs that feels less elegant than > > necessary to me is the del statement. For one thing, it is overloaded > > to mean three different things: > > (1) del x: Remove x from the curr

Re: PCBuild.sin - Attempt to compile Python using Visual Studio 2008

2008-05-08 Thread Tim Golden
Gabriel Genellina wrote: En Thu, 08 May 2008 09:55:36 -0300, Colin J. Williams <[EMAIL PROTECTED]> escribió: The readme.txt has: All you need to do is open the workspace "pcbuild.sln" in Visual Studio, select the desired combination of configuration and platform and eventually build the solut

Troubles with 'self'

2008-05-08 Thread Richard Speaker
I'm somewhat new to Python... and programming in general. I know enough to be dangerous for sure. I have a feeling the solution to this is simple. I'm having trouble getting 'self' to initialize or work in a class application. I keep getting the message: LogFile = self.BasicSummary (

Best technology for agent/web server architecture

2008-05-08 Thread Florencio Cano
Hi, I would be interested in your opinion about what technology you considear the ideal technology for implementing in Python an agent that should comunicate information to a web server. I have read about SOAP but I'm now sure if this will be the right one. The aim of the agent is gather inventory

ANN: Assembly Line 0.5

2008-05-08 Thread Greg Ewing
I've uploaded a new version of my PyWeek 6 game, Assembly Line. http://media.pyweek.org/dl/6/gregpw6/AssemblyLine-0.5.zip As a potential Pyggy entry, I'm keen to get some testing and feedback on it. This version is greatly expanded. Some of the new features include: * More machine types

Re: "prove"

2008-05-08 Thread David
> classname.functionname(objectname) Do you mean something like this? class myclass: @staticmethod def myfunction(myobject): pass myobject = None myclass.myfunction(myobject) If so, then you want to check the staticmethod decorator, described here: http://docs.python.org/lib/built-in-

Re: PCBuild.sin - Attempt to compile Python using Visual Studio 2008

2008-05-08 Thread Colin J. Williams
Gabriel Genellina wrote: En Thu, 08 May 2008 09:55:36 -0300, Colin J. Williams <[EMAIL PROTECTED]> escribió: The readme.txt has: All you need to do is open the workspace "pcbuild.sln" in Visual Studio, select the desired combination of configuration and platform and eventually build the solut

Re: "prove"

2008-05-08 Thread Marco Mariani
Lucas Prado Melo wrote: How could I "prove" to someone that python accepts this syntax using the documentation (I couldn't find it anywhere): classname.functionname(objectname) TUtorial 9.3.4, method objects What exactly happens when a method is called? You may have noticed that x.f() was ca

Re: python equivalent to perl's inplace edit mechanism

2008-05-08 Thread Michael Mabin
I miswrote my question. But I still completely understand. What I really wanted to know was whether there was something equivalent to how perl can perform inplace edits of a file with something like the magic $^I variable. I see from Gabriel that you can use the fileinput module to achieve thi

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Marc 'BlackJack' Rintsch
On Thu, 08 May 2008 15:49:01 +0200, pistacchio wrote: > Marc 'BlackJack' Rintsch ha scritto: >> On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote: >> >>> Are you a newbie to Python, or to programming in general? I'll assume >>> you are a newbie to programming in general because of that last >>> qu

observer pattern question #1 (reference to subject)

2008-05-08 Thread Alan Isaac
I have two questions about the "observer pattern" in Python. This is question #1. (I'll put the other is a separate post.) Here is a standard example of the observer pattern in Python: http://en.wikipedia.org/wiki/Observer_pattern Contrast with this rather standard discussion: http:/

source beautifier

2008-05-08 Thread Marco Mariani
Is there a program (free, payware, whatever) like polystyle for linux/python? http://www.polystyle.com/features/python-beautifier.jsp I've never used it, but the example is quite clear. I just need it for python -- but it should not force me to use PEP8. -- http://mail.python.org/mailman/lis

Re: Generate labels for a multi-level outline (THANK-YOU!)

2008-05-08 Thread python
Dennis, > I was a touch bored in the last hour at work today so... Thank you!! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

observer pattern question #2 (notification chain)

2008-05-08 Thread Alan Isaac
I have two questions about the "observer pattern" in Python. This is question #2. (I'll put the other is a separate post.) Consider this standard example of the observer pattern in Python: http://en.wikipedia.org/wiki/Observer_pattern> Now suppose I have a variant. (I am not a programm

Re: observer pattern question #1 (reference to subject)

2008-05-08 Thread Ville M. Vainio
Alan Isaac <[EMAIL PROTECTED]> writes: > Is anything lost by not maintaining this reference (other > > than error checking ...)? If I feel the observer needs > > access to the subject, what is wrong with just having the > > subject pass itself as part of the notification? It reduces the number

Re: The Importance of Terminology's Quality

2008-05-08 Thread Sherman Pendley
[EMAIL PROTECTED] writes: >>          |   PLEASE DO NOT   |            :.:\:\:/:/:.: >>          |  FEED THE TROLLS  |           :=.' -   - '.=: > > I don't think Xah is trolling here (contrary to his/her habit) > but posing an interesting matter of discussion. It might

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Gary Herron
[EMAIL PROTECTED] wrote: Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. What's different (except syntax) ? what can i do easily with python which is not easy in c++/java !? With Python, you can program with a smile on your face. (Tr

How to kill Python interpreter from the command line?

2008-05-08 Thread spectrumdt
Hello. I am running Fedora Linux and KDE, using the Konsole command line. When coding Python, I regularly make a bug causing my program to not terminate. But how do I kill the non-terminating Python interpreter without killing the entire Konsole? The default way of killing the current process on

Re: Custom Classes?

2008-05-08 Thread Victor Subervi
Okay, trying this again with everything working and no ValueError or any other errors, here we go: Load this code. Unless you use a similar login() script, you will want to edit your own values into the user, passwd, db and host: #!/usr/bin/python import MySQLdb import sys,os sys.path.append(os

Re: How to kill Python interpreter from the command line?

2008-05-08 Thread Jean-Paul Calderone
On Thu, 8 May 2008 08:29:33 -0700 (PDT), [EMAIL PROTECTED] wrote: Hello. I am running Fedora Linux and KDE, using the Konsole command line. When coding Python, I regularly make a bug causing my program to not terminate. But how do I kill the non-terminating Python interpreter without killing th

Re: How to kill Python interpreter from the command line?

2008-05-08 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello. > > I am running Fedora Linux and KDE, using the Konsole command line. > > When coding Python, I regularly make a bug causing my program to not > terminate. But how do I kill the non-terminating Python interpreter > without killing the entire Konsole? > > The d

Re: How to kill Python interpreter from the command line?

2008-05-08 Thread Marco Mariani
[EMAIL PROTECTED] wrote: The default way of killing the current process on the command line is Ctrl+C, but that doesn't work with Python. It should work. Do you have a bare except: which intercepts SystemExit as well? If so, be as specific as possible in what you intercept, or at least catc

Re: pickle problem

2008-05-08 Thread krustymonkey
On May 8, 5:48 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I'm wondering if anyone can help with a workaround for a problem I > > currently have. I'm trying to set up a prefork tcp server. > > Specifically, I'm setting up a server that forks children and has th

Re: Running a python code periodically

2008-05-08 Thread Maryam Saeedi
I was wondering if you know how can I run a python code once every five minutes for a period of time either using python or some other program like a bash script. I have asked this question before and some of you answered me but I still have problem. Most of the answers was to use cron and crontab

Re: Running a python code periodically

2008-05-08 Thread Amitabh Saikia
write a bash script(to run your program at intervals) and run the bash script with nohup - [EMAIL PROTECTED] On Thu, May 8, 2008 at 9:02 AM, Maryam Saeedi <[EMAIL PROTECTED]> wrote: > I was wondering if you know how can I run a python code once every five > minutes for a period of time either us

Re: Writing elapsed time as a string

2008-05-08 Thread M.-A. Lemburg
On 2008-05-08 14:31, Gabriel Genellina wrote: En Fri, 02 May 2008 16:13:41 -0300, Simon Pickles <[EMAIL PROTECTED]> escribió: I'm sorry if this has been asked a thousand (million) times. Is there a nifty pythonesque way to produce a string representing an elapsed time period, in terms of years

Re: Running a python code periodically

2008-05-08 Thread Maryam Saeedi
Can you please explain it a little more? I do not have that much experience! I really appreciate it if you can share a sample code if you have one. Thanks On Thu, May 8, 2008 at 11:07 AM, Amitabh Saikia <[EMAIL PROTECTED]> wrote: > write a bash script(to run your program at intervals) and run th

  1   2   3   >