Re: Are circular dependencies possible in Python?

2005-04-10 Thread Tim Tyler
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote or quoted: > In <[EMAIL PROTECTED]>, Tim Tyler wrote: > > Like C, Python seems to insist I declare functions before calling > > them - rather than, say, scanning to the end of the current script > > when it can't immediately find what function I'm

Re: EOL created by .write or .encode

2005-04-10 Thread Xah Lee
can any GNU person or emacs coder answer this? specifically: why does what-cursor-position give incorrect answer. Xah [EMAIL PROTECTED] â http://xahlee.org/PageTwo_dir/more.html â Xah Lee wrote: > I found the problem now. (after some one hour debug time) Python > didn't have problem. Emacs do

Does Tk provide ComboBox ?

2005-04-10 Thread Peter Moscatt
Does Tkinter provide a combobox or do I have to find some way of making a listbox do the job ? Pete -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on some stdlib modules

2005-04-10 Thread Kay Schluehr
Martin v. Löwis wrote: > Is it good that people write these wrappers? No. > I don't think so. Is it > the library's fault? I don't think so, either. People write these > wrappers because they cannot remember how to use the library. I slightly disagree. It's a symptom. The example of the path-m

Re: Are circular dependencies possible in Python?

2005-04-10 Thread John Machin
On Sun, 10 Apr 2005 07:34:02 GMT, Tim Tyler <[EMAIL PROTECTED]> wrote: >Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote or quoted: >> In <[EMAIL PROTECTED]>, Tim Tyler wrote: > >> > Like C, Python seems to insist I declare functions before calling >> > them - rather than, say, scanning to the

Re: Thoughts on some stdlib modules

2005-04-10 Thread Kay Schluehr
Steve Holden wrote: > You are correct in suggesting that the library could be better organized > than it is, but I felt we would be better off deferring such change > until the emergence of Python 3.0, which is allowed to break backwards > compatibility. So, start working on your scheme now - PEP

Re: Thoughts on some stdlib modules

2005-04-10 Thread "Martin v. Löwis"
Kay Schluehr wrote: > I slightly disagree. It's a symptom. The example of the path-module is > instructive because it actually represents path objects not just a > bunch of functions in isolation that manipulate strings that can be > interpreted as paths. I started to read in the lib.py documentati

Re: Unit tests in Leo

2005-04-10 Thread [EMAIL PROTECTED]
Hello Tomi, I'm not really sure about your question, but concerning unit testing you can do a simple test. import unittest First: in your module (where you define functions) you should create a class which use unittest.TestCase as your superclass. Second: Use method runTest to type your test

Re: Does Tk provide ComboBox ?

2005-04-10 Thread Markus Weihs
> Does Tkinter provide a combobox or do I have to find some way of making > a listbox do the job ? Hi! In Tkinter this is called "OptionMenu". If you don't like it, PMW (http://pmw.sourceforge.net/) has a *real* Combobox :) Regards, mawe -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on some stdlib modules

2005-04-10 Thread Kay Schluehr
Martin v. Löwis wrote: > That said, if the people who want a path object would get together > and contribute one, the library could be extended. I don't know > whether this would be an improvement, though - os.path could not > go away for backwards compatibility, so users would now have *two* > wa

Re: check instace already running...

2005-04-10 Thread Aldric L'Hernault
Sidharth Kuruvila a écrit : I haven't tested this. There is probably a better way of doing this looking at process information. I use a lock file to mark that the program is already running. The problem is that for an abrupt shutdown the file might not be removed. To enhance your check, just write

Re: Thoughts on some stdlib modules

2005-04-10 Thread Fredrik Lundh
Kay Schluehr wrote: > You have already given the arguments in Your discussion above. I > personally never use the standard-lib XML parser, but pyRXP/pyRXPU > which is fast, stores objects in pythonic list/tuple/dict structures > and provides access by lazy tagging it's also GPL:ed, and the namesp

Signals and system

2005-04-10 Thread T Koster
Hi folks, My python program needs to download a number of files. Each file comes as a list of mirrors of that file. Currently, I am using system (os.system) to run wget. The mechanism is in a loop, so that it will try all the mirrors while wget is exiting with a non-zero exit status. This is

