Re: "Temporary" Variable

2006-02-22 Thread Steven D'Aprano
[EMAIL PROTECTED] wrote: > Problem: I wish to run an infinite loop and initialize a variable on > each iteration. Sort of like, "Enter Data", test it, "No good!", "Next > Try?", test it, etc. What I've tried is simply while 1: var1 = > raw_input, test var1, then run through the loop again. What re

Python 2.4.2 Solaris packages

2006-02-22 Thread napobo3
I've build the Python 2.4.2 Solaris packages for x86 and sparc architectures http://napobo3.blogspot.com/2006/02/sunwpython-242-for-solaris.html You're welcome to download them. -- Leon -- http://mail.python.org/mailman/listinfo/python-list

Re: pyFltk-1.1

2006-02-22 Thread John M. Gabriele
{fixed top-posting} george williams wrote: > > This is to announce the first official release of pyFltk-1.1, > > the Python bindings for the cross platform GUI toolkit fltk-1.1 > > By god this sounds interesting I wish I > knew what you are talking about fltk (pronounced "full-tick" as in "C

Re: why don't many test frameworks support file-output?

2006-02-22 Thread Robert Kern
kanchy kang wrote: > i browsed the following frameworks briefly: nose, OOBTest, > testosterone, py.test, Sancho ... and found out they do support > imediate screen-output only. http://testoob.sourceforge.net/features.html Note the section on XML output. If you need it in a file, then you can use

Re: new wooden door step - fixing and finishing

2006-02-22 Thread John M. Gabriele
Jeffrey Schwab wrote: > jkn wrote: > > >> I was wondering about treating it >> wilth liberal amounts of Teak Oil or similar... > > > Some people, when confronted with a problem, think "I know, I’ll use > Teak Oil." Now they have two problems. Quit it! You're making me laugh too much and it'

Re: editor for Python on Linux

2006-02-22 Thread John M. Gabriele
Mladen Adamovic wrote: > Hi! > > I wonder which editor or IDE you can recommend me for writing Python > programs. I tried with jEdit but it isn't perfect. > NEdit -- (remove zeez if demunging email address) -- http://mail.python.org/mailman/listinfo/python-list

Re: pyFltk-1.1

2006-02-22 Thread andreas
To put it simply, if you think Tkinter is not very easy/simple/fast/... (fill in your favourite adjective here) then you might want to try pyFltk. It basically helps you to build simple user interfaces from Python. Regards Andreas Held http://pyfltk.sourceforge.net -- http://mail.python.org/mai

why don't many test frameworks support file-output?

2006-02-22 Thread kanchy kang
i browsed the following frameworks briefly: nose, OOBTest, testosterone, py.test, Sancho ... and found out they do support imediate screen-output only. _ Don’t just search. Find. Check out the new MSN Search! http://search.msn.cl

Re: except clause not catching IndexError

2006-02-22 Thread Steven D'Aprano
Erwin S. Andreasen wrote: > Did you by any chance do something like: > > except ValueError, IndexError: > > at some point earlier in this function? That, when catching ValueError > assigns the resulting exception to IndexError (and so the following > except IndexError: wouldn't work as IndexErro

Re: What's up with this code?

2006-02-22 Thread plahey
Scott, this was a really clever catch, but I don't agree with the solution. The problem is your assumption of how zip/izip _must_ work. I don't think there is any contract that states that they will always advance the first argument first and the second argument second... that is an implementatio

Re: PyUNO with different Python

2006-02-22 Thread Stefan Behnel
Méta-MCI schrieb: > The second way don't run: > > Traceback (most recent call last): > File "C:\Program Files\OpenOffice.org 2.0\program\hello_world.py", line 1, > in? > import uno > File "C:\Program Files\OpenOffice.org 2.0\program\uno.py", line 37, in ? > import pyuno > ImportError:

Re: bsddb3 database file, what are the __db.001, __db.002, __db.003 files for?

2006-02-22 Thread Klaas
Claudio Grondi wrote: > Beside the intended database file >databaseFile.bdb > I see in same directory also the >__db.001 >__db.002 >__db.003 > files where >__db.003 is ten times as larger as the databaseFile.bdb > and >__db.001 has the same size as the databaseFile.bdb .

Re: With pyMinGW

2006-02-22 Thread A.B., Khalid
[EMAIL PROTECTED] wrote: > Thank you for your answers, Khalid. > > > It seems you may be using an old version of pyMinGW, > > I have downloaded it yesterday from your site. > > > > the relevant part dealing with include directories in zlib.mak > > should read now as follows: > > I have checked, and

Re: May i customize basic operator (such as 1==3)?

2006-02-22 Thread kanchy kang
Is there any reviews/remarks on these frameworks? nose, OOBTest,testosterone, py.test, Sancho. From: Robert Kern <[EMAIL PROTECTED]> To: python-list@python.org Subject: Re: May i customize basic operator (such as 1==3)? Date: Wed, 22 Feb 2006 19:22:00 -0600 kanchy kang wrote: > Is there any im

Re: "Temporary" Variable

2006-02-22 Thread [EMAIL PROTECTED]
I tried this code and it worked fine: while 1: var1 = raw_input("Enter a number: ") print "You entered:",var1 var1 = int(var1) + 1 print var1 -- http://mail.python.org/mailman/listinfo/python-list

"Temporary" Variable

2006-02-22 Thread darthbob88
Problem: I wish to run an infinite loop and initialize a variable on each iteration. Sort of like, "Enter Data", test it, "No good!", "Next Try?", test it, etc. What I've tried is simply while 1: var1 = raw_input, test var1, then run through the loop again. What results is var1 gets and keeps the f

bsddb3 database file, what are the __db.001, __db.002, __db.003 files for?

2006-02-22 Thread Claudio Grondi
I have just started to play around with the bsddb3 module interfacing the Berkeley Database. Beside the intended database file databaseFile.bdb I see in same directory also the __db.001 __db.002 __db.003 files where __db.003 is ten times as larger as the databaseFile.bdb and __

Re: "configuring" a class

2006-02-22 Thread Terry Hancock
On 22 Feb 2006 17:28:35 -0800 "Russ" <[EMAIL PROTECTED]> wrote: > I would like to let the user of one of my classes > "configure" it by activating or de-activating a particular > behavior (for all instances of the class). > One way to do this, I figured, is to have a static class > variable, along

Re: "configuring" a class

2006-02-22 Thread James Stroud
Russ wrote: > I would like to let the user of one of my classes "configure" it by > activating or de-activating a particular behavior (for all instances of > the class). > > One way to do this, I figured, is to have a static class variable, > along with a method to set the variable. However, I am

Re: Tix, spinboxes, and 1>=5

2006-02-22 Thread John McMonagle
On Wed, 2006-02-22 at 18:37 -0800, [EMAIL PROTECTED] wrote: > This odd bug has been annoying me for several days now. I finally got > round to making this, frankly hilarious, testcase: > > > from Tix import * > > def sayfive(num): > if num<5: print num,"< 5" > else: print num,">= 5" > >

Tix, spinboxes, and 1>=5

2006-02-22 Thread cjbackhouse
This odd bug has been annoying me for several days now. I finally got round to making this, frankly hilarious, testcase: from Tix import * def sayfive(num): if num<5: print num,"< 5" else: print num,">= 5" sayfive(4) sayfive(6) rootwnd=Tk() Control(rootwnd,command=sayfive).pack() rootwn

ANSWERED: event/job scheduling

2006-02-22 Thread john peter
about further investigation, i figured the basic answer out. gosh, i love python! :-)import sched, timedef print_time():    print "From print_time", time.time()if __name__ == '__main__':   s = sched.scheduler(time.time, time.sleep)    fmt = '%Y-%m-%d-%H:%M'    print time.time()

Re: Module question

2006-02-22 Thread Tuvas
Ahhh. Actually, I realized my problem was the fact that not everything had been loaded yet. Circular loading can be a bit difficult I can see... I guess I need to import the new module after x has been declared? Ei, I need this. Mod1.py x=1 from mod2.py import * = Mod2.py from mod1

"configuring" a class

2006-02-22 Thread Russ
I would like to let the user of one of my classes "configure" it by activating or de-activating a particular behavior (for all instances of the class). One way to do this, I figured, is to have a static class variable, along with a method to set the variable. However, I am stumped as to how to do

Re: May i customize basic operator (such as 1==3)?

2006-02-22 Thread Robert Kern
kanchy kang wrote: > Is there any improvement version for standard unittest module? > for example, output log information as files. Several! Some build on the framework of unittest.py: nose, OOBTest, testosterone. Some don't: py.test, Sancho. -- Robert Kern [EMAIL PROTECTED] "In the fields of h

Re: Little tool - but very big size... :-(

2006-02-22 Thread Giovanni Bajo
Felipe Almeida Lessa wrote: >> compared to the small wxPython tool that I compressed recently: 2,80 >> MB (2.942.543 Bytes) > > What about PyGtk? Does anybody have any figures? I can't test here > =(... I have a custom compilation script for PyQt which can package Qt 3.3.5 Core + OpenGL + Table i

Re: What's up with this code?

2006-02-22 Thread Scott David Daniels
Gregory Petrosyan wrote: > Hello, it's me again. > I am trying to optimise small module for working with polynomials, and > I have encountered problem: new, optimised, code, doesn't work in some > specific case. Here's the old version of the code: > > (3x^2 + 2x + 1 <=> poly([3, 2, 1]), btw) >

Re: May i customize basic operator (such as 1==3)?

2006-02-22 Thread kanchy kang
Is there any improvement version for standard unittest module? for example, output log information as files. >From: Kent Johnson <[EMAIL PROTECTED]> >To: python-list@python.org >Subject: Re: May i customize basic operator (such as 1==3)? >Date: Wed, 22 Feb 2006 06:07:35 -0500 > >Thomas Heller wr

Re: What's up with this code?

2006-02-22 Thread Gerard Flanagan
Gregory Petrosyan wrote: > Hello, it's me again. > I am trying to optimise small module for working with polynomials, and > I have encountered problem: new, optimised, code, doesn't work in some > specific case. Here's the old version of the code: > > (3x^2 + 2x + 1 <=> poly([3, 2, 1]), btw) > >

Re: new wooden door step - fixing and finishing

2006-02-22 Thread Grant Edwards
On 2006-02-23, Jeffrey Schwab <[EMAIL PROTECTED]> wrote: >>> I'm considering having a go at replacing the wooden door step to >>> our back door. The original is loose and rotting. >> Some people, when confronted with a problem, think "I know, I'll use >> Teak Oil." Now they have two problems. Y

Using a list of RGB data for Canvas widget? [(R1, G1, B1), (R2, G2, B2) etc.]

2006-02-22 Thread Nainto
Hi, I have searched the arhives and Google, plus I have tried this on my own, but I cannot find a way to convert a list of RGB values to a Tkinter PhotoImage or BitmapImage to use with the Tkinter canvas widget. I'd rather not have to use PIL or anything but pure Python, it's included modules, and

Re: Pythonic gui format?

2006-02-22 Thread bearophileHUGS
Sorry for the late reply, I have some ideas about a possible GUI toolkit design (that works with one already done like GTK), I'll probably show them here. In the meantime I can show this one: http://thinlet.sourceforge.net/home.html I like it because the way GUIs are defined is quite short. bye,

Re: Cross-Platform Bonjour Module

2006-02-22 Thread Nainto
Take a look at: http://lists.apple.com/archives/bonjour-dev/2005/Jun/msg00018.html -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser and unicode: a simple solution?

2006-02-22 Thread Fuzzyman
Terry Hancock wrote: > On Wed, 22 Feb 2006 23:42:37 +0100 > Frank Niessink <[EMAIL PROTECTED]> wrote: > > I'm using ConfigParser to read and write simple > > configuration files. > > > > However, filenames may not be simple ascii strings, but > > can very well be > > unicode strings. > http://ww

Re: What's up with this code?

2006-02-22 Thread bearophileHUGS
Gregory Petrosyan: > coefs.extend(it.chain(rcoefs1, rcoefs2)) #? -- here is magic Can't you just do a couple of extend? Something like: coefs.extend(rcoefs1) coefs.extend(rcoefs2) This looks simpler and probably faster too. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-lis

Re: new wooden door step - fixing and finishing

2006-02-22 Thread Jeffrey Schwab
Jeffrey Schwab wrote: > jkn wrote: > >> Hi all >> I'm considering having a go at replacing the wooden door step to >> our back door. The original is loose and rotting. >> >> I'm sure some of this will be clearer when I remove the (metal) door >> frame - how is such a step fixed? Vertical frame

Re: Python vs. Lisp -- please explain

2006-02-22 Thread igouy
Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > "Chris Mellon" <[EMAIL PROTECTED]> wrote: > ... > > They won't say Java. Ask them why Python is interpreted and Java isn't > > and you'll have a hard time getting a decent technical answer, because > > Python isn't all that different from Java

Re: new wooden door step - fixing and finishing

2006-02-22 Thread Jeffrey Schwab
jkn wrote: > Hi all > I'm considering having a go at replacing the wooden door step to > our back door. The original is loose and rotting. > > I'm sure some of this will be clearer when I remove the (metal) door > frame - how is such a step fixed? Vertical frame fixings? Depends on your layou

Re: quick script to read digital terrain elevation data?

2006-02-22 Thread Kane
I have some in-house python for dem2xyz but it isn't pretty. I would suggest starting with ftp.blm.gov/pub/gis/dem2xyz6.zip ; it is a C program with source for just such conversions (my initial dem2xyz.py is a direct python rewrite of the C code). I think it's actually easier to read in C (when r

Cross-Platform Bonjour Module

2006-02-22 Thread Ross
Can anybody point me to a Python module for using the mDNSResponder stuff (http://developer.apple.com/networking/bonjour)? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser and unicode: a simple solution?

2006-02-22 Thread Terry Hancock
On Wed, 22 Feb 2006 23:42:37 +0100 Frank Niessink <[EMAIL PROTECTED]> wrote: > I'm using ConfigParser to read and write simple > configuration files. > > However, filenames may not be simple ascii strings, but > can very well be > unicode strings. http://www.google.com/search?hl=en&q=ConfigPa

Re: May i customize basic operator (such as 1==3)?

2006-02-22 Thread Robert Kern
Casey Hawthorne wrote: > Cannot one subclass the builtin types? Of course! But that won't change the method on instances of the original builtin type. > I have heard, that one should always use objects when programming and > avoid the builtin types! That's not particularly good advice for Python

Re: new wooden door step - fixing and finishing

2006-02-22 Thread Carl Friedrich Bolz
Robert Boyd wrote: > On 2/22/06, Magnus Lycka <[EMAIL PROTECTED]> wrote: > >>jkn wrote: >> >>>Hi all >> >>Hi! >> >> >>>I'm considering having a go at replacing the wooden door step to >>>our back door. The original is loose and rotting. >> >>Aha, like old perl scripts. >> >> >>>I'm sure some o

Re: Newbie question: Multiple installations of Python on Windows machines

2006-02-22 Thread Don Taylor
Fuzzyman wrote: > > It means installing a compiler (but I don't see a way around that) - > but this worked for me : > > http://www.vrplumber.com/programming/mstoolkit/index.html > > So long as the module can be installed with distutils, the instuctions > there will work for you. Hefty downl

Re: listdir() - any way to limit # of file entries?

2006-02-22 Thread Roger Upole
You can use win32file.FindFilesIterator to loop thru the files without creating a huge list of everthing in the folder. hth Roger "Peter A. Schott" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want to build a program that does some archiving. We have several pr

Re: pyFltk-1.1

2006-02-22 Thread george williams
By god this sounds interesting I wish I knew what you are talking about George-- Original Message - From: "andreas" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python.announce To: <[EMAIL PROTECTED]> Sent: Wednesday, February 22, 2006 6:14 AM Subject: ANN: pyFltk-1.1 > This is to announce the

Re: listdir() - any way to limit # of file entries?

2006-02-22 Thread Larry Bates
Peter A. Schott wrote: > I want to build a program that does some archiving. We have several programs > that have been dumping files into a folder (one folder) for some time now. I > want to limit the number of files returned by listdir to avoid trying to > build a > list with tons of entries.

Re: Attached images by plain email.

2006-02-22 Thread Ludwig
Seems like you are not providing a full path to the file 'check.jpg'. How is your program supposed to know where in the filesystem it is located? Either that, or you have to put the file in the same directory that on which the program is running. Also, you should use two backslashes in the name: p

Re: using breakpoints in a normal interactive session

2006-02-22 Thread R. Bernstein
[EMAIL PROTECTED] writes: > Is there a way to temporarily halt execution of a script (without using > a debugger) and have it put you in an interactive session where you > have access to the locals? Here's what I was able to do using the Extended Python debugger. http://bashdb.sourceforge.net/p

What's up with this code?

2006-02-22 Thread Gregory Petrosyan
Hello, it's me again. I am trying to optimise small module for working with polynomials, and I have encountered problem: new, optimised, code, doesn't work in some specific case. Here's the old version of the code: (3x^2 + 2x + 1 <=> poly([3, 2, 1]), btw) def __add__(self, other): "

Re: DatBases and Pickle Module

2006-02-22 Thread Larry Bates
Math wrote: > Hello, > > I wonder if someone can help me out. > My native is Dutch, sorry for this > > But I am writing this program, a program which uses Relational DataBase > for saving all kinds of information in records. > Now I saw another application which stores all kind of identical d

event/job scheduling

2006-02-22 Thread john peter
i'd like to do the following kind of event/job scheduling: run some task(s) (python code) everyday at (say) 8am for (say) a week.i need to do this for both windows xp and suse linux machines. although i know that i can use cron or its equivalent in windows to kick off the python interpreter,

Re: May i customize basic operator (such as 1==3)?

2006-02-22 Thread Casey Hawthorne
Cannot one subclass the builtin types? I have heard, that one should always use objects when programming and avoid the builtin types! Then one is prepared to change objects at will and not rely on any special properties of the builtin types! Robert Kern <[EMAIL PROTECTED]> wrote: >Casey Hawtho

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Roy Smith
Many people in this thread have said things like: > Interpreted? Compiled? Scripting language? Let me quote from the preface to "Programming Ruby: The Pragmatic Programmer's Guide" by David Thomas and Andrew Hunt (aka "the pickaxe book"). -- In the old days, the distinction between la

Re: [Python-de] PyUNO with different Python

2006-02-22 Thread Max Muxe
Am Mittwoch, den 22.02.2006, 16:39 +0100 schrieb Katja Süss: > Hi! > maybe somebody can give me an hint to my problem setting up PyUNO on my > Mac to work with my Python not the Python delivered with OpenOffice. > As said in installation instructions I've set >OPENOFFICE_PATH="/usr/lib/openoff

Re: Psychic bug

2006-02-22 Thread Alan Franzoni
Il Wed, 22 Feb 2006 19:04:48 +, Jennifer Hallinan ha scritto: > Genome is a string of integers in the range 0- 3, hence the > conversion. Genome is a *class*, i suppose from this code, and Mutate is... an instance method, I think. And self.genome is a string like composed of integers in the 0

ConfigParser and unicode: a simple solution?

2006-02-22 Thread Frank Niessink
Dear list members, I'm using ConfigParser to read and write simple configuration files. One of the items written is the file the user is currently working on, so that the application can load that same file when the user starts the application for a new session. However, filenames may not be s

Re: [Python-de] PyUNO with different Python

2006-02-22 Thread Max Muxe
Am Mittwoch, den 22.02.2006, 16:39 +0100 schrieb Katja Süss: > Hi! > maybe somebody can give me an hint to my problem setting up PyUNO on my > Mac to work with my Python not the Python delivered with OpenOffice. > As said in installation instructions I've set >OPENOFFICE_PATH="/usr/lib/openoff

Re: list assignment

2006-02-22 Thread Norvell Spearman
Jeffrey Schwab wrote: > TMTOWTDI, after all. :) A bit ironic that that's the official motto of Perl, don't you think? -- Norvell Spearman -- http://mail.python.org/mailman/listinfo/python-list

Re: listdir() - any way to limit # of file entries?

2006-02-22 Thread Paul Rubin
Peter A. Schott <[EMAIL PROTECTED]> writes: > Is there any way to build a list of the first 1000 files or so in a folder? The obvious way is first_1000 = os.listdir()[:1000] That does build a potentially bigger list in memory before chopping off the 1000 elements, but unless you're running ou

Re: list assignment

2006-02-22 Thread Norvell Spearman
Raymond Hettinger wrote: > It's not different. They are ways of writing the same thing. Lutz and Ascher have tuple and list assignment as separate entries in their assignment statement forms table so I was expecting there to be some difference; thanks for setting me straight. -- Norvell Spearm

Re: Question about struct.unpack

2006-02-22 Thread Scott David Daniels
Eric Jacoboni wrote: > But : >> nom = nomz.rstrip('\0') > > doesn't work for me: > nomz > 'Dupont\x00\x80\xbf\xff\xf70\x8f\xe0u\xa4\x00\x00.8\xfe\xfe\xfe\xff\x80\x80\x80\x80' > nom = nomz.rstrip('\0') nom > 'Dupont\x00\x80\xbf\xff\xf70\x8f\xe0u\xa4\x00\x00.8\xfe\xfe\xfe\xff\x8

listdir() - any way to limit # of file entries?

2006-02-22 Thread Peter A.Schott
I want to build a program that does some archiving. We have several programs that have been dumping files into a folder (one folder) for some time now. I want to limit the number of files returned by listdir to avoid trying to build a list with tons of entries. I then want to move those files in

Re: new wooden door step - fixing and finishing

2006-02-22 Thread Robert Boyd
On 2/22/06, Magnus Lycka <[EMAIL PROTECTED]> wrote: > jkn wrote: > > Hi all > > Hi! > > > I'm considering having a go at replacing the wooden door step to > > our back door. The original is loose and rotting. > > Aha, like old perl scripts. > > > I'm sure some of this will be clearer when I rem

Re: Newbie question: Multiple installations of Python on Windows machines

2006-02-22 Thread Thomas Heller
Don Taylor wrote: > I have Python 2.4.2 installed on a Windows XP machine. > > There is an application that I want to use that refuses to install > unless I have Python 2.3.x installed. (The only way that I can install > this is to use it's .exe installer) > > Can I install two versions of Pyt

Re: Newbie question: Multiple installations of Python on Windows machines

2006-02-22 Thread Fuzzyman
Don Taylor wrote: > Fuzzyman wrote: > > > A lot of 'exe' installers are special types of zip archvies. You might > > be able to open it using winzip or winrar and do a manual install. > > Interesting suggestion that would never have occured to me. One of the > unzippers I tried (IZArc) did show m

Re: Little tool - but very big size... :-(

2006-02-22 Thread Felipe Almeida Lessa
Em Qua, 2006-02-22 às 21:38 +0100, Gerhard Häring escreveu: > A Tkinter hello weights here 1,95 MB (2.049.264 Bytes) > > compared to the small wxPython tool that I compressed recently: 2,80 MB > (2.942.543 Bytes) What about PyGtk? Does anybody have any figures? I can't test here =(... -- "Quem

Re: Multi-threaded SSL

2006-02-22 Thread Heikki Toivonen
Kris Kowal wrote: > I started with Twisted, but, having looked as far as I can see, SSL is > either not implemented, or not documented for that library. There are > hints that it's in the works, but that's all. So, I've moved on. > > I'm using PyOpenSSL on a Debian box, and I started with the Act

Re: Newbie question: Multiple installations of Python on Windows machines

2006-02-22 Thread Don Taylor
Fuzzyman wrote: > A lot of 'exe' installers are special types of zip archvies. You might > be able to open it using winzip or winrar and do a manual install. Interesting suggestion that would never have occured to me. One of the unzippers I tried (IZArc) did show me a directory of the contents,

DatBases and Pickle Module

2006-02-22 Thread Math
Hello, I wonder if someone can help me out. My native is Dutch, sorry for this But I am writing this program, a program which uses Relational DataBase for saving all kinds of information in records. Now I saw another application which stores all kind of identical data in plain files, but wi

Re: list assignment

2006-02-22 Thread Jeffrey Schwab
Raymond Hettinger wrote: >> [spam, ham] = ['yum', 'YUM'] >> >>I don't see how this is any different than a tuple unpacking assignment: >> >> >>> a, b = 1, 2 > > > It's not different. They are ways of writing the same thing. TMTOWTDI, after all. :) -- http://mail.python.org/mailman/list

com inheritance

2006-02-22 Thread zaatar05
Hi I have a python class, which i want to wrap in a COM class Can the COM class inherit all the methods and attributes and thus be used by a COM client? example: class A: __init__(self, Param): self.Param = Param class COMA(A): _public_attributes_ = ["Param"] def __init__(self

Re: list assignment

2006-02-22 Thread Raymond Hettinger
> [spam, ham] = ['yum', 'YUM'] > > I don't see how this is any different than a tuple unpacking assignment: > > >>> a, b = 1, 2 It's not different. They are ways of writing the same thing. Raymond Hettinger -- http://mail.python.org/mailman/listinfo/python-list

Re: a little more help with python server-side scripting

2006-02-22 Thread John Salerno
Steve Holden wrote: > OK, what you need to ask them is whether they have installed Python as > an Active Scripting language. If they have then you can use it pretty > much like VBscript. Here's there latest: -- Please note that it is possible for the server to recognize bits of Python

Re: PyUNO with different Python

2006-02-22 Thread Katja Suess
Michele Petrazzo schrieb: > � wrote: > >>Hi! maybe somebody can give me an hint to my problem setting up PyUNO >>on my Mac to work with my Python not the Python delivered with >>OpenOffice. As said in installation instructions I've set >>OPENOFFICE_PATH="/usr/lib/openoffice/program" export >>PYTH

Re: Little tool - but very big size... :-(

2006-02-22 Thread Gerhard Häring
Max wrote: > Giovanni Bajo wrote: > >>There are also other choices that can be made. For instance, wxWidgets is >>*HUGE*. > > Indeed. Remember Tkinter is built-in. [...] Tkinter is only built-in in the sense that it's shipped with Python by default. It is not automatically part of a minimal Pyt

Re: redirecting to a content page

2006-02-22 Thread Shreyas
Thanks much, Location: took care of what I needed. I'll look to the http protocols for the future. Shreyas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Kay Schluehr
Paul Boddie wrote: > Kay Schluehr wrote: > > Paul Rubin wrote: > > > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > > > I talked to Richard Emslie recently and he told me that the PyPy team > > > > works on a mechanism to create CPython-extension modules written in > > > > RPython i.e. a staticall

list assignment

2006-02-22 Thread Norvell Spearman
In "Learning Python," by Lutz and Ascher, there's a table showing different assignment statement forms. One form shown is list assignment. The authors give this as an example: [spam, ham] = ['yum', 'YUM'] I don't see how this is any different than a tuple unpacking assignment: >>>

Re: Question about struct.unpack

2006-02-22 Thread Eric Jacoboni
Scott David Daniels <[EMAIL PROTECTED]> writes: Thanks for your explanations. But : > nom = nomz.rstrip('\0') doesn't work for me: >>> nomz 'Dupont\x00\x80\xbf\xff\xf70\x8f\xe0u\xa4\x00\x00.8\xfe\xfe\xfe\xff\x80\x80\x80\x80' >>> nom = nomz.rstrip('\0') >>> nom 'Dupont\x00\x80\xbf\xff\xf70\

Re: a little more help with python server-side scripting

2006-02-22 Thread Steve Holden
John Salerno wrote: > John Salerno wrote: > >>I contacted my domain host about how Python is implemented on their >>server, and got this response: > > > Uh, okay, I asked a related question to them and now I got this: > > > Hello John, > > There are some corrections based on last

Re: HTTP & tcl

2006-02-22 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, alf <[EMAIL PROTECTED]> wrote: . . . >I actually did post in comp.lang.tcl. Please search for "wctp" -- the >3 results are all mine. Apparently, I am the only person interested in >implementing

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Alexander Schmolck
Rocco Moretti <[EMAIL PROTECTED]> writes: > I think it's worth pointing out that not all dynamicism is equal, when it > comes to difficulty in compiling to machine code. No kidding (do you have any idea how this thread started out?). > Lisp, like the good functional language that it is, has (pri

Re: Little tool - but very big size... :-(

2006-02-22 Thread Max
Giovanni Bajo wrote: > There are also other choices that can be made. For instance, wxWidgets is > *HUGE*. Indeed. Remember Tkinter is built-in. (I never got the hang of Tkinter and prefer wx, but if size is important...) --Max -- http://mail.python.org/mailman/listinfo/python-list

quick script to read digital terrain elevation data?

2006-02-22 Thread Jose Reckoner
I'm running python 2.3 on Windows XP. Anyone have a quick small script to convert .DT1 and .DEM data to ASCII or some other format? I don't need a viewer. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python very slow compared to C

2006-02-22 Thread Isaac Gouy
Steven D'Aprano wrote: > On Sun, 12 Feb 2006 03:03:20 -0800, bearophileHUGS wrote: > > > Steven D'Aprano>Very slow to do what, compared to what? The decay time > > of the tau meson?< > > > > Probably every answer I can give you is wrong for you, so answering is > > almost useless... > > We do actua

Re: redirecting to a content page

2006-02-22 Thread Steve Holden
bruno at modulix wrote: > Shreyas wrote: [...] >>The thing is, processing.py doesn't have any content that I want to >>display to the user. > > > And this is a GoodThing(tm). A successful post should always be followed > by a redirect. > Really? Why's that? >[...] regards Steve -- Steve Ho

Re: PyUNO with different Python

2006-02-22 Thread M�ta-MCI
Hi! The second way don't run: Traceback (most recent call last): File "C:\Program Files\OpenOffice.org 2.0\program\hello_world.py", line 1, in? import uno File "C:\Program Files\OpenOffice.org 2.0\program\uno.py", line 37, in ? import pyuno ImportError: Module use of python23.dll con

Re: Python vs. Lisp -- please explain

2006-02-22 Thread [EMAIL PROTECTED]
Carl Friedrich Bolz wrote: > Chris Mellon wrote: > > I've encountered a C scripting environment that works by using GCC to > > compile each line as it is encountered, doing some magic to keep a > > working compilation environment around. > > > > Interpreted? Compiled? > > > > There is also the wond

using breakpoints in a normal interactive session

2006-02-22 Thread dan . gass
Is there a way to temporarily halt execution of a script (without using a debugger) and have it put you in an interactive session where you have access to the locals? And possibly resume? For example: >>> def a(): ... x = 1 ... magic_breakpoint() ... y = 1 ... print "got here" ... >>> a(

Re: What are COM-enabled applications?

2006-02-22 Thread Duncan Booth
Cameron Laird wrote: > Python has good COM abilities. While, to my surprise, I just > realized that I'm unaware of anyone having put together a COM > "explorer" with Python, it would be a straightforward project. Don't the tools that come with Python's COM support do enough for you? ...\lib\sit

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Rocco Moretti
Alexander Schmolck wrote: > I wanted to point > out that one could with just as much justification claim CL to be more dynamic > than python (it is in some regards, but not in others -- how to weight them to > achieve some overall "score" is not obvious. I think it's worth pointing out that not a

Psychic bug

2006-02-22 Thread Jennifer Hallinan
Hi, I have a mutate function for a genetic algorithm which is giving me odd results. I suspect I'm missing somthing really simple, so I'd be grateful for any suggestions. Basically, when I comment out the line which is commented out below, it works fine (although of course it doesn't change the ge

Re: new wooden door step - fixing and finishing

2006-02-22 Thread Magnus Lycka
jkn wrote: > Hi all Hi! > I'm considering having a go at replacing the wooden door step to > our back door. The original is loose and rotting. Aha, like old perl scripts. > I'm sure some of this will be clearer when I remove the (metal) door > frame - how is such a step fixed? Vertical fram

Re: Tkinter canvas size determination

2006-02-22 Thread Dean Allen Provins
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Dean Allen Provins <[EMAIL PROTECTED]> wrote: > >>I need to determine the size of a canvas while the process is running. >>Does anyone know of a technique that will let me do that? > > . > . >

Re: How to force creation of a .pyc?

2006-02-22 Thread Jeffrey Schwab
mrstephengross wrote: > I would like to distribute a python program, but only in .pyc form (so > that people cannot simply look at my code). Is there a way to do this? > I've read up a little on the logic by which python creates .pyc's, and > it sounds like python requires the main executed program

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Isaac Gouy
Steven D'Aprano wrote: > On Tue, 21 Feb 2006 09:46:27 -0800, Donn Cave wrote: > > > In article <[EMAIL PROTECTED]>, > > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > ... > >> Hey Donn, here is a compiled program for the PowerPC, > >> or an ARM processor, or one of IBM's Big Iron > >> mainframes.

Re: How to force creation of a .pyc?

2006-02-22 Thread Nick Smallbone
mrstephengross wrote: > I would like to distribute a python program, but only in .pyc form (so > that people cannot simply look at my code). Is there a way to do this? > I've read up a little on the logic by which python creates .pyc's, and > it sounds like python requires the main executed program

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Luis M. González
Carl Friedrich Bolz wrote: > Paul Rubin wrote: > Well. "... the PyPy team works on ..." is definitively much too strong. > It is more like "... the PyPy team is thinking about ...". It is very > unclear whether it will work on a technical level and whether the EU > will allow us to allocate resourc

Re: graph display(please help)

2006-02-22 Thread Bill Scherer
questions? wrote: > I heard from my friend who used to program in JAVA, it is really easy > to do graph display in JAVA. > > I wonder whether there are similiar packages in Python I can use. Since > I know a little bit Python syntax already, I can easily learn more in > Python. > > I want to disp

  1   2   >