Re: Bitching about the documentation...

2005-12-04 Thread Tony Meyer
> But, the standard responce of "don't complain, fix it yourself" is > bogus too. There are plenty of people on this list willing to sing > python's > praises, for balance, there should be people willing to openly > point out > python's flaws. This makes no sense. If you want to complain abo

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread malv
In theory, this would do. I have tried this several times in the past and found it very impractical to have to live with two Python versions on the same system, given that Python, like also Perl, is used by so many components. I may have done many things wrong but experience taught me to better sim

Re: What's wrong with "lambda x : print x/60,x%60"

2005-12-04 Thread Klaus Alexander Seistrup
Justin Ezequiel wrote: > Try > > lambda_hrs = lambda x: (x/60,x%60) Or #v+ lambda_hrs = lambda x: divmod(x, 60) #v- Cheers, -- Klaus Alexander Seistrup PNX · http://pnx.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2005-12-04 Thread Tony Meyer
>> It's "site:", but even if you just left that out and used >> 'wiki.python.org sorting "how to"', the first link is the one you're >> after. Laziness is no excuse. > > You miss my point. Having outdated documentaion distributed > with Python is the problem. Have some newer stuff out on some >

Re: what's wrong with "lambda x : print x/60,x%60"

2005-12-04 Thread Gary Herron
Mohammad Jeffry wrote: > Dear All, > > Can't a lambda uses the input parameter more then once in the lambda > body? > eg: > lambda x : print x/60,x%60 > > I tried with def and it works but got syntax error with lambda. Below > is an interactive sample: Lambda evaluates a single *expression* and

Re: what's wrong with "lambda x : print x/60,x%60"

2005-12-04 Thread Ezequiel, Justin
Try lambda_hrs = lambda x: (x/60,x%60) -- http://mail.python.org/mailman/listinfo/python-list

Re: Detect character encoding

2005-12-04 Thread Martin v. Löwis
Diez B. Roggisch wrote: > So cp1250 doesn't have all codepoints defined - but the others have. > Sure, this helps you to eliminate 1 of the three choices the OP wanted > to choose between - but how many texts you have that have a 129 in them? For the iso8859 ones, you should assume that the char

Re: Detect character encoding

2005-12-04 Thread Martin v. Löwis
Martin P. Hellwig wrote: > From what I can remember is that they used an algorithm to create some > statistics of the specific page and compared that with statistic about > all kinds of languages and encodings and just mapped the most likely. More hearsay: I believe language-based heuristics ar

Re: what's wrong with "lambda x : print x/60,x%60"

2005-12-04 Thread Mohammad Jeffry
without the "print" also gives me error:- >>> lambda_hrs = lambda x : x/60,x%60 Traceback (most recent call last):   File "", line 1, in ? NameError: name 'x' is not defined On 12/5/05, Mohammad Jeffry <[EMAIL PROTECTED]> wrote: Dear All, Can't a lambda uses the input parameter more then once in

what's wrong with "lambda x : print x/60,x%60"

2005-12-04 Thread Mohammad Jeffry
Dear All, Can't a lambda uses the input parameter more then once in the lambda body? eg: lambda x : print x/60,x%60 I tried with def and it works but got syntax error with lambda. Below is an interactive sample: [EMAIL PROTECTED] ~ $ python Python 2.4.2 (#1, Nov 18 2005, 19:32:15) [GCC 3.3.6

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Mike C. Fletcher
Brett Hoerner wrote: >I have to add another vote for Gentoo. > And another here. Portage (the Python-coded package-management system) does a very good job. I tend to use fairly conservative settings as well, Gentoo's just nice and stable as a general rule, I don't care about ultimate speed or

Re: Bitching about the documentation...