Re: very simple tkinter demo program

2005-04-10 Thread max(01)*
Samantha wrote: I can not get it to run. S sorry about that. baybe it is a conflict between tabstop width in my editor and in my newsreader. i substituted tabs with spaces and i hope now you can run it. bye macs cuthere from Tkinter import * class MiaApp: def __init__(self, genitore):

Re: email and smtplib modules

2005-04-10 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-04-09 16:42:04 -0500: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > Hi, > > > > I'm writing a small script that generates email and I've noticed that: > > > > 1) one should add the 'To' and 'CC' headers to the email message > > 2) one needs to specify the recip

Re: Thoughts on some stdlib modules

2005-04-10 Thread Fredrik Lundh
Kay Schluehr wrote: > I fear that Python 3.0 becomes some kind of vaporware in the Python > community that paralyzes all redesign efforts on the std-lib. that, combined with the old observation that CPython developers, when given a choice, prefer to write C code over Python code, is making the st

Re: Signals and system

2005-04-10 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-04-10 20:55:05 +1000: > Hi folks, > > My python program needs to download a number of files. Each file comes > as a list of mirrors of that file. > > Currently, I am using system (os.system) to run wget. The mechanism is > in a loop, so that it will try all the mirr

Re: Does Tk provide ComboBox ?

2005-04-10 Thread Harlin Seritt
Hi Markus, Pmw has a ComboBox but it's ugly IMO. Tix also has one -- but it's not much different than the Pmw one. I created one and put it in a Tkinter.py file. You can see mine here: http://www.seritt.org/pub/tkinter/Tkinter-03132005.py -- I can honestly say it's almost fully functional :-) Ser

Re: serialize a tkinter thing

2005-04-10 Thread Harlin Seritt
No reason why they shouldn't be. -Harlin -- http://mail.python.org/mailman/listinfo/python-list

Re: very simple tkinter demo program

2005-04-10 Thread Harlin Seritt
Max, Thanks and good job! Harlin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 18, Issue 481

2005-04-10 Thread Lea.Cen
Who can give me Announcement of Wallop? Sorry, I'm from china! Who can? Thank you! Who can give me Announcement of Wallop? Description: Binary data -- http://mail.python.org/mailman/listinfo/python-list

Re: Signals and system

2005-04-10 Thread Fredrik Lundh
"T Koster" wrote: > Currently, I am using system (os.system) to run wget. The mechanism is > in a loop, so that it will try all the mirrors while wget is exiting > with a non-zero exit status. This is working fine as long as the user > feels there is no need to interrupt it. any reason you cann

Re: workaround for generating gui tools

2005-04-10 Thread Diez B. Roggisch
> Domain-specific abstractions do that *faster* than GUI designers, not > slower. And better, too, since every iteration tends to be fully > functional and not just a "let's see what this looks like" prototype. Can you show me some working, in-use example for that? I _seriously_ doubt that the pr

Re: THE GREATEST NEWS EVER ! °º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°`°º·...·°` (new

2005-04-10 Thread Charlie9
On 9 Apr 2005 21:36:06 -0700, [EMAIL PROTECTED] (Anthony) wrote: >I thought 'The Greatest News Ever' might mean something serious like >transfer of the classic Beatles albums to SACD. >But no, it's just religious crap. Now that the Pope's dead, do you >think we could declare christianity officiall

Help understanding code

2005-04-10 Thread Dhruva Hein
Hi. I am trying to understand a section of code written for Plone and I am having problems understanding the Python syntax in a few of the following lines. I'd be grateful if someone could help me understand what's happening in the lines I've marked. I can't see how the dictionary is built or h

Re: Puzzling OO design problem

2005-04-10 Thread Bengt Richter
On 9 Apr 2005 03:49:19 -0700, "George Sakkis" <[EMAIL PROTECTED]> wrote: >"Michael Spencer" <[EMAIL PROTECTED]> wrote: >> >> George, >> >> since you explicit allowed metaprogramming hacks :-), how about >something like >> this (not tested beyond what you see): >> >> [snipped] >> > >Nice try, but i

Re: Positions of regexp groups

