formEncode and validation depended on forms field

2006-05-17 Thread Grzegorz Ślusarek
Hi all. I'm using formEncode to validate my forms, and I'm stopped on how to do a complicated validation that depened on what forms element was filled. I mean in my code (without formEncode) i have: if form.select is checked: #if select is checked then I checked for others fields on form #i

Re: build now requires Python exist before the build starts

2006-05-17 Thread Toon Knapen
[EMAIL PROTECTED] wrote: > > It shouldn't actually be required. I'm assuming the problem is while > trying to run asdlgen.py. The generated files are checked in, but the > timestamps are wrong and the Makefile is trying to be helpful. > > Try: > touch Include/Python-ast.h Python/Python-ast.c

CFLAGS are not taken into account properly

2006-05-17 Thread Toon Knapen
To configure python on a Solaris 9 box with sunstudio11 installed and to compile it in 64bit, I execute following: export CC=cc export CFLAGS="-xarch=v9" export CXX=CC export CXXFLAGS="-xarch=v9" export F77=f77 export FFLAGS="-xarch=v9" export LDFLAGS="-xarch=v9" ./configure When doing 'make'

Re: Option parser question - reading options from file as well as command line

2006-05-17 Thread Tim N. van der Leeuw
Andrew Robert wrote: > Hi Everyone. > > > I tried the following to get input into optionparser from either a file > or command line. > > > The code below detects the passed file argument and prints the file > contents but the individual swithces do not get passed to option parser. > After reading

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Duncan Booth
achates wrote: > Duncan Booth wrote: > >>However the important thing is that a tab does >>not map to a single indentation level in Python: it can map to any >>number of indents, and unless I know the convention you are using to >>display the tabs I cannot know how many indents are equivalent to a

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Sybren Stuvel
Duncan Booth enlightened us with: > In particular a common convention is to have indentations at 4 > spaces and tabs expanding to 8 spaces. Aaaw that is SO ugly! Sure, it displays correctly on systems that have tab stops every 8 spaces given a monospaced font, but that is about all that is positiv

Re: the tostring and XML methods in ElementTree

2006-05-17 Thread George Sakkis
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > I wanted to see what would happen if one used the results of a tostring > > method as input into the XML method. What I observed is this: > > a) beforeCtag.text is of type > > b) beforeCtag.text when printed displays: I'm confused > > c) afte

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Sybren Stuvel
Duncan Booth enlightened us with: > It is strange. You use many of the same words as me, but they don't make > any sense. You forgot to add "to me" to the end of that sentence. Personally, Achates' words made perfect sense to me. > The point is about separating the presentation of the source fil

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Ant
I think Duncan has hit the nail on the head here really. I totally agree that conceptually using tabs for indentation is better than using spaces. Pragmatically though, you can't tell in an editor where spaces are used and where tabs are used. Perhaps if editors colored the background of tab chara

Re: Using python for a CAD program

2006-05-17 Thread Frithiof Andreas Jensen
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Cool. thanks for the links. I've already looked around quite a bit, > and am very hesitant to just write more shit on top of other shit. All software suck. If you think that yours will not then: a) you are a narcissist b) you are the

Re: simultaneous reading and writing a textfile

2006-05-17 Thread Marco Herrn
On 2006-05-16, Peter Otten <[EMAIL PROTECTED]> wrote: >> Now how can I achieve, what I want? Really exchange one line with >> another, regardless of their length. Is this possible? If this is not >> possible, then what would be the best approach to do this? > > A file is exposed as a sequence of by

Re: New blog

2006-05-17 Thread Steve Holden
vinu wrote: > Hi all, > http://pyadmin.blogspot.com/ > THis is my blog and This is related to python utilities for system and > network administration.plz comment on this > regards > Vineesh Kumar > The biggest problem seems to be the failure of indentation in the published code, which will ma

Re: Time to bundle PythonWin