2005-12-04 Thread rurpy
Peter Hansen wrote: > [EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] wrote: snip > > Are we talking about the same Search box (at the top right of the > > wiki page, and labeled "search"? Well, yes I did enter "sort" and > > got (as I said) a long list of archived maillist postings. > > No, he's

Re: Creating referenceable objects from XML

2005-12-04 Thread rurpy
Michael Williams wrote: > Hi All, > > I'm looking for a quality Python XML implementation. All of the DOM > and SAX implementations I've come across so far are rather > convoluted. Are there any quality implementations that will (after > parsing the XML) return an object that is accessible by na

Re: newbie - needing direction

2005-12-04 Thread bobueland
Thanks for the advice, The reason for the choice of my particular test project is that it is in the direction that I want to go in so choosing some other won't do. I've looked briefly at PyGame but this means I have to learn a lot besides what I want to do. I thought that maybe my project could be

Re: timeit's environment

2005-12-04 Thread rurpy
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: > > > Why doesn't the following work? It generates a "NameError: global > > name 'data' is not defined" error. > > > > import timeit > > > > global data > > data = [3,8,4,8,6,0,5,7,2,1] > > > > env = "global data; x = data" > > > > print

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2005-12-04 Thread rurpy
Tony Meyer wrote: > Among the treasures available in The Wiki is the current > copy of "the Sorting min-howto": > http://www.amk.ca/python/howto/sorting/sorting.html > >>> > >>> Why is this a "treasure" when it is way out of date? > >> > >> Note that the updated vers

Re: Bitching about the documentation...

2005-12-04 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: >>Gee, I wonder if I typed "sort" into the search box on the wiki it might >>turn up something useful? Well, what do you know? >> >>2 results of about 4571 pages. (0.19 seconds) >> >>1. HowTo/Sorting >>2. SortingListsOfDictionaries >

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Aahz
In article <[EMAIL PROTECTED]>, Christoph Haas <[EMAIL PROTECTED]> wrote: >On Sunday 04 December 2005 19:56, Aahz wrote: >> >> Of course, one can use Debian-testing, but that isn't packaged, and >> I want a packaged OS. > >You probably mean that Testing (the upcoming "Etch" stable release) is not

Re: Bitching about the documentation...

2005-12-04 Thread rurpy
[EMAIL PROTECTED] wrote: > Gee, I wonder if I typed "sort" into the search box on the wiki it might > turn up something useful? Well, what do you know? > > 2 results of about 4571 pages. (0.19 seconds) > > 1. HowTo/Sorting > 2. SortingListsOfDictionaries Are we talking about the sam

Re: timeit's environment

2005-12-04 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Why doesn't the following work? It generates a "NameError: global > name 'data' is not defined" error. > > import timeit > > global data > data = [3,8,4,8,6,0,5,7,2,1] > > env = "global data; x = data" > > print timeit.Timer('x.sort()', env).timeit() >

Seperating logic code from gui code

2005-12-04 Thread Arthur Pemberton
Hello, I am new to Qt programming and PyQt. I am attempting to build a client for AllofMp3.com, I already have most of the logic code down. But now I want to build a GUI with PyQt. What rules should I follow to make the program useable in the console, but also with a GUI? Thank you.-- As a boy I

Re: Efficient lookup in list of dictionaries

2005-12-04 Thread Rob E
> Hi. I like working with lists of dictionaries since order is preserved > in a list when I want order and the dictionaries make it explicit what > I have got inside them. I find this combination very useful for storing > constants especially. Generally I find myself either needing to > retriev

timeit's environment

2005-12-04 Thread rurpy
Why doesn't the following work? It generates a "NameError: global name 'data' is not defined" error. import timeit global data data = [3,8,4,8,6,0,5,7,2,1] env = "global data; x = data" print timeit.Timer('x.sort()', env).timeit() print timeit.Timer('x.sort(cmp=cmp', env).timeit()

Creating referenceable objects from XML

2005-12-04 Thread Michael Williams
Hi All, I'm looking for a quality Python XML implementation. All of the DOM and SAX implementations I've come across so far are rather convoluted. Are there any quality implementations that will (after parsing the XML) return an object that is accessible by name? Such as the following:

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread BartlebyScrivener
>>Hmmm... I'm not an expert in this subject but isn't Ubuntu based on Debian? << I'm no expert either. I've played with Ubuntu and Debian, and Debian seemed infinitely more stable, and also, for me, Debian installed more easily. Since it's a python board I'm most interested in the python implicat

Efficient lookup in list of dictionaries

2005-12-04 Thread David Pratt
Hi. I like working with lists of dictionaries since order is preserved in a list when I want order and the dictionaries make it explicit what I have got inside them. I find this combination very useful for storing constants especially. Generally I find myself either needing to retrieve the valu

Bitching about the documentation...

2005-12-04 Thread skip
>> Note that the updated version of this is at: http://wiki.python.org/ >> moin/HowTo/Sorting rurpy> http://wiki.python.org/... rurpy> Hmmm, lets see, how about Libraries? rurpy> Nope, don't see anything that looks like it might be about sort rurpy> there... rurpy> How

Re: Tabs bad (Was: ANN: Dao Language v.0.9.6-beta is release!)

2005-12-04 Thread Steven D'Aprano
Björn Lindström wrote: > Ed Leafe <[EMAIL PROTECTED]> writes: > > >>Again, specifics would be welcome. I've been using tabs for >>indentation for over a decade, and have not once run into the horror >>stories that everyone who hates tabs says will happen, but who never >>give specifics as to how

Re: Detect character encoding

2005-12-04 Thread François Pinard
[Diez B. Roggisch] >Michal wrote: >> is there any way how to detect string encoding in Python? >Recode might be of help here, it has such heuristics built in AFAIK. If we are speaking about the same Recode ☺, there are some built in tools that could help a human to discover a charset, but this

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread darren kirby
quoth the Mike Meyer: > A lot of the > rough edges of Gentoo have been dealt with in FreeBSD. For instance, > you can update from source, but you can also get binary updates. You can sort of do this with Gentoo. Check out the "--usepkg", "--getbinpkg" and "--buildpkg" emerge options. The only pro

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2005-12-04 Thread Tony Meyer
Among the treasures available in The Wiki is the current copy of "the Sorting min-howto": http://www.amk.ca/python/howto/sorting/sorting.html >>> >>> Why is this a "treasure" when it is way out of date? >> >> Note that the updated version of this is at: http://wiki.py

change color

2005-12-04 Thread Ben Bush
I tested the following code and wanted to make oval 2 become red after I hit the enter key but though the code did not report error, it did not change. from Tkinter import * root=Tk() canvas=Canvas(root,width=100,height=100) canvas.pack() canvas.create_oval(10,10,20,20,tags='oval1',fill='blue') can

Re: HTML parsing/scraping & python

2005-12-04 Thread gene tani
John J. Lee wrote: > Sanjay Arora <[EMAIL PROTECTED]> writes: > > > We are looking to select the language & toolset more suitable for a > > project that requires getting data from several web-sites in real- > > timehtml parsing/scraping. It would require full emulation of the > > browser, incl

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Mike Meyer
"Brett Hoerner" <[EMAIL PROTECTED]> writes: > I have to add another vote for Gentoo. I agree that you just "have > less problems" on Gentoo. Updates are from source, Gentoo is one of my favorite Linux distributions - because it's the the most like a BSD distribution, except not as mature. A lot

Installing Eric?

2005-12-04 Thread Kenneth McDonald
I'm wondering if anyone has experience/tips to offer on installing Eric on OS X and XP. Installation on both seems to require a number of steps, some of them seeming potentially fragile, and I'm wondering if I'm looking at a job of perhaps hours (days?), or if everyone manages in just a few

Re: oval

2005-12-04 Thread Ben Bush
On 12/4/05, Peter Otten <[EMAIL PROTECTED]> wrote: > Ben Bush wrote: > > > On 12/4/05, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > >> Ben Bush wrote: > >> > I tested the following code and wanted to get the message of "oval2 > >> > got hit" if I click the red one. But I always got "oval1 got hit"

Re: oval

2005-12-04 Thread Ben Bush
On 12/4/05, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > >> > >>What you want instead is something like > >> > >>if event.source == a: > >>... > >> > >>Please note that I don't know what event actually looks like in Tkinter, > >>so check the docs what actually gets passed to you. > > > > > > g

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2005-12-04 Thread rurpy
Tony Meyer wrote: > >> Among the treasures available in The Wiki is the current > >> copy of "the Sorting min-howto": > >> http://www.amk.ca/python/howto/sorting/sorting.html > > > > Why is this a "treasure" when it is way out of date? > > Note that the updated version of this is a

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Luis M. Gonzalez
malv wrote: > Being a fan of linux and python and granting money doesn't make your OS > better or worse. > I believe that shipping a linux with a compiler DIFFERENT from the one > that was used to build the kernel is not very bright. It may never > bother some users, but few software developpers w

Re: Eclipse best/good or bad IDE for Python?

2005-12-04 Thread gene tani
[EMAIL PROTECTED] wrote: > Though I tried most the above listed IDEs, sticking with a few for > awhile, I always find myself gravitating back to the one no one ever > mentions: IDLE. It's simple, fast, and with multiple monitors the lack > of tabs really isn't much of a problem. > > The biggest re

python university search

2005-12-04 Thread josh
[pardon me if this is not the appropriate list] hello, i am interested in doing an undergraduate major in computer science that mainly focuses on python as a programming language.. i am not a very bright student and neither do i have the money to think about universities like caltech, stanford e

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Brett Hoerner
I have to add another vote for Gentoo. I agree that you just "have less problems" on Gentoo. Updates are from source, but you don't have to update mid-day while working on a project... if you really want the new version of KDE (etc) then start an update and go to sleep, not a big deal. Portage (

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2005-12-04 Thread skip
>>> Among the treasures available in The Wiki is the current >>> copy of "the Sorting min-howto": >>> http://www.amk.ca/python/howto/sorting/sorting.html >> >> Why is this a "treasure" when it is way out of date? Tony> Note that the updated version of this is at: Tony>

Re: HTML parsing/scraping & python

2005-12-04 Thread John J. Lee
Sanjay Arora <[EMAIL PROTECTED]> writes: > We are looking to select the language & toolset more suitable for a > project that requires getting data from several web-sites in real- > timehtml parsing/scraping. It would require full emulation of the > browser, including handling cookies, automat

Re: Eclipse best/good or bad IDE for Python?

2005-12-04 Thread John J. Lee
Fabio Zadrozny <[EMAIL PROTECTED]> writes: [...] > I must also warn you that I'm its current maintainer, and it is *my* > favorite IDE :-) [...] > But in the end, as I said, it is a subjective matter, so, you'll have to > decide it for yourself. Hey, Fabio, can this be true: https://bugs.eclips

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2005-12-04 Thread Tony Meyer
>> Among the treasures available in The Wiki is the current >> copy of "the Sorting min-howto": >> http://www.amk.ca/python/howto/sorting/sorting.html > > Why is this a "treasure" when it is way out of date? Note that the updated version of this is at: http://wiki.python.org/ moin

Re: Eclipse best/good or bad IDE for Python?

2005-12-04 Thread John J. Lee
Aaron Bingham <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: [...ex-emacs user explains switch to Eclipse...] > The killer PyDev feature for me is pylint integration. Being informed > immediately when you mistype a variable name is a big timesaver. Also I now find it difficult to mis-t

Re: option argument length

2005-12-04 Thread Nicolas Couture
I don't think that's actually what you want to do. Yes arguments are not to be used directly as option arguments (otherwise why have option arguments anyways ;-) but each option argument is usually evaluated under the evaluation of the actual option and optparse will error on invalid use of the opt

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2005-12-04 Thread rurpy
"Cameron Laird" <[EMAIL PROTECTED]> wrote: snip > Among the treasures available in The Wiki is the current > copy of "the Sorting min-howto": > http://www.amk.ca/python/howto/sorting/sorting.html snip Why is this a "treasure" when it is way out of date? 1. There is no mention of

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Christoph Haas
On Sunday 04 December 2005 19:56, Aahz wrote: > Christoph Haas <[EMAIL PROTECTED]> wrote: > >The operating system/distribution is not connected to the application > >(Python). It will probably run everywhere. But we recently had this > >topic and a majority seemed to vote for Ubuntu. I personally

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread malv
Being a fan of linux and python and granting money doesn't make your OS better or worse. I believe that shipping a linux with a compiler DIFFERENT from the one that was used to build the kernel is not very bright. It may never bother some users, but few software developpers will like this idea. mal

ADD HTML to the code

2005-12-04 Thread Little
Could someone tell me how to add some HTML tags to this program. I want to be able to change the background color, add some headers, and put a table below the map that will be displayed. Could someone please tell me how to add this to the current program. Thanks in advance. Red.py """ Publisher e

Help needed: file writing problem with subprocess

2005-12-04 Thread Pekka Niiranen
Hi, I am running Python script in W2K or in WinXP. The script is started from DOS prompt and writes text file to disk with codecs.open() in UTF8. The problem is: When script writes the file and tries to read it with by calling itself thru subprocess() the created files are NOT accessible because

Re: Detect character encoding

2005-12-04 Thread Diez B. Roggisch
Mike Meyer wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > >>Michal wrote: >> >>>is there any way how to detect string encoding in Python? >>>I need to proccess several files. Each of them could be encoded in >>>different charset (iso-8859-2, cp1250, etc). I want to detect it, >>>and enc

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Paul Boddie
Aahz wrote: > Ubuntu *is* Debian, just repackaged. I think "is almost" would be more accurate than just "*is*", speaking as a Kubuntu user with a passing familiarity of the current state of Debian and Ubuntu package maintenance. > I used to prefer Debian until stable wouldn't work with my newest

Re: Detect character encoding

2005-12-04 Thread skip
Martin> I read or heard (can't remember the origin) that MS IE has a Martin> quite good implementation of guessing the language en character Martin> encoding of web pages when there not or falsely specified. Gee, that's nice. Too bad the source isn't available... <0.5 wink> Skip --

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-04 Thread Tom Anderson
On Sun, 4 Dec 2005 [EMAIL PROTECTED] wrote: >> you're about 10 years late > > The same could be said for hoping that the GIL will be eliminated. > Utterly hopeless. > > Until... there was PyPy. Maybe now it's not so hopeless. No - structuring by indentation and the global lock are entirely diff

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Luis M. Gonzalez
> Looking to replace my older flavor of linux with something new. . .What > are some of your favorites for python programming and anything else? Ubuntu is developed by Canonical, a company owned by Mark Shuttleworth. This guy is a fan of both linux and python, so if you want a linux distro that ge

Re: Detect character encoding

2005-12-04 Thread Martin P. Hellwig
Mike Meyer wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: >> Michal wrote: >>> is there any way how to detect string encoding in Python? >>> I need to proccess several files. Each of them could be encoded in >>> different charset (iso-8859-2, cp1250, etc). I want to detect it, >>> and enco

Re: Colorize expanded tabs

2005-12-04 Thread qwweeeit
Hi Peter, thank you for your replay, but I was looking for a very short routine. I even had in mind to use Linux & bash (only one command line). It seems that tab expansion, made by print, prevents the working of the escape sequences for colors. In fact, if you replace tab with a given number of sp

Re: option argument length

2005-12-04 Thread Peter Otten
Ritesh Raj Sarraf wrote: > My program uses mostly "option arguments" hence my len(args) value is > always zero. I need to check if the user has passed the correct number of > "option arguments". Something like: > > (options,args) = parser.parse_args() > > len(options) != 1 or len(options) > 2: >

Re: Tabs bad (Was: ANN: Dao Language v.0.9.6-beta is release!)

2005-12-04 Thread Tom Anderson
On Sun, 4 Dec 2005, [utf-8] Björn Lindström wrote: This article should explain it: http://www.jwz.org/doc/tabs-vs-spaces.html Ah, Jamie Zawinski, that well-known fount of sane and reasonable ideas. It seems to me that the tabs-vs-spaces thing is really about who controls the indentation: wi

Re: Eclipse best/good or bad IDE for Python?

2005-12-04 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > Eclipse, for example, performs like a dog on > my dual opteron workstation w/ 2GB of RAM, which is more than enough to > annoy me. I shouldn't have to wait more than about 1 second for an > editor to start and then open what is essentially a text file :-P. And then, due

Use python to test Java and Windows (dll) applciations

2005-12-04 Thread jb
Hello everybody: I need help, and please let me know if python is the language of choice to implement following functionalities: I am trying to test a Java application and a C++ (win32) application. I want to be able to write python code to mimic user interaction with the application. Interacti

Re: option argument length

2005-12-04 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Ritesh Raj Sarraf wrote: > My program uses mostly "option arguments" hence my len(args) value is always > zero. I need to check if the user has passed the correct number of "option > arguments". Something like: > > (options,args) = parser.parse_args() > > len(options) !=

Python support in Enterprise Architect 6.0?

2005-12-04 Thread Wolfgang Keller
Hello, does anyone have any experience with the Python support in the new 6.0 version of Enterprise Architect from Sparx Systems? As I understand, it was eriously broken in earlier versions, so I would like to know whether they managed to fix it by now. TIA, Sincerely, Wolfgang Keller --

Re: Function to retrieve running script

2005-12-04 Thread Harlin Seritt
Thanks Mike, that will work just as well... just disappointed in myself that i lack the creativity to think of something that simple ;-) thanks, Harlin -- http://mail.python.org/mailman/listinfo/python-list

Re: Detect character encoding

2005-12-04 Thread B Mahoney
You may want to look at some Python Cookbook recipes, such as http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52257 "Auto-detect XML encoding" by Paul Prescod -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-04 Thread Benji York
Peter Decker wrote: > On 12/4/05, Mike Meyer <[EMAIL PROTECTED]> wrote: See, I can make up bizarre scenarios where spaces cause problems, too. >>> >>>Only if you don't know how decent editors behave. :) >> >>But the same is also true of tabs causing problems :-). > > I'm starting to s

option argument length

2005-12-04 Thread Ritesh Raj Sarraf
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm using optparse module to parse all options and arguments. My program uses mostly "option arguments" hence my len(args) value is always zero. I need to check if the user has passed the correct number of "option arguments". Something like: (op

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-04 Thread Peter Decker
On 12/4/05, Mike Meyer <[EMAIL PROTECTED]> wrote: > >> See, I can make up bizarre scenarios where spaces cause > >> problems, too. > > Only if you don't know how decent editors behave. :) > > But the same is also true of tabs causing problems :-). I'm starting to suspect that the same people

Re: Building Python 2.4 on machines that do not support dynamic loading

2005-12-04 Thread Martin v. Löwis
Robert McLay wrote: > I have been trying to build python on Cray X1. As far as I can > tell it does not support dynamic loading. So the question is: > >How to build 2.4 without dynamic loading? Make sure HAVE_DYNAMIC_LOADING isn't defined; configure should detect this automatically. > That

Re: CGI module does not parse data

2005-12-04 Thread Mardy
Le die Fri, 02 Dec 2005 12:18:28 -0800, amfr ha scribite: > import cgi > form = cgi.FieldStorage() > print form["test"] > print "test" > > I would only be able to see "test", not "hello world" > I am sure its not my browser As Tim said, you have tu use "form['test'].value", because "print form['t

Re: Detect character encoding

2005-12-04 Thread Nemesis
Mentre io pensavo ad una intro simpatica "Michal" scriveva: > Hello, > is there any way how to detect string encoding in Python? > I need to proccess several files. Each of them could be encoded in > different charset (iso-8859-2, cp1250, etc). I want to detect it, and > encode it to utf-8 (with

Re: Need help on designing a project

2005-12-04 Thread Mardy
Le die Fri, 02 Dec 2005 11:34:45 +, Steve Holden ha scribite: > Note that if you are using execfile()then the best structure for your > scripts would be something like: > > conn = db.open() > try: > #do CGI stuff > finally: > conn.close() That was of great help! Thanks! -- S

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-04 Thread Mike Meyer
Benji York <[EMAIL PROTECTED]> writes: >> See, I can make up bizarre scenarios where spaces cause >> problems, too. > Only if you don't know how decent editors behave. :) But the same is also true of tabs causing problems :-). http://www.mired.org/home/mwm/ Independent

Re: Detect character encoding

2005-12-04 Thread Mike Meyer
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Michal wrote: >> is there any way how to detect string encoding in Python? >> I need to proccess several files. Each of them could be encoded in >> different charset (iso-8859-2, cp1250, etc). I want to detect it, >> and encode it to utf-8 (with stri

Building Python 2.4 on machines that do not support dynamic loading

2005-12-04 Thread Robert McLay
I have been trying to build python on Cray X1. As far as I can tell it does not support dynamic loading. So the question is: How to build 2.4 without dynamic loading? That is: can I build 2.4 where all the extensions are archived in libpython2.4.a as a static library? Building on the Cray X

Re: Eclipse best/good or bad IDE for Python?

2005-12-04 Thread Avizoa
Though I tried most the above listed IDEs, sticking with a few for awhile, I always find myself gravitating back to the one no one ever mentions: IDLE. It's simple, fast, and with multiple monitors the lack of tabs really isn't much of a problem. The biggest reason I've found myself using IDLE is

Re: newbie - needing direction

2005-12-04 Thread Giovanni Bajo
[EMAIL PROTECTED] wrote: > I'm a newbie, just got through van Rossum's tutorial and I would like > to try a small project of my own. Here's the description of my project. > > When the program starts a light blue semi-transparent area, size 128 by > 102, is placed in the middle of the screen. The

Re: CDDB.py binaries for Python 2.4

2005-12-04 Thread Giovanni Bajo
Kent Tenney wrote: > I would love to use the tools at > http://cddb-py.sourceforge.net/ > the newest Win binaries are for Python 2.0 I packaged these for you, but they're untested: http://www.develer.com/~rasky/CDDB-1.3.win32-py2.3.exe http://www.develer.com/~rasky/CDDB-1.3.win32-py2.4.exe -- G

Re: Tabs bad (Was: ANN: Dao Language v.0.9.6-beta is release!)

2005-12-04 Thread Peter Decker
On 12/4/05, Lee Harr <[EMAIL PROTECTED]> wrote: > Everyone agrees that mixing is bad. I might even go so far as to > say that the only real problem is mixing. The question is, if we > are trying to pick only one, which one causes fewer problems. > > For me, it is spaces. Why is it that the only p

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Aahz
In article <[EMAIL PROTECTED]>, Christoph Haas <[EMAIL PROTECTED]> wrote: > >The operating system/distribution is not connected to the application >(Python). It will probably run everywhere. But we recently had this >topic and a majority seemed to vote for Ubuntu. I personally prefer >Debian. Ubu

Re: getting data off a CDrom

2005-12-04 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > Hi there, > > I'm trying to load data from 2 different CD drives to compare the data > on them to see if they are identical. I've found the WinCDRom module > online but it doesn't seem to give access to the data at all. The only > thing it seems to do is check if there

Putting in an html table

2005-12-04 Thread Little
Could someone start me on putting in a table into this code, and some HTML tags. I would to make the table below the map and have a header at the top. Thanks for the help. """ Publisher example """ def query(req, building=""): # NOTE: best way to understand this is to see the output, #

getting data off a CDrom

2005-12-04 Thread julien . lord
Hi there, I'm trying to load data from 2 different CD drives to compare the data on them to see if they are identical. I've found the WinCDRom module online but it doesn't seem to give access to the data at all. The only thing it seems to do is check if there is a readable cd in a specific drive.

Re: newbie - needing direction

2005-12-04 Thread bobueland
I should maybe mention that I want to this on a win XP computer Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread malv
I have been around quite a bit. The best are Gentoo and Debian. However, Python being very much an essential component of your distro, not having Python2.4 as standard kind of eliminates Debian. Running two versions in parallel is not the way to go. Gentoo requires quite a bit of work though. As I

Re: Tabs bad (Was: ANN: Dao Language v.0.9.6-beta is release!)

2005-12-04 Thread Lee Harr
> No matter what setting, the order of the indents is kept. This is not > the case if tabs and spaces are intermixed, as some style guides > suggest. > I have never seen anyone suggest mixing tabs and spaces, and I have read a lot of tabs-vs-spaces flamewars in my time. Everyone agrees that mixi

Re: Eclipse best/good or bad IDE for Python?

2005-12-04 Thread malv
This is probably a fair answer. My experience: Two years ago I started with Boa till I discovered eric. I have been with eric ever since. Eric uses Qt as GUI. I think both Qt and wx enable you to do pretty much the same thing. I like the work F.Lundh did on Tkinter, but every time I try, I get bogg

Re: Checking length of each argument - seems like I'm fighting Python

2005-12-04 Thread Brendan
Thank you all for your help. Alex's listify does the job well. I will reconsider using an atomic "Thing" class with Michaels' safeList. Bengt wins the prize for reducing sLen to one line! I still feel like I'm working against the grain somewhat, (Mike's right, I am coming at this with a "C++ min

Re: newbie write to file question

2005-12-04 Thread Scott David Daniels
ProvoWallis wrote: ... > for root, dirs, files in os.walk(setpath): > fname = files > for fname in files: > inputFile = file(os.path.join(root,fname), 'r') > while 1: >lines = inputFile.readlines(1) >if not lines: >

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Christoph Haas
On Sunday 04 December 2005 15:01, Ivan Shevanski wrote: > Looking to replace my older flavor of linux with something new. . .What > are some of your favorites for python programming and anything else? The operating system/distribution is not connected to the application (Python). It will probably

Re: Python Equivalent to Text::Autoformat

2005-12-04 Thread BartlebyScrivener
Formatter and docutils both look promising. Thanks for providing the terminology to search on. -rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie write to file question

2005-12-04 Thread Rob E
> I'm not sure what I'm > missing so I'd appreciate some advice. You question is pretty general and I'm not going to go over this in any great detail, but I will make a few comments. * In your if section use if ... else constructs not all the strange if and then not if blocks. Also get rid

newbie - needing direction

2005-12-04 Thread bobueland
I'm a newbie, just got through van Rossum's tutorial and I would like to try a small project of my own. Here's the description of my project. When the program starts a light blue semi-transparent area, size 128 by 102, is placed in the middle of the screen. The user can move this area with arrow

Re: Request opinion on web application framework

2005-12-04 Thread Bruno Desthuilliers
Thomas a écrit : > Hello, > > I am new to web programming but have some experience in technical > programming in Python and other languages. I need to build a networked > program which I would like to first deploy on an intranet and later on the > web which provides access to a few technical a

Re: regexp non-greedy matching bug?

2005-12-04 Thread Aahz
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > >that's backwards, isn't it? using ^ with match is usually pointless (since >match only looks at the first position anyway), and using ^ with search >is also usually pointless... While you're technically correct, I've been

Re: Detect character encoding

2005-12-04 Thread Diez B. Roggisch
Michal wrote: > Hello, > is there any way how to detect string encoding in Python? > > I need to proccess several files. Each of them could be encoded in > different charset (iso-8859-2, cp1250, etc). I want to detect it, and > encode it to utf-8 (with string function encode). You can only gues

Re: oval

2005-12-04 Thread Diez B. Roggisch
>> >>What you want instead is something like >> >>if event.source == a: >>... >> >>Please note that I don't know what event actually looks like in Tkinter, >>so check the docs what actually gets passed to you. > > > got AttributeError: Event instance has no attribute 'source' As I said: I do

  1   2   >