2005-04-10 Thread Magnus Lie Hetland
In article <[EMAIL PROTECTED]>, Tim Peters wrote: >[Magnus Lie Hetland] >> Just a quick question: Does anyone have a simple way of finding the >> positions (start, end) of the groups in a regexp match? AFAICS, the re >> API can only return the contents...? > >Read the docs for match objects, esp. t

Re: Help understanding code

2005-04-10 Thread Fredrik Lundh
Dhruva Hein wrote: > Hi. I am trying to understand a section of code written for Plone and I > am having problems understanding the Python syntax in a few of the > following lines. > > I'd be grateful if someone could help me understand what's happening in > the lines I've marked. I can't see how

Problems with dparser grammar

2005-04-10 Thread Joachim Mårtensson
Hello, I am playing around a little bit with dparser, and I thought that maybe someone on this list can help me out(There does not seem to be a dparser list, atleast not an active one). I am total n00b to parsers so this might be very easy. I want a parser that can parse both these lines (What

Re: Help understanding code

2005-04-10 Thread elbertlev
Reading the language tututorial would help you a lot :( === what is the difference between pc and pc()? pc = getToolByName() - returnes a refference to a method pc is a refference to a method, pc() is a method invocation. numbers = {"total":len(results),"bytype":{}

Re: Thoughts on some stdlib modules

2005-04-10 Thread Kay Schluehr
Fredrik Lundh wrote: > Kay Schluehr wrote: > > > You have already given the arguments in Your discussion above. I > > personally never use the standard-lib XML parser, but pyRXP/pyRXPU > > which is fast, stores objects in pythonic list/tuple/dict structures > > and provides access by lazy tagging

Re: serialize a tkinter thing

2005-04-10 Thread jepler
I suspect you're right. Tkinter.Variable holds a reference to the tkapp instance, which doesn't seem likely to be picklable. Imagining that tkapp instances *were* picklable, unpickling the stringvar would get you a whole new application toplevel that you didn't want. You might be able to extend

Re: Thoughts on some stdlib modules

2005-04-10 Thread Fredrik Lundh
Kay Schluehr wrote: > > it's also GPL:ed, and the namespace support is totally broken. there > > are faster solutions out there with Python-compatible licenses. > > Interesting. Which implementation "out there" ( so not in the std-lib ) > that maps the whole XML into an internal structure and mak

Re: check instace already running...

2005-04-10 Thread Fabio Pliger
"Aldric L'Hernault" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > Sidharth Kuruvila a écrit : > > I haven't tested this. There is probably a better way of doing this > > looking at process information. I use a lock file to mark that the > > program is already running. The pr

Re: Does Tk provide ComboBox ?

2005-04-10 Thread jepler
Another Tk combobox is part of "bwidget". A Python wrapper can be found at http://tkinter.unpythonic.net/bwidget/ http://unpythonic.net/cgi-bin/viewcvs.cgi/bwidget/ I think the appearance of the combobox is fairly close to the win9x look, especially when used with my "options.py"

Re: Thoughts on some stdlib modules

2005-04-10 Thread Kay Schluehr
Fredrik Lundh wrote: > here are three alternatives: > > ltree (http://codespeak.net/lxml/) > libxml2 (http://xmlsoft.org/downloads.html) > celementtree (http://effbot.org/zone/celementtree.htm) Thanks, Fredrik, I will take a look. Ciao, Kay -- http://mail.python.org/mailman/listin

Re: Distributing Python Apps and MySQL

2005-04-10 Thread Dave Cook
On 2005-04-07, dcrespo <[EMAIL PROTECTED]> wrote: > Hi there... I want to distribute my python apps and the MySQL Database > in the easiest way possible. I mean a user just run the installation > file and all is automaticly installed. Any suggestions? sqlite is even easier: a single DLL for the e

Re: workaround for generating gui tools

2005-04-10 Thread Dave Cook
On 2005-04-09, flupke <[EMAIL PROTECTED]> wrote: > i create my GUIs mainly via wxGlade. However when you start of to > program and want to do some rearranging to the gui, wxglade overwrites > your file and you've got to put your own code back in. How about generating XRC files instead of Python

UselessPython 2.0

2005-04-10 Thread Pokerface
Dear Pythonistas, USELESSPYTHON (www.uselesspython.com) has finally come of age. After almost two years of hemming and hawing, we've finally put our nose to the grindstone and cranked out version 2.0 of everyone's favorite snippet site. Our next trick: fill it. That's where everyone here comes

Re: Best editor?

2005-04-10 Thread LittleJohn
Mike Meyer wrote: > For quick edits (as either root or me) I use ex. I can't get past ed > not having a prompt. For a Linux gui editor, try NEdit. It's almost identical to the old PFE editor for Windoze and it 'knows' Python. LittleJohn Madison, AL -- http://mail.python.org/mailman/listinfo/py

Why does StringIO discard its initial value?

2005-04-10 Thread Leif K-Brooks
When StringIO gets an initial value passed to its constructor, it seems to discard it after the first call to .write(). For instance: >>> from StringIO import StringIO >>> buffer = StringIO('foo') >>> buffer.getvalue() 'foo' >>> buffer.write('bar') >>> buffer.getvalue() 'bar' >>> buffer.write('ba

Re: EOL created by .write or .encode

2005-04-10 Thread Alan Mackenzie
In comp.emacs.xemacs Xah Lee <[EMAIL PROTECTED]> wrote: > I found the problem now. (after some one hour debug time) Python > didn't have problem. Emacs does. > If you open a file in emacs, it will open fine regardless whether the > EOL is ascii 10 or 13. (unix or mac) This is a nice feature. Howe

templating system

2005-04-10 Thread Ksenia Marasanova
Hi, I am looking for fast, simple templating system that will allow me to do the following: - embed Python code (or some templating code) in the template - generate text output (not only XML/HTML) I don't need a framework (already have it), but just simple templating. The syntax I had in mind is

Re: email and smtplib modules

2005-04-10 Thread [EMAIL PROTECTED]
Hi Mike, Thanks for the quick tutorial :) Quite helpful. -- http://mail.python.org/mailman/listinfo/python-list

numarray.array can be VERY slow

2005-04-10 Thread Edward C. Jones
#! /usr/bin/env python """Should this program take 4.3 seconds to run? I have a Linux PC with an AMD Athlon XP 2000+ chip (1.7Gh). I use Python 2.4.1 and numarray 1.2.3, both compliled from source.""" import time, numarray from numarray.numerictypes import * nested = [] for i in range(8):

Re: UselessPython 2.0

2005-04-10 Thread beliavsky
Nice idea for a site, but I suggest renaming it to something like FunPython.com . My guess from reading the subject of your message was that you hated Python! Besides, "fun" is shorter than "useless" and is therefore more Pythonic :). -- http://mail.python.org/mailman/listinfo/python-list

Re: check instace already running...

2005-04-10 Thread John Ridley
--- Fabio Pliger <[EMAIL PROTECTED]> wrote: > Yeah, but how can i retrieve my PID number?And how do i check if the > process > who has written the file is still alive?If there a way to have the > list of > the precesses running? This subject has come up before. The thread starts here: http://mai

Re: workaround for generating gui tools

2005-04-10 Thread Jeremy Bowers
On Sun, 10 Apr 2005 13:57:26 +0200, Diez B. Roggisch wrote: >> Domain-specific abstractions do that *faster* than GUI designers, not >> slower. And better, too, since every iteration tends to be fully >> functional and not just a "let's see what this looks like" prototype. > > Can you show me som

Re: Thoughts on some stdlib modules

2005-04-10 Thread "Martin v. Löwis"
Fredrik Lundh wrote: > if I were in charge Would you like to be? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on some stdlib modules

2005-04-10 Thread Ron_Adam
On Sun, 10 Apr 2005 13:18:01 +0200, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Kay Schluehr wrote: > >> I fear that Python 3.0 becomes some kind of vaporware in the Python >> community that paralyzes all redesign efforts on the std-lib. Even if Python 3.0 never materializes, The documented PEP m

Re: very simple tkinter demo program

2005-04-10 Thread Samantha
Thanks that worked. S "max(01)*" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Samantha wrote: >> I can not get it to run. >> S > > sorry about that. baybe it is a conflict between tabstop width in my > editor and in my newsreader. > > i substituted tabs with spaces and i hope now

Smart help again

2005-04-10 Thread bearophileHUGS
Hello, here I extend the idea of the smart help I've discussed recently. When I receive an error like: TypeError: fun() takes exactly 2 arguments (1 given) I'd also like to see that method/function parameters (or the first line of its docstring). >From a discussion with gentle programmers in anot

Re: numarray.array can be VERY slow

2005-04-10 Thread ChinStrap
Yes because that is a bad way to things. There is no reason to be working with a list when it could be done directly with numarray. -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzling OO design problem

2005-04-10 Thread Dirk Thierbach
George Sakkis <[EMAIL PROTECTED]> wrote: >>A1 - A2 - A3 - A4 - ... >>|||| >>B1 - B2 - + - B4 - ... >>|||| >>C1 - + - C3 - + - ... >>|||| >>D1 - D2 - + - D4 - ... >>|||| >> The solution is simply to include C3 in th

Document exchange!

2005-04-10 Thread James
This is not so much as a Python question though I will implement it in it. I am looking to securely aggregate documents based on a metadata from multiple providers. I am getting the feeling that I am reinventing the wheel. If anyone knows similar work elsewhere, please point me to it. Security an

THE GREATEST NEWS EVER!!! °º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.· (newsgroup-post 130)

2005-04-10 Thread RonGrossi_38193
The Greatest News Ever!!! click link http://groups-beta.google.com/group/alt.politics.bush/browse_thread/thread/9b420fd9fc320e49/0215b46e845a8553#0215b46e845a8553 ·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.··._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·

Re: Why does StringIO discard its initial value?

2005-04-10 Thread jepler
Maybe this short interactive session can give you an idea why. >>> from StringIO import StringIO >>> b = StringIO("123456789") >>> b.tell() 0 >>> b.write("abc") >>> b.getvalue() 'abc456789' >>> b.tell() 3 StringIO seems to operate like a file opened with "r+" (If I've got my modes right): it is o

Re: Thoughts on some stdlib modules

2005-04-10 Thread Fredrik Lundh
Martin v. Löwis wrote: > For a number of libraries added recently, I heard lots of complaints > how terrible they are to use, including, in particular, the XML > and logging libraries, and the Unicode type, and that "something > else" is so much easier to use. Why is it that the authors of > "some

Re: numarray.array can be VERY slow

2005-04-10 Thread Steven Bethard
Edward C. Jones wrote: #! /usr/bin/env python """Should this program take 4.3 seconds to run? I have a Linux PC with an AMD Athlon XP 2000+ chip (1.7Gh). I use Python 2.4.1 and numarray 1.2.3, both compliled from source.""" import time, numarray from numarray.numerictypes import * nested = []

hello

2005-04-10 Thread Mage
Hello, I started learning python 2 days ago because the pgsql / plperl is buggy. I think I will love it and I will use it not only for stored sql procedures but also for fun. The only bad thing I found so far is that the tutorial is full of "while True... break". Of course I like John Cle

Creating a Package

2005-04-10 Thread yuba
I have written an object to handle dealing with fixed and delimited records [Note: This is the routine I talked about at PyCon and many wanted to me help out but I lost your names. There's still work to be done so email me if you're still interested]. Most of the version 1.0 heavy lifting is comp

Re: Counting iterations

2005-04-10 Thread Derek Basch
Interesting stuff Andrew. I do generally avoid string concantination for the reason listed in the Python Performance Tips but your analysis kinda puts that in question. Such a dense discussion for me just trying to find the enumerate() function :). I guess that is why the python list is so great. Y

Re: Smart help again

2005-04-10 Thread [EMAIL PROTECTED]
You can create your own Exception class, based on thisrecipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52215, it will look like -import sys, traceback - -class Error: -def __init__(self, arg): -self._arg = arg -tb = sys.exc_info()[2] -while 1: -

Re: workaround for generating gui tools

2005-04-10 Thread Ken Godee
Jeremy Bowers wrote: On Sun, 10 Apr 2005 13:57:26 +0200, Diez B. Roggisch wrote: Domain-specific abstractions do that *faster* than GUI designers, not slower. And better, too, since every iteration tends to be fully functional and not just a "let's see what this looks like" prototype. Can you show

Re: numarray.array can be VERY slow

2005-04-10 Thread Edward C. Jones
Steven Bethard wrote: > As mentioned, this has nothing to do with numarray, and everything to > do with your inexplicable use of lists. Why don't you just write this > as: > > arr = numarray.ones((8, 8, 256, 256), Float64) The code I posted was simplified from a larger program which I have now re

Re: Https Form Page

2005-04-10 Thread Joshua Ginsberg
It all really, really, really depends on your script processing the form. My suggestion is to use the openssl s_client program, manually submit your data, and see what your server is responding with. -jag <>Joshua Ginsberg -- [EMAIL PROTECTED] Brainstorm Internet Network Operations 970-247-1442

Re: numarray.array can be VERY slow

2005-04-10 Thread Steven Bethard
Edward C. Jones wrote: Steven Bethard wrote: > As mentioned, this has nothing to do with numarray, and everything to > do with your inexplicable use of lists. Why don't you just write this > as: > > arr = numarray.ones((8, 8, 256, 256), Float64) The code I posted was simplified from a larger

Re: numarray.array can be VERY slow

2005-04-10 Thread Robert Kern
Edward C. Jones wrote: Steven Bethard wrote: > As mentioned, this has nothing to do with numarray, and everything to > do with your inexplicable use of lists. Why don't you just write this > as: > > arr = numarray.ones((8, 8, 256, 256), Float64) The code I posted was simplified from a larger

Behavioural identity - a short discussion

2005-04-10 Thread Kay Schluehr
In mathematics two functions can be considered equal when they represent the same function graph. This is nothing but a set-theoretical identity. It is a nice criterion in theory bad a bad one in practice because it is impossible to calculate all values of an arbitrary function and this is true not

Re: Thoughts on some stdlib modules

2005-04-10 Thread "Martin v. Löwis"
Fredrik Lundh wrote: > because we're not willing to go through endless PEP processes, > generate patches that end up sitting on sourceforge for years, deal > with shitstorms initiated by developers of "competing" libraries, sign > over our copyrights to the PSF, loose control over the code base, >

Dictonary persistance weirdness

2005-04-10 Thread Gonzalo Sainz-Trápaga (GomoX)
Hi, I've posted this to [EMAIL PROTECTED] and got no answers, so i'm reposting it here, I really hope someone can help me out. -- Hi, I'm building my first application with mod_python. I am using Ian Bicking's SQLObject, validators and HTMLfill among other tools. I built a custom handler that

Re: Thoughts on some stdlib modules

2005-04-10 Thread Fredrik Lundh
Martin v. Löwis wrote: > I can see why you are not willing to do some of these things. But > I can't see why that is for other things. For example, why are you > not willing to license your contribution to the PSF (nobody asks > you to "sign it over")? Because the software already has a license?

Python 2.4.1 install broke RedHat 9 printconf-backend

2005-04-10 Thread BrianS
Hi, I'm trying to learn Python and wanted to play with Tkinter. I couldn't get it to work so I figured it would help if I installed the newest verison of Python. I downloaded the source, compiled it and installed it. No problem. The next time I booted my machine I the following errors when it

Re: workaround for generating gui tools

2005-04-10 Thread Jeremy Bowers
On Sun, 10 Apr 2005 13:02:27 -0700, Ken Godee wrote: > The original poster was just asking for an example of > how to sub class his code generated form into his program > for easy future updates, a "VERY STANDARD" way of doing it. I recognize your sarcasm, and I recognize the poor attitude it show

Re: Python 2.4.1 install broke RedHat 9 printconf-backend

2005-04-10 Thread Edward Diener
BrianS wrote: > Hi, > > I'm trying to learn Python and wanted to play with Tkinter. I > couldn't get it to work so I figured it would help if I installed the > newest verison of Python. I downloaded the source, compiled it and > installed it. No problem. The next time I booted my machine I the

NYZPUG: Does it still exist?

2005-04-10 Thread Steve Holden
Following the NYZPUG link at www.python.org gives a Server Application Error (this for a very simple link: http://www.nyzpug.org/). Does anyone know if it's still active? regards Steve -- Steve Holden+1 703 861 4237 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Py

help with wxPython and wxGrid

2005-04-10 Thread Sam the Cat
using "from wxPython.wx import *" under python2.3 I cannot seem to find the wxGrid class -- it says its undefined -- am I missing something obvious ? I know the globalspace import is not the best, but that how I got started ;) -- any help owuld be appreciated -- http://mail.python.org/mailman/l

Re: Unit tests in Leo

2005-04-10 Thread Tomi Lindberg
[EMAIL PROTECTED] wrote: Hello Tomi, I'm not really sure about your question, but concerning unit testing you can do a simple test. No problem. I found the Leo forums at Source Forge and I've already received some answers in there. Thanks for replying though. -- "Nowhere in me is the presence of

Re: templating system

2005-04-10 Thread Steve Holden
Ksenia Marasanova wrote: Hi, I am looking for fast, simple templating system that will allow me to do the following: - embed Python code (or some templating code) in the template - generate text output (not only XML/HTML) I don't need a framework (already have it), but just simple templating. The s

Re: templating system

2005-04-10 Thread Erik Max Francis
Ksenia Marasanova wrote: I am looking for fast, simple templating system that will allow me to do the following: - embed Python code (or some templating code) in the template - generate text output (not only XML/HTML) I don't need a framework (already have it), but just simple templating. The synta

Re: Dictonary persistance weirdness

2005-04-10 Thread John Machin
On Sun, 10 Apr 2005 19:07:23 -0300, Gonzalo Sainz-Trápaga (GomoX) <[EMAIL PROTECTED]> wrote: >-- wrappers.py - >class VarsWrapper: >def __init__(self,req): >self.fs = util.FieldStorage(req) > >def get_vars(): >d = {} >for each in self.fs.list

Re: UselessPython 2.0

2005-04-10 Thread Thomas Moore
I guess when useless, nothing cannot be done. - Original Message - From: <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Monday, April 11, 2005 12:17 AM Subject: Re: UselessPython 2.0 > Nice idea for a site, but I suggest renaming it to something like > FunPython.com . My gu

Re: Dictonary persistance weirdness

2005-04-10 Thread John Machin
On Sun, 10 Apr 2005 19:07:23 -0300, Gonzalo Sainz-Trápaga (GomoX) <[EMAIL PROTECTED]> wrote: >def get_vars(): >d = {} >for each in self.fs.list: >self.d[x.name] = x.value >return d > ... and didn't you mean def get_vars(self): ? -- http://mail.pyth

Re: workaround for generating gui tools

2005-04-10 Thread Bengt Richter
On Sat, 9 Apr 2005 19:22:16 +0200, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Reinhold Birkenfeld wrote: > >> It's evil anyway (for more complex applications) to put GUI construction >> in your code. GUI should be described appropriately in data files. > >why use data files when you have an extre

RE: compound strip() string problem

2005-04-10 Thread Tony Meyer
> As Sidharth Kuruvila pointed out, time.strftime() is probably > the best choice for your situation. For the general case of > removing whitespace from a sting, one method is: > > ''.join(mystring.split()) Alternatively, you could do something like: import string for c in string.whitespace:

Re: Thoughts on some stdlib modules

2005-04-10 Thread Terry Hancock
On Sunday 10 April 2005 05:14 pm, Fredrik Lundh wrote: > I'm not talking about things that absolutely have to be in the Python > interpreter core; I'm talking about things that *could* be bundled > with the standard distribution, *without* having to be relicensed, > or be forever maintained by the

Re: Thoughts on some stdlib modules

2005-04-10 Thread Robert Kern
Terry Hancock wrote: On Sunday 10 April 2005 05:14 pm, Fredrik Lundh wrote: I'm not talking about things that absolutely have to be in the Python interpreter core; I'm talking about things that *could* be bundled with the standard distribution, *without* having to be relicensed, or be forever maint

Re: Why does StringIO discard its initial value?

2005-04-10 Thread Raymond Hettinger
[Leif K-Brooks] > The obvious workaround is to call buffer.write() with the initial value > instead of passing it to StringIO's constructor, More than just a workaround, it is the preferred approach. That makes is easier to switch to cStringIO where initialized objects are read-only. > Is this

Re: Behavioural identity - a short discussion

2005-04-10 Thread Terry Reedy
"Kay Schluehr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > class A(object): >def __init__(self): >raise NotImplemented > > We can regard class A as a "pure abstract" class. It is impossible to > create instances of A. You see that parameter 'self'? When __init__ is

Re: Dictonary persistance weirdness

2005-04-10 Thread Gonzalo Sainz-Trápaga (GomoX)
Hi John, Thanks for your reply, I was feeling pretty desperate already with no one talking to me :( On Mon, 11 Apr 2005 11:46:20 +1000, John Machin wrote: > Are you sure that is the code that you are executing? What is "x"? What is > "self.d"? "each" is not used. Even if "x" and "self.d" do exist,

Re: Counting iterations

2005-04-10 Thread Terry Reedy
"runes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > [Andrew Dalke] >> I therefore disagree with the idea that simple >> string concatenation is always to be eschewed >> over string interpolation. String cat (+) is fine for joining a few short strings. > Andrew, what you writ

Re: templating system

2005-04-10 Thread Ron_Adam
On Sun, 10 Apr 2005 17:55:06 +0200, Ksenia Marasanova <[EMAIL PROTECTED]> wrote: >Hi, > >I am looking for fast, simple templating system that will allow me to >do the following: >- embed Python code (or some templating code) in the template >- generate text output (not only XML/HTML) > >I don't ne

PIGIP Meeting -- Python Interest Group In Princeton

2005-04-10 Thread [EMAIL PROTECTED]
Python Interest Group In Princeton (PIGIP) PIG/IP will hold its fourth meeting on Tuesday April 12, 2005 at the Lawrenceville Library. Unfortunately, the Lawrenceville library has no free rooms at the usual 3rd Wednesday time. We will be reviewing more of the Python Tutorial (we last left off fini

Doubt regarding sorting functions

2005-04-10 Thread praba kar
Dear All, I am new to Python. I am in need of some sorting functions (eg) numerical sorting functions and alphapetical sorting functions. I have searched through net But I cannot find any regarding this so If anyone know regarding this. Kindly mail me as early as possible with regards

non-ascii charater image gereration with PIL

2005-04-10 Thread Daewon YOON
Hi. I'm a newbie to this python world. PIL has 'text(position, string, options)' method in its ImageDraw module. Does this work with unicode or other 2byte encoded string? It seems not working on my python2.3.5 with PIL 1.1.5. How can I accomplish this task? Specifically I'm trying to generate Ha

Re: help with wxPython and wxGrid

2005-04-10 Thread vincent wehren
"Sam the Cat" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | using "from wxPython.wx import *" under python2.3 I cannot seem to find the | wxGrid class -- it says its undefined -- am I missing something obvious ? I | know the globalspace import is not the best, but that how

Re: Thoughts on some stdlib modules

2005-04-10 Thread Robert Kern
Fredrik Lundh wrote: I'm not talking about things that absolutely have to be in the Python interpreter core; I'm talking about things that *could* be bundled with the standard distribution, *without* having to be relicensed, or be forever maintained by the CPython developers. (the Linux distributor

web authoring tools

2005-04-10 Thread Brandon J. Van Every
As is easily noticed, my website sucks. Enough people keep ragging on me about it, that maybe I'll up and do something about it. However, I currently have FrontPage 2000 and I hate it. Ideally, I would like an open source website + html design tool implemented in Python, so that possibly someday

database in python ?

2005-04-10 Thread [EMAIL PROTECTED]
Hello I need to build table which need searching data which needs more power then dictionary or list in python, can anyone help me what kind of database suitable for python light and easy to learn. Is mySQL a nice start with python ? Sincerely Yours, Pujo -- http://mail.python.org/mailman/listin

Re: database in python ?

2005-04-10 Thread Klaus Alexander Seistrup
[EMAIL PROTECTED] wrote: > I need to build table which need searching data which needs more > power then dictionary or list in python, can anyone help me what > kind of database suitable for python light and easy to learn. Is > mySQL a nice start with python ? You could try SQLite for Python:

  1   2   >