2006-05-17 Thread Tim N. van der Leeuw
John Bokma wrote: > "Robert Hicks" <[EMAIL PROTECTED]> wrote: > > > No it isn't. > > Learn to quote when you use Google's Usenet garbage. > I don't know why you consider it 'garbage', using it myself for this 'contribution', but quoting isn't hard using google groups. Just clicking the right link

RE: simultaneous reading and writing a textfile

2006-05-17 Thread Mark Wilkinson
Why this: > lines = iter(infile.readline, "") > # copy one line at a time > for line in lines: Rather than this? > for line in infile: ..Mark This email and any attachment may contain confidential, privileged information for the sole use of the intended recipient. If you are not the intended

Re: Replace

2006-05-17 Thread Steve Holden
Anthra Norell wrote: > se = SE.SE (r' "~=.~=\=#') > se ('tyrtrbd =ffgtyuf == =tyryr =u=p ff') > > 'tyrtrbd =#fgtyuf =# =#yryr =#=# ff' > > > I am in the final stages of documenting my stream editor SE. There are quite > a few problems raised on this list which SE would handle elegan

Re: Time to bundle PythonWin

2006-05-17 Thread Steve Holden
Dave Benjamin wrote: > Hey folks, > > Why is PythonWin (win32all) still a separate download from a third party? > Is it legal, technical, or what? I think it's about time it be part of the > standard distribution. > Something that the other responders seem to have ignored is the separation of

Re: calling upper() on a string, not working?

2006-05-17 Thread Bruno Desthuilliers
John Salerno a écrit : > Bruno Desthuilliers wrote: > >>> def encrypt_quote(original): >> >> # Since it's here that we define that the new letters >> # will be uppercase only, it's our responsability >> # to handle any related conditions and problems >> # The other function

questions on python script compiling for embedding

2006-05-17 Thread [EMAIL PROTECTED]
Dear all, I am trying to embed python into another scripting language, to do this I need to solve a number of problems on importing or compiling python script. First let me state what exactly I want to do, that is, I want the following syntax to be supported in the host language which I am develop

RE: simultaneous reading and writing a textfile

2006-05-17 Thread Peter Otten
Mark Wilkinson wrote: > Why this: > >> lines = iter(infile.readline, "") >> # copy one line at a time >> for line in lines: > > Rather than this? > >> for line in infile: file.next() uses an internal cache. The data in that cache would be lost when the rest of the file is copied using file.rea

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Iain King
Ant wrote: > I think Duncan has hit the nail on the head here really. I totally > agree that conceptually using tabs for indentation is better than using > spaces. Pragmatically though, you can't tell in an editor where spaces > are used and where tabs are used. > Um, I don't follow this. If you

how to traverse network devices in our system?

2006-05-17 Thread chaks . yoper
hi all, i would like to know whether python can help me querying the network devices attached to my system (ethernet,wireless) and display their module name and vendor name? thank you. regards, chakkaradeep. -- http://mail.python.org/mailman/listinfo/python-list

Strange IO Error when extracting zips to a network location

2006-05-17 Thread Hari Sekhon
Hi, I've written a script to run on windows to extract all zips under a given directory path to another directory path as such: python extractzips.py The purpose of this script is to retrieve backup files which are individually zipped under a backup directory tree on a backup server. This

Re: [silly] Does the python mascot have a name ?

2006-05-17 Thread Andy Sy
Steve wrote: > umm, was just wondering, does the python mascot have a name ? We are naming > the > conference rooms in our office you see :o). > > Also, is there a place I could get some neat, good quality pics of the python > ? > > - steve The Python mascot is called Odi. http://mail.python

Tabs are evil, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Harry George wrote: > This has been discussed repeatedly, and the answer is "If you only > work alone, never use anyone else's code and no one ever uses your > codes, then do as you please. Otherwise use tab-is-4-spaces." > > When you do Agile Programming with people using emacs, vim, nedit, > x

Re: A Unicode problem -HELP

2006-05-17 Thread manstey
Hi Martin, Thanks very much. Your def comma_separated_utf8(items): approach raises an exception in codecs.py, so I tried = u", ".join(word_info + parse + gloss), which works perfectly. So I want to understand exactly why this works. word_info and parse and gloss are all tuples. does str convert t

RE: How to pass variables between scripts?

2006-05-17 Thread Gross, Dorit (SDRN)
Marcelo, thank you very much for your help!!! The script is running nicely now and I can pass the variables easily between the scripts. If someone else followed this topic ... a short note at the end. It seems that with the 'globvars' also the modules used by 'second.py' have to be passed. Someho

Tabs are *EVIL*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Please... just stop this senseless defense of a Rube-Goldberg feature. There will NEVER be a universal agreement on whether tabs should be 2, 3, 4 or 8 spaces in width, and this causes endless tweaking of editor settings (a *humongous* waste of time) to handle source code made by other programmers

Re: Python script windows servcie

2006-05-17 Thread Mivabe
Mivabe formulated the question : > > Google helped me discovering that it has something to do something with > 'CTRL_LOGOFF_EVENT'. I know what it means but i don't know how to solve it. > Is that something i have to configure in the script? > > I'n totally new to Python so maybe someone can poin

Re: Web framework to recommend (don't use one, use Spyce instead)

2006-05-17 Thread Andy Sy
Jacky wrote: > Hi all, > > I just started learning Python and would like to starting writing some > web-based applications with Python. > > I did have pretty much experience with doing so with PHP and Java, but > Python seems a bit different for me. > > Do you guys have some good web framework

RE: Python script windows servcie

2006-05-17 Thread Tim Golden
[Mivabe] | Mivabe formulated the question : | > | > Google helped me discovering that it has something to do | something with | > 'CTRL_LOGOFF_EVENT'. I know what it means but i don't know | how to solve it. | > Is that something i have to configure in the script? | > | > I'n totally new to Py

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread achates
Iain King wrote: >python -tt Indeed. I reckon the consensus here (to the extent that there is any!) is that it would be better if this was Python's default behaviour. The argument (not advanced by Iain but by others in this thread) that: novices will mix tabs and spaces => we should all use

RE: how to traverse network devices in our system?

2006-05-17 Thread Tim Golden
[EMAIL PROTECTED] | i would like to know whether python can help me querying the network | devices attached to my system (ethernet,wireless) and display their | module name and vendor name? Which OS? If it's windows, you can use WMI. I would guess Linux, tho', from your mention of module name. T

Re: Tabs are *EVIL*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread achates
Andy Sy wrote: >Don't be evil - always configure your editor to >convert tabs to true spaces. Yet another space-indenter demonstrates that problem actually lies with people who think that tab == some spaces. >And I, for the life of me, have never remembered >getting any source code to display pr

Re: how to traverse network devices in our system?

2006-05-17 Thread chaks . yoper
Hi Tim and all, Tim Golden wrote: > [EMAIL PROTECTED] > > | i would like to know whether python can help me querying the network > | devices attached to my system (ethernet,wireless) and display their > | module name and vendor name? > > Which OS? If it's windows, you can use WMI. I would > guess

index in for loops

2006-05-17 Thread manstey
in for loops like the following: word='abcade' for letter in word: print letter Is it possible to get the position of letter for any iteration through the loop? so for examlpe letter=='a', and I want to know if it is the first or second 'a' in 'abcade'. can i do this by looking at a proper

Re: index in for loops

2006-05-17 Thread Wojciech Muła
manstey wrote: > in for loops like the following: > > word='abcade' > > for letter in word: >print letter > > > Is it possible to get the position of letter for any iteration through > the loop? for index, letter in enumerate(word): print index, letter -- http://mail.python.org/mailma

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Ant
> Ant wrote: > > spaces. Pragmatically though, you can't tell in an editor where spaces > > are used and where tabs are used. > Um, I don't follow this. If you can't tell the editor where > tabs/spaces are used, who does? Re-read my post. Note the key word 'in'. > > Perhaps if editors colored t

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Ant
> Not that it's relevant, but I've never actually encountered anyone who > mixed tabs and spaces.. I've lived a sheltered life I guess. It's not individuals using a mixture, but when working in a development team of some kind. Consider person A who writes a file using spaces for indent. Person B t

Re: CFLAGS are not taken into account properly

2006-05-17 Thread skip
Toon> To configure python on a Solaris 9 box with sunstudio11 installed Toon> and to compile it in 64bit, I execute following: Toon> Toon> export CC=cc Toon> export CFLAGS="-xarch=v9" Toon> export CXX=CC Toon> export CXXFLAGS="-xarch=v9" Toon> export F77=f77 T

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Nick Craig-Wood
Ant <[EMAIL PROTECTED]> wrote: > I think Duncan has hit the nail on the head here really. I totally > agree that conceptually using tabs for indentation is better than using > spaces. As a programmer tabs appeal to our sense of neatness in python code. One tab for each level of indent - very ni

Re: arrays, even, roundup, odd round down ?

2006-05-17 Thread Serge Orlov
Lance Hoffmeyer wrote: > So, I have using the following to grab numbers from MS Word. I discovered > that that there is a "special" > rule being used for rounding. > > If a ??.5 is even the number is to rounded down (20.5 = 20) > if a ??.5 is odd the number is to rounded up (21.5 = 22) > > Brands

Re: Strange IO Error when extracting zips to a network location

2006-05-17 Thread Serge Orlov
Hari Sekhon wrote: > Hi, >I've written a script to run on windows to extract all zips under a > given directory path to another directory path as such: > > python extractzips.py files under this dir> > > The purpose of this script is to retrieve backup files which are > individually zipped un

Re: IDLE confusion

2006-05-17 Thread [EMAIL PROTECTED]
This isn't really an IDLE issue, it's a Python feature which needs to be understood. In Python, once you've imported a module once, importing it again is ignored. This works fine under the assumption that modules don't change during a single Python session. However, when you're developing a module

Re: Python script windows servcie

2006-05-17 Thread Serge Orlov
Mivabe wrote: > Mivabe formulated the question : > > > > Google helped me discovering that it has something to do something with > > 'CTRL_LOGOFF_EVENT'. I know what it means but i don't know how to solve it. > > Is that something i have to configure in the script? > > > > I'n totally new to Python

Re: Using python for a CAD program

2006-05-17 Thread Brendan
On 17-May-06, at 6:33 AM, comp.lang.python group wrote: >>I'd like my program >>to *look* slick, like it belongs in a movie or something. I think that >>means starting from scratch, since I've not seen any CAD program >>take >>any artistic/human/psychological approach to its design. >That *is* t

Re: Option parser question - reading options from file as well as command line

2006-05-17 Thread Andrew Robert
Tim N. van der Leeuw wrote: > Andrew Robert wrote: >> Hi Everyone. >> >> >> I tried the following to get input into optionparser from either a file >> or command line. >> >> >> The code below detects the passed file argument and prints the file >> contents but the individual swithces do not get pas

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Duncan Booth
achates wrote: > It's horrible but at least it would insulate me from the greater > hideousness of having to hit the spacebar like a madman at the start of > every line of code. I can even see how to get it to work in vi at > least. Hitting the spacebar like a madman? If you have a sensible edito

Re: common practice for creating utility functions?

2006-05-17 Thread bruno at modulix
Edward Elliott wrote: > Bruno Desthuilliers wrote: > > >>Then it would be better to just alias it: >> >># def convert_quote(quote): >># return make_code(quote) >>convert_quote = make_code > > > The former makes sense if you're planning to do more with the calling > function later. Then it

Re: assignment in a for loop

2006-05-17 Thread bruno at modulix
MackS wrote: (snip) >>What's preventing the use of list comprehensions? >> >>new_list = [x+1 for x in old_list] > > Suppose I want to do anything as trivial as modify the values of the > list members _and_ print their new values. Then it's a sure design smell IMHO. Don't mix presentation wi

Re: Tabs are *MISUNDERSTOOD*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread David Isaac
> Andy Sy wrote: > >Don't be evil - always configure your editor to > >convert tabs to true spaces. "achates" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yet another space-indenter demonstrates that problem actually lies with > people who think that tab == some spaces. Exactl

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread achates
>Hitting the spacebar like a madman? If you have a sensible editor then at >the start of a line you press tab once True! but normally if I'm editing someone else's code then I'm only making small changes and so can't be bothered to temporarily cripple my editor. If I'm merging my code with someone

Re: Help System For Python Applications

2006-05-17 Thread bruno at modulix
BartlebyScrivener wrote: > At the commandline, run: > > pydoc -g > > In the interpreter: > > help("modulename") > > or help () > > for interactive. This is developper doc. I think the OP's talking about end-user doc. -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Sybren Stuvel
achates enlightened us with: > True! but normally if I'm editing someone else's code then I'm only > making small changes and so can't be bothered to temporarily cripple my > editor. If I'm merging my code with someone else's space-indented code > then piping through sed 's/TAB/SPACES' does the tri

Re: round numbers in an array without importing Numeric or Math? - SOLVED, sort of

2006-05-17 Thread Bernhard Herzog
"Paul McGuire" <[EMAIL PROTECTED]> writes: > ... or if you prefer the functional approach (using map)... > > roundToInt = lambda z : int(z+0.5) > Topamax = map( roundToInt, map( float, map(str, Topamax) ) ) > > (Python also has a built-in round() function, but this returns floats, not > ints - if

Re: Strange IO Error when extracting zips to a network location

2006-05-17 Thread Hari Sekhon
I put a try-pass around the line "outfile.write(zip.read(x)) " so that everything extracts regardless. After extraction I checked the file size of every single file in the directory tree and only 2 files on the network drive are of different size to the ones extracted locally. Both these files

Re: CFLAGS are not taken into account properly

2006-05-17 Thread Toon Knapen
[EMAIL PROTECTED] wrote: > I agree, the Python configure/Makefile combination doesn't conform very well > to current GNU style in this regard. Try setting EXTRA_CFLAGS instead of > CFLAGS. Thanks. But some other (but 'similar') functionality is broken. Now I succeeded in compiling python. But

Re: Option parser question - reading options from file as well as command line

2006-05-17 Thread Tim N. van der Leeuw
Andrew Robert wrote: > Tim N. van der Leeuw wrote: > > Andrew Robert wrote: [...] > Hi Tim, > > I am using the pymqi module which is freely available at > http://pymqi.sourceforge.net/ . > > Documentation on the module can be found at > http://pymqi.sourceforge.net/pymqidoc.html . > > I have a few

Re: problem with namespaces using eval and exec

2006-05-17 Thread Jens
Thanks a lot, that works for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unable to extract Python source code using Windows

2006-05-17 Thread John Machin
> I'd blame WinZip for claiming rights to files it can't read You are probably right ... however in Windows Explorer on my box, .bz2 files have an "I don't know" type of icon, whereas .zip (of course(?)) and .tgz and.tar.gz files have the WinZip vice-squeezing icon. Are there two different lists o

Re: A better way of making subsclassing of built-in types stick for attributes?

2006-05-17 Thread [EMAIL PROTECTED]
Thanks. Ben Finney wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > Of course, whenever you then set mystr = 'a string' > > ... you're instantiating a 'str' object, since that's what the syntax > you use will do. > > > you loose the extra goodies that I have attached in the > > subcl

SWIG: name 'new_doubleArray' is not defined

2006-05-17 Thread alexandre_irrthum
Hello, I am trying to use SWIG (1.3) to wrap some C code in Python (2.3.5) under Linux, but obviously I am missing something with arrays. This is my example.c file: double sum_array(double x[], int size) { int i; double sum = 0.0; for (i=0; i>> import example But this fa

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
If tabs are easily misunderstood, then they are a MISfeature and they need to be removed. >From the Zen of Python: "Explicit is better than implicit..." "In the face of ambiguity, refuse the temptation to guess..." "Special cases aren't special enough to break the rules..." -- It's called DOM+

Re: Large Dictionaries

2006-05-17 Thread Chris Foote
Klaas wrote: 22.2s 20m25s[3] 20m to insert 1m keys? You are doing something wrong. Hi Mike. I've put together some simplified test code, but the bsddb module gives 11m for 1M keys: Number generator test for 100 number ranges with a maximum of 3 wildcard digits. Wed May 17 22:1

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
achates wrote: >> Andy Sy wrote: >> Don't be evil - always configure your editor to >> convert tabs to true spaces. > > Yet another space-indenter demonstrates that problem actually lies with > people who think that tab == some spaces. Wrong. I am completely aware that an editor configured to co

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Peter Decker
On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: > If tabs are easily misunderstood, then they are a MISfeature > and they need to be removed. I don't seem to understand your point in acting as a dictator. Therefore, you are a MISfeature and need to be removed. -- # p.d. -- http://mail.python.o

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Jorge Godoy
achates wrote: >>Hitting the spacebar like a madman? If you have a sensible editor then at >>the start of a line you press tab once > > True! but normally if I'm editing someone else's code then I'm only > making small changes and so can't be bothered to temporarily cripple my > editor. If I'm me

Re: IDLE confusion

2006-05-17 Thread Christophe
Terry Reedy a écrit : > "Christophe" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Try in the IDLE menu [Shell] "Restart Shell" (Ctrl+F6) each time you >>have changed something in your files - this "resets" anything previously >>imported, which stays the same way otherwise. >

using wxPython events inside a loop

2006-05-17 Thread Mr BigSmoke
I'm writting an applicatio that that does something like this: class batchSpy(wx.Frame): def __init__(self, parent): wx.Frame.__init__( self, None, -1, "Batch Spy", pos = (0,0), size = mySize) do layo

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Bill Pursell
Xah Lee wrote: > Tabs versus Spaces in Source Code > > Xah Lee, 2006-05-13 > > In coding a computer program, there's often the choices of tabs or > spaces for code indentation. > (2) Due to the first reason, they have created and > propagated a massive none-understanding and mis-use, to the degre

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Peter Decker
On 17 May 2006 06:51:19 -0700, Bill Pursell <[EMAIL PROTECTED]> wrote: > In my experience, the people who complain about the use > of tabs for indentation are the people who don't know > how to use their editor, and those people tend to use > emacs. In my experience, whenever there is a 'religiou

Re: A better way of making subsclassing of built-in types stick for attributes?

2006-05-17 Thread Maric Michaud
Le Mercredi 17 Mai 2006 06:17, [EMAIL PROTECTED] a écrit : > I want the fact that the fields are > not strings to be invisible to the client programmers. You should use properties then. In [12]: class mystr(str) : pass : In [13]: class myrow(object) : : getX = lambda s : s._

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Peter Decker wrote: > On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: > >> If tabs are easily misunderstood, then they are a MISfeature >> and they need to be removed. > > I don't seem to understand your point in acting as a dictator. > Therefore, you are a MISfeature and need to be removed. Is the

Re: taking qoutes in arguments

2006-05-17 Thread Lee Caine
oh, well you learn somthing new everyday, thanks for that :) oh and i typed the command and got '/bin/bash', means nothing at the moment but im sure it will thanks for your help Lee. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Roy Smith
Peter Decker <[EMAIL PROTECTED]> wrote: >In my experience, whenever there is a 'religious' issue like this, one >side tends to be quick to pronounce the other as 'evil', and insist >that everyone do things their way, I don't think people who use tabs are evil. They may be ignorant and misguided,

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Bill Pursell
Peter Decker wrote: > On 17 May 2006 06:51:19 -0700, Bill Pursell <[EMAIL PROTECTED]> wrote: > > > In my experience, the people who complain about the use > > of tabs for indentation are the people who don't know > > how to use their editor, and those people tend to use > > emacs. > > In my experi

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Andy Sy
Peter Decker wrote: > Spaces look like crap, too, when using proportional fonts. ... and people who would even think that using proportional fonts for viewing/editing source code is anywhere remotely near being a good idea ... That's an even more advanced version of the i-think-tabs-are-good dis

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread achates
Jorge Godoy wrote >Emacs guess what's used in the file and allows me to use tabs all the time, >doing the correct thing... That sounds like useful behaviour. Maybe this is an area where modern editors might be able to save us from ourselves. I'll admit I'm suspicious of relying on editor functio

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Sybren Stuvel
Andy Sy enlightened us with: > Now... if you say you SHOULDN'T mix tabs and spaces (indeed this is > generally regarded as a BAD idea esp. in Python code) I indeed say so. > then WHAT THE HECK do you need to use tab characters in the source > code for anyway (besides saving a measly few bytes) ??

Re: using wxPython events inside a loop

2006-05-17 Thread Diez B. Roggisch
Mr BigSmoke wrote: > I'm writting an applicatio that that does something like this: > > class batchSpy(wx.Frame): > > def __init__(self, parent): > > wx.Frame.__init__( self, None, -1, "Batch Spy", pos = (0,0), > size = mySize) > do layout ... > > self.searchAlarms() > >

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Peter Decker
On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: > Peter Decker wrote: > > On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: > > > >> If tabs are easily misunderstood, then they are a MISfeature > >> and they need to be removed. > > > > I don't seem to understand your point in acting as a dictator. > >

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Peter Decker
On 17 May 2006 07:14:33 -0700, Bill Pursell <[EMAIL PROTECTED]> wrote: > I think you unfairly snipped context on me. I was directly responding > to the assertion that vi is unable to handle tabs well. I was *agreeing* with you. Sorry if that wasn't clear. -- # p.d. -- http://mail.python.org/

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Peter Decker wrote: > On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: >> Peter Decker wrote: >>> On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: >>> If tabs are easily misunderstood, then they are a MISfeature and they need to be removed. >>> I don't seem to understand your point in acting

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Peter Decker
On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: > > Uh, I should know better than to try to educate, but FYI: using the > > same argument construction and having it reach an invalid conclusion > > suffices to show that the original construction is invalid, and thus > > the original conclusion is su

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread achates
Andy Sy >I guess this *REALLY* is how a misguided tab user exercises his 'logic': >Syntax replication (e.g. so-called 'argument construction') is enough, >semantics don't matter. That's quite amusing.. you've unwittingly stumbled on a pretty concise statement of Hilbert's first postulate of forma

List behaviour

2006-05-17 Thread barberomarcelo
Maybe I'm missing something but the latter is not the behaviour I'm expecting: >>> a = [[1,2,3,4], [5,6,7,8]] >>> b = a[:] >>> b [[1, 2, 3, 4], [5, 6, 7, 8]] >>> a == b True >>> a is b False >>> for i in range(len(b)): ... for x in range(4): ... b[i][x] = b[i][x] + 10 ... >>> b [[11, 1

Re: List behaviour

2006-05-17 Thread Heiko Wundram
Am Mittwoch 17 Mai 2006 17:06 schrieb [EMAIL PROTECTED]: > Maybe I'm missing something but the latter is not the behaviour I'm > > expecting: > >>> a = [[1,2,3,4], [5,6,7,8]] > >>> b = a[:] > >>> b > > [[1, 2, 3, 4], [5, 6, 7, 8]] > > >>> a == b > > True > > >>> a is b > > False > Try an: >>> a[0

Re: List behaviour

2006-05-17 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Maybe I'm missing something but the latter is not the behaviour I'm > expecting: > a = [[1,2,3,4], [5,6,7,8]] b = a[:] b > [[1, 2, 3, 4], [5, 6, 7, 8]] a == b > True a is b > False for i in range(len(b)): > ... for x in range(4): > ...

Re: List behaviour

2006-05-17 Thread Mike Kent
When you did: b = a[:] b was then a copy of a, rather than just a reference to the same a. But what does a contain? It contains two sublists -- that is, it contains references to two sublists. So b, which is now a copy of a, contains copies of the two references to the same two sublists. What y

Pyparsing: Grammar Suggestion

2006-05-17 Thread Khoa Nguyen
I am trying to come up with a grammar that describes the following: record = f1,f2,...,fn END_RECORD All the f(i) has to be in that order. Any f(i) can be absent (e.g. f1,,f3,f4,,f6 END_RECORD) Number of f(i)'s can vary. For example, the followings are allowed: f1,f2 END_RECORD f1,f2,,f4,,f6 END_R

Re: A better way of making subsclassing of built-in types stick for attributes?

2006-05-17 Thread [EMAIL PROTECTED]
Maric Michaud wrote: > Le Mercredi 17 Mai 2006 06:17, [EMAIL PROTECTED] a écrit : > > I want the fact that the fields are > > not strings to be invisible to the client programmers. > You should use properties then. I started with that idea, using the recipie 20.2 from the cookbook. However, this

How to couple pyunit with GUI?

2006-05-17 Thread volcano
I am desperately looking for an info how to combine a testing application with decent GUI interface - the way most xUnits do. I believe I have seen something about using Tkinter, but I do not remember - where. I am working on a complex testing application built over unittest module, and I need GUI

Process forking on Windows

2006-05-17 Thread Andrew Robert
Hi everyone, I have a python program that will need to interact with an MQSeries trigger monitor. It does this fine but it hogs the trigger monitor while it executes. I'd like to fork the program off and terminate the parent process so that the trigger monitor frees up. Does anyone how this c

Re: List behaviour

2006-05-17 Thread barberomarcelo
Thank you very much. It was clear. -- http://mail.python.org/mailman/listinfo/python-list

Re: Process forking on Windows

2006-05-17 Thread Gary Herron
Andrew Robert wrote: >Hi everyone, > > >I have a python program that will need to interact with an MQSeries >trigger monitor. > >It does this fine but it hogs the trigger monitor while it executes. > >I'd like to fork the program off and terminate the parent process so >that the trigger monitor fr

Re: Process forking on Windows

2006-05-17 Thread bruno at modulix
Andrew Robert wrote: > Hi everyone, > > > I have a python program that will need to interact with an MQSeries > trigger monitor. > > It does this fine but it hogs the trigger monitor while it executes. > > I'd like to fork the program off and terminate the parent process so > that the trigger m

Re: Pyparsing: Grammar Suggestion

2006-05-17 Thread Heiko Wundram
Am Mittwoch 17 Mai 2006 17:24 schrieb Khoa Nguyen: > Any suggestions? If you're not limited to PyParsing, pyrr.ltk/ptk might be appropriate for you here (if you're used to bison/flex). The following file implements a small sample lexer/parser which does exactly what you need. pyrr.ltk (the lexin

Re: Pyparsing: Grammar Suggestion

2006-05-17 Thread Heiko Wundram
Am Mittwoch 17 Mai 2006 17:53 schrieb Heiko Wundram: > If you're not limited to PyParsing, pyrr.ltk/ptk might be appropriate for > you here (if you're used to bison/flex). The following file implements a > small sample lexer/parser which does exactly what you need. pyrr.ltk (the > lexing toolkit) i

Question about exausted iterators

2006-05-17 Thread Christophe
Is there a good reason why when you try to take an element from an already exausted iterator, it throws StopIteration instead of some other exception ? I've lost quite some times already because I was using a lot of iterators and I forgot that that specific function parameter was one. Exemple :

Point-feature labeling in matplotlib

2006-05-17 Thread dhn
I am trying to automate the generation of scatterplots in matplotlib. The problem of where to put the labels is known as 'point-feature labeling' (a main application is in cartography, where cities and such are known as 'point features'). In general the problem is not easy. Some references: http:/

Re: Process forking on Windows

2006-05-17 Thread Andrew Robert
bruno at modulix wrote: > Andrew Robert wrote: >> Hi everyone, >> >> >> I have a python program that will need to interact with an MQSeries >> trigger monitor. >> >> It does this fine but it hogs the trigger monitor while it executes. >> >> I'd like to fork the program off and terminate the parent

  1   2   3   >