Re: Web Hosting

2006-10-15 Thread Gregor Horvath
Sir Psycho schrieb: > > Im looking at making a site in Python, however, Im lost as to what ISPs > actually support. Some ISPs say they support Python so does that mean > if I wanted to use TurboGears It would just work anyway? http://docs.turbogears.org/1.0/Hosting?highlight=%28hosting%29 --

Re: Can I set up a timed callback without Tkinter or twisted orsomething?

2006-10-15 Thread Hendrik van Rooyen
"Scott David Daniels" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > I want to do the equivalent of the after thingy in tkinter - setting up in > > effect a timed call back. > > > > My use case is as a "supervisory" timer - I want to set up an alarm, which I > > want to cancel if the

Re: Can I set up a timed callback without Tkinter or twisted orsomething?

2006-10-15 Thread Hendrik van Rooyen
"hg" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > Hi, > > > > I want to do the equivalent of the after thingy in tkinter - setting up in > > effect a timed call back. > > > > My use case is as a "supervisory" timer - I want to set up an alarm, which I > > want to cancel if the expe

Re: A friendlier, sugarier lambda -- a proposal for Ruby-like blocks in python

2006-10-15 Thread Kay Schluehr
Paul Boddie wrote: > Kay Schluehr wrote: > > > > Spreading tiny function definitions all over the code > > may be finally not such a good idea compared with a few generic methods > > that get just called? OO might run out of fashion these days but Python > > is not Java and Pythons OO is pretty lig

Re: Need a function. Any built-in function or module for this?

2006-10-15 Thread wcc
Thanks you very much Paul. I think I have a little more homework to do. 1. The upper case letter may not be the first letter in each word. 2. There may be more than one (continous) upper case letters in one word. I just wanted to find out if there is something already there in python built-in func

Re: problem with the 'math' module in 2.5?

2006-10-15 Thread Paddy
Ben Finney wrote: > "Chris" <[EMAIL PROTECTED]> writes: > > > Oh, ok that explains it. Is that why my 16-bit calculator gives me > > 0? > > Your calculator is probably doing rounding without you asking for it. > > Python refuses to guess what you want, and gives you the information > available. >

Which class?

2006-10-15 Thread Fulvio
*** Your mail has been scanned by InterScan MSS. *** Hello, Sorry, I very new in programming and the use of the classes still unknown. I'm really interested to apply the right one as far as the results aren't as expected. Here's the example: from poplib

Re: problem with the 'math' module in 2.5?

2006-10-15 Thread Jorgen Grahn
On Sun, 15 Oct 2006 00:18:29 -0400, Carsten Haese <[EMAIL PROTECTED]> wrote: ... > You're not getting *exactly* zero because you're not passing in *exactly* pi > but a close approximation of pi. That, plus the fact that floating-point math never is (in some sense) precise. I am surprised noone bro

Problem with importing a package

2006-10-15 Thread [EMAIL PROTECTED]
I have to work with matrices on python and for that i need a package NUMPY. I downloaded it and saved it in the same folder as the program which imports it. But on running the program it gives an error "ImportError: No module named numpy". Do we need to save the file required to be imported in a sp

Re: problem with the 'math' module in 2.5?

2006-10-15 Thread Ben Finney
"Paddy" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > Your calculator is probably doing rounding without you asking for > > it. > > > > Python refuses to guess what you want, and gives you the > > information available. > > I don't think Python should take too much credit here. I don't unde

where is Python tutorial?

2006-10-15 Thread Tshepang Lekhonkhobe
Hi, I looked in the packages list and couldn't find the tutorial and was wondering if it was removed from the archive. Was it? -- http://mail.python.org/mailman/listinfo/python-list

Re: where is Python tutorial?

2006-10-15 Thread Paul Rubin
"Tshepang Lekhonkhobe" <[EMAIL PROTECTED]> writes: > I looked in the packages list and couldn't find the tutorial and was > wondering if it was removed from the archive. Was it? http://www.google.com/search?q=%22python+tutorial%22 finds it pretty fast -- http://mail.python.org/mailman/listinfo/p

Re: Standard Forth versus Python: a case study

2006-10-15 Thread [EMAIL PROTECTED]
John you nailed it. I was a big forth fan in the mid-80s but it was very clear that you either had to spend a lot of money on proprietary systems or do it ALL yourself. Not having any money I was pleased to be able to do it all but today, in the age of instant communication and collaboration, its n

Re: where is Python tutorial?

2006-10-15 Thread Tshepang Lekhonkhobe
On 15 Oct 2006 04:03:33 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > "Tshepang Lekhonkhobe" <[EMAIL PROTECTED]> writes: > > I looked in the packages list and couldn't find the tutorial and was > > wondering if it was removed from the archive. Was it? > > http://www.google.com/search?

Re: Can I set up a timed callback without Tkinter or twisted orsomething?

2006-10-15 Thread skip
Hendrik> is there not something based on signals? - I seem to recall Hendrik> some such thing here in another thread.. ( I am running Linux) Have you tried: import signal help(signal) at the interpreter prompt? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Reverse string-formatting (maybe?)

2006-10-15 Thread Dustan
Peter Otten wrote: > Dustan wrote: > > > Is there any builtin function or module with a function similar to my > > made-up, not-written deformat function as follows? I can't imagine it > > would be too easy to write, but possible... > > > template = 'I am %s, and he %s last %s.' > values

Book about database application development?

2006-10-15 Thread Wolfgang Keller
Hello, does anyone know of a good book that about development of database applications? Preferrably language independent, if that's not available something "readable" as the example language would be nice (Delphi is ok for me, not any kind of C-dialect including Java and C#). Unfortunately the

Re: Book about database application development?

2006-10-15 Thread Paul Rubin
Wolfgang Keller <[EMAIL PROTECTED]> writes: > I'm especially interested in such practical topics as e.g. how to implement > things such that the resulting application doesn't show the hourglass for > minutes on every mouseclick. > > And, btw; "W** applications" are totally irrelevant for me. He

Re: Reverse string-formatting (maybe?)

2006-10-15 Thread Tim Chase
> My template outside of the '%s' characters contains only commas and > spaces, and within, neither commas nor spaces. Given that information, > is there any reason it might not work properly? Given this new (key) information along with the assumption that you're doing straight string replacement

Re: Reverse string-formatting (maybe?)

2006-10-15 Thread Dustan
Tim Chase wrote: > > My template outside of the '%s' characters contains only commas and > > spaces, and within, neither commas nor spaces. Given that information, > > is there any reason it might not work properly? > > Given this new (key) information along with the assumption that > you're doing

Re: Reverse string-formatting (maybe?)

2006-10-15 Thread Dustan
Dustan wrote: > Tim Chase wrote: > > > My template outside of the '%s' characters contains only commas and > > > spaces, and within, neither commas nor spaces. Given that information, > > > is there any reason it might not work properly? > > > > Given this new (key) information along with the assu

Re: Reverse string-formatting (maybe?)

2006-10-15 Thread Dustan
Dustan wrote: > Dustan wrote: > > Tim Chase wrote: > > > > My template outside of the '%s' characters contains only commas and > > > > spaces, and within, neither commas nor spaces. Given that information, > > > > is there any reason it might not work properly? > > > > > > Given this new (key) inf

Re: Reverse string-formatting (maybe?)

2006-10-15 Thread Dan Sommers
On 14 Oct 2006 05:35:02 -0700, "Dustan" <[EMAIL PROTECTED]> wrote: > Is there any builtin function or module with a function similar to my > made-up, not-written deformat function as follows? I can't imagine it > would be too easy to write, but possible... [ snip ] > Any input? I've looked throu

Re: Reverse string-formatting (maybe?)

2006-10-15 Thread Tim Chase
>>> >>> template = '%s, %s, %s' >>> >>> values = ('Tom', 'Dick', 'Harry') >>> >>> formatted = template % values >>> >>> import re >>> >>> unformat_string = template.replace('%s', '([^, ]+)') >>> >>> unformatter = re.compile(unformat_string) >>> >>> extracted_values = unformatter.search(forma

Where I can find

2006-10-15 Thread vedran_dekovic
Hello, Where I can find this files(modules): fcntl,FCNTL,tty,termios, TERMIOS THANKS!!! -- http://mail.python.org/mailman/listinfo/python-list

Cannot import a module from a variable

2006-10-15 Thread Jia Lu
Hi all: I try to do things below: >>>import sys >>> for i in sys.modules.keys(): import i Traceback (most recent call last): File "", line 2, in import i ImportError: No module named i But it seems that import donot know what is i ? why? Thanks/ -- http://mail.python.org/mailman

Re: A friendlier, sugarier lambda -- a proposal for Ruby-like blocks in python

2006-10-15 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > Kay Schluehr wrote: > > The with statement is already implemented in Python 2.5. > > > > http://docs.python.org/whatsnew/pep-343.html > > > > The main difference between the with statement and Ruby blocks is that > > the with-statement does not support loops. Yielding a v

Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10

2006-10-15 Thread Chris Miles
Thanks to those who offered suggestions for this. It appears that building Python 2.4.3 on Solaris 10 with readline (SFWrline package) support is a little long-winded but possible, using the following steps: $ ./configure --prefix=/opt/python-2.4.3 --enable-shared $ vi Modules/Setup.local --- a

Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10

2006-10-15 Thread Martin v. Löwis
Chris Miles schrieb: > I hope this process can be improved, and if I have time I'll look at why > make fails half way but works fine when kicked off a second time. You need to use GNU make for that to work. The build regenerates the makefile, but Sun make doesn't recognize the change. There was a

Re: Where I can find

2006-10-15 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > Where I can find this files(modules): > > fcntl,FCNTL,tty,termios, TERMIOS They are included in the standard installation of Python. Notice that some of them work only on Unix. Also notice that FCNTL no longer exist; I'm not sure whether TERMIOS ever existed. Regards

Output from subprocess.Popen()

2006-10-15 Thread Clodoaldo Pinto Neto
Output from the shell: [EMAIL PROTECTED] teste]$ set | grep IFS IFS=$' \t\n' Output from subprocess.Popen(): >>> import subprocess as sub >>> p = sub.Popen('set | grep IFS', shell=True, stdout=sub.PIPE) >>> p.stdout.readlines()[1] "IFS=' \t\n" Both outputs for comparison: IFS=$' \t\n' "IFS=' \t

Re: Problem with importing a package

2006-10-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I have to work with matrices on python and for that i need a package > NUMPY. I downloaded it and saved it in the same folder as the program > which imports it. But on running the program it gives an error > "ImportError: No module named numpy". Do we need to save the fi

Re: Where I can find

2006-10-15 Thread Lawrence Oluyede
<[EMAIL PROTECTED]> wrote: > Where I can find this files(modules): > > fcntl,FCNTL,tty,termios, TERMIOS import fcntl import tty import termios for start :-) -- Lawrence - http://www.oluyede.org/blog http://www.neropercaso.it "Nothing is more dangerous than an idea if it's the only one you have

Re: Output from subprocess.Popen()

2006-10-15 Thread Fredrik Lundh
Clodoaldo Pinto Neto wrote: > Output from the shell: > > [EMAIL PROTECTED] teste]$ set | grep IFS > IFS=$' \t\n' > > Output from subprocess.Popen(): > import subprocess as sub p = sub.Popen('set | grep IFS', shell=True, stdout=sub.PIPE) p.stdout.readlines()[1] > "IFS=' \t\n" > >

Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10

2006-10-15 Thread Chris Miles
Martin v. Löwis wrote: > You need to use GNU make for that to work. The build regenerates the > makefile, but Sun make doesn't recognize the change. There was a message > telling you so. Thanks Martin, you are totally correct. Using gmake avoids the problem. > Also, your original complaint wasn'

Re: Where I can find

2006-10-15 Thread Grant Edwards
On 2006-10-15, Lawrence Oluyede <[EMAIL PROTECTED]> wrote: ><[EMAIL PROTECTED]> wrote: >> Where I can find this files(modules): >> >> fcntl,FCNTL,tty,termios, TERMIOS > > import fcntl > import tty > import termios > > for start :-) But you just might want to take a look at pyserial instead... -

Re: OT: What's up with the starship?

2006-10-15 Thread rurpy
T. Bryan wrote: > Thomas Heller wrote: > > > I cannot connect to starship.python.net: neither http, nor can I login > > interactively with ssl (and the host key seems to have changed as well). > > > > Does anyone know more? > > starship.python.net was compromised. It looked like a rootkit may hav

Re: Cannot import a module from a variable

2006-10-15 Thread Christian Joergensen
"Jia Lu" <[EMAIL PROTECTED]> writes: > Hi all: > > I try to do things below: import sys for i in sys.modules.keys(): > import i > Traceback (most recent call last): > File "", line 2, in > import i > ImportError: No module named i > > But it seems that import donot know what

Re: A friendlier, sugarier lambda -- a proposal for Ruby-like blocks in python

2006-10-15 Thread [EMAIL PROTECTED]
Alexey Borzenkov wrote: > [EMAIL PROTECTED] wrote: > > but maybe it reduces code readabilty a bit for people > > that have just started to program: > > > > mul2 = def(a, b): > > return a * b > > > > Instead of: > > > > def mul2(a, b): > > return a * b > > For such simple cases, yes. What ab

Re: Output from subprocess.Popen()

2006-10-15 Thread Clodoaldo Pinto Neto
Fredrik Lundh wrote: > this works for me: > > >>> f = subprocess.Popen("set | grep IFS", shell=True, > stdout=subprocess.PIPE) > >>> f.stdout.readlines() > ["IFS=$' \\t\\n'\n"] > > what does the above return on your machine? >>> f = subprocess.Popen("set | grep IFS", shell=True, stdout=subproce

Re: Cannot import a module from a variable

2006-10-15 Thread Colin J. Williams
Christian Joergensen wrote: > "Jia Lu" <[EMAIL PROTECTED]> writes: > >> Hi all: >> >> I try to do things below: > import sys > for i in sys.modules.keys(): >> import i >> Traceback (most recent call last): >> File "", line 2, in >> import i >> ImportError: No module named i >>

Re: Where can I find good python code?

2006-10-15 Thread vasudevram
Chris Lambacher wrote: > On Sat, Oct 14, 2006 at 01:08:37AM +0900, js wrote: > > Hi, > > > > I've learned basics of Python and want to go to the next step. > > So I'm looking for good python examples > > I steal good techniques from. > > > > I found Python distribution itself contains some examp

run subprocess in separate window

2006-10-15 Thread Radek
Hi, I am trying to create GUI launcher of several applications using Python and Tkinter. Currently when using subprocess.Popen("mycommand") all output goes to the stdout of my launcher. For some command line applications I need to launch them so that their output goes into the separate "terminal

Re: paseline(my favorite simple script): does something similar exist?

2006-10-15 Thread RickMuller
Amazing! There were lots of great suggestions to my original post, but I this is my favorite. Rick Fredrik Lundh wrote: > RickMuller wrote: > > > I'm posting this here because (1) I'm feeling smug at what a bright > > little coder I am > > if you want to show off, and use a more pythonic interfac

Re: Book about database application development?

2006-10-15 Thread Wolfgang Keller
Hello, and thanks for your reply, but... > Here's a start: > > http://philip.greenspun.com/sql/ ...small misunderstanding: I already know a bit of SQL, and I intend to avoid its use as far as possible (and use e.g. Modeling or SQLAlchemy). What I'm interested in is rather how to connect a G

Re: OT: What's up with the starship?

2006-10-15 Thread Robert Hicks
[EMAIL PROTECTED] wrote: > T. Bryan wrote: > > Thomas Heller wrote: > > > > > I cannot connect to starship.python.net: neither http, nor can I login > > > interactively with ssl (and the host key seems to have changed as well). > > > > > > Does anyone know more? > > > > starship.python.net was com

Re: Reverse string-formatting (maybe?)

2006-10-15 Thread Dustan
> Only you know what anomalies will be found in your data-sets. If > you know/assert that > > -the only stuff in the formatting string is one set of characters > > -that stuff in the replacement-values can never include any of > your format-string characters > > -that you're not using funky chara

Re: Tkinter: populating Mac Help menu?

2006-10-15 Thread Edward K. Ream
> hm = Menu(mb, name='help') Yes, that worked. Many thanks for your help with Help. Edward Edward K. Ream email: [EMAIL PROTECTED] Leo: http://webpages.charter.net/edreamleo/front.html ---

Re: problem with the 'math' module in 2.5?

2006-10-15 Thread andy2O
Chris wrote: > sin(pi*0.5) is what I expected, but I expected to get 0 for sin(pi). Computers in general, and Python too, usually use floating point arithmetic in which all numbers are approximated by rational numbers of a particular form (see http://en.wikipedia.org/wiki/Floating_point for detail

Re: IDE that uses an external editor?

2006-10-15 Thread Ramon Diaz-Uriarte
On 10/14/06, Slawomir Nowaczyk <[EMAIL PROTECTED]> wrote: > On Sat, 14 Oct 2006 13:01:17 -0500 > [EMAIL PROTECTED] wrote: (...) > #> I realize I can do a lot within Emacs/XEmacs, but I suspect with a > #> tool like Eclipse I could do more. However, I don't want to give up > #> the text editing pow

Re: OT: What's up with the starship?

2006-10-15 Thread rurpy
Robert Hicks wrote: > [EMAIL PROTECTED] wrote: > > T. Bryan wrote: > > > Thomas Heller wrote: > > > > > > > I cannot connect to starship.python.net: neither http, nor can I login > > > > interactively with ssl (and the host key seems to have changed as well). > > > > > > > > Does anyone know more?

Re: IDE that uses an external editor?

2006-10-15 Thread skip
>> #> I realize I can do a lot within Emacs/XEmacs, but I suspect with a >> #> tool like Eclipse I could do more. However, I don't want to give >> #> up the text editing power of Emacs to get it. ... Ramon> I've tried using Eclipse several times, because several good Ramon>

classroom constraint satisfaction problem

2006-10-15 Thread Steven Bethard
I'm trying to solve a constraint-satisfaction problem, and I'm having some troubles framing my problem in such a way that it can be efficiently solved. Basically, I want to build groups of two teachers and four students such that [1]: * Students are assigned to exactly one group * Teachers are

[ANN] rest2web 0.5.0 Final

2006-10-15 Thread Fuzzyman
At last `rest2web 0.5.0 Final `_ is released. Quick download links: * `rest2web-0.5.0.zip `_ * `rest2web-0.5.0.tar.gz

Re: SPE for 2.5?

2006-10-15 Thread SPE - Stani's Python Editor
John Salerno schreef: > Does anyone know if SPE is compatible with Python 2.5? I don't see a > Windows exe file for 2.5, so I wasn't sure if I should use the 2.4 version. > > Thanks. It should be. Contact me and I'll help you to make a 2.5 installer, which I'll gladly provide for download. I use

Re: SPE for 2.5?

2006-10-15 Thread Fuzzyman
SPE - Stani's Python Editor wrote: > John Salerno schreef: > > > Does anyone know if SPE is compatible with Python 2.5? I don't see a > > Windows exe file for 2.5, so I wasn't sure if I should use the 2.4 version. > > > > Thanks. > > It should be. Contact me and I'll help you to make a 2.5 install

Re: IDE that uses an external editor?

2006-10-15 Thread Jorge Godoy
[EMAIL PROTECTED] writes: > >> #> I realize I can do a lot within Emacs/XEmacs, but I suspect with a > >> #> tool like Eclipse I could do more. However, I don't want to give > >> #> up the text editing power of Emacs to get it. > ... > Ramon> I've tried using Eclipse several ti

Re: Book about database application development?

2006-10-15 Thread Peter Decker
On 10/15/06, Wolfgang Keller <[EMAIL PROTECTED]> wrote: > What I'm interested in is rather how to connect a GUI to a database, with > quite a bit of application logic in between. And how to do it well. You've described Dabo perfectly. Have you looked into it yet? It's written by a couple of datab

Re: A friendlier, sugarier lambda -- a proposal for Ruby-like blocks in python

2006-10-15 Thread Steven D'Aprano
On Sat, 14 Oct 2006 09:00:53 +, James Stroud wrote: > > Compared to the Python I know and love, Ruby isn't quite the same. > > However, it has at least one terrific feature: "blocks". [snip 220-odd quoted lines] > http://mail.python.org/pipermail/python-list/2004-April/215805.html Hi James

Re: SOAPpy and callback

2006-10-15 Thread fabien . benard
Ok guys, thanks for the lesson! I'm probably not going to try to implement this solution. However, I've learned a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: classroom constraint satisfaction problem

2006-10-15 Thread Carl Banks
Steven Bethard wrote: > I'm trying to solve a constraint-satisfaction problem, and I'm having > some troubles framing my problem in such a way that it can be > efficiently solved. > > Basically, I want to build groups of two teachers and four students such > that [1]: > > * Students are assigned to

Re: problem with the 'math' module in 2.5?

2006-10-15 Thread Steven D'Aprano
On Sun, 15 Oct 2006 20:03:18 +1000, Ben Finney wrote: > "Paddy" <[EMAIL PROTECTED]> writes: > >> Ben Finney wrote: >> > Your calculator is probably doing rounding without you asking for >> > it. >> > >> > Python refuses to guess what you want, and gives you the >> > information available. >> >> I

python's OOP question

2006-10-15 Thread neoedmund
There's a program, it's result is "unexpected aaa", i want it to be "expected aaa". how to make it work? [code] class C1(object): def v(self, o): return "expected "+o class C2(object): def v(self, o): return "unexpected "+o def m(self):

Re: IDE that uses an external editor?

2006-10-15 Thread Dan Sommers
On Sun, 15 Oct 2006 23:34:14 +0200, "Ramon Diaz-Uriarte" <[EMAIL PROTECTED]> wrote: > ... I guess, though, that this is very personal ... Absolutely. > ... and that I might be missing the point of Eclipse (and I don't do > any Java programming). The point of Eclipse is to lessen the burden impo

Weekly Python Patch/Bug Summary

2006-10-15 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 431 open ( +3) / 3425 closed ( +8) / 3856 total (+11) Bugs: 916 open (-23) / 6273 closed (+44) / 7189 total (+21) RFE : 244 open ( +4) / 240 closed ( +1) / 484 total ( +5) New / Reopened Patches __ typo in P

Re: python's OOP question

2006-10-15 Thread Ben Finney
"neoedmund" <[EMAIL PROTECTED]> writes: > There's a program, it's result is "unexpected aaa", i want it to be > "expected aaa". how to make it work? > > [code] > > class C1(object): > def v(self, o): > return "expected "+o > > class C2(object): > def v(self, o): >

Re: python's OOP question

2006-10-15 Thread Kay Schluehr
neoedmund wrote: > There's a program, it's result is "unexpected aaa", i want it to be > "expected aaa". how to make it work? > > [code] > > class C1(object): > def v(self, o): > return "expected "+o > > class C2(object): > def v(self, o): > return "unexpecte

Re: python's OOP question

2006-10-15 Thread neoedmund
thank you, Kay. But i need a "dynamic" way. Say i have a existing class, and add some method from other class into it. Kay Schluehr wrote: > neoedmund wrote: > > There's a program, it's result is "unexpected aaa", i want it to be > > "expected aaa". how to make it work? > > > > [code] > > > > cl

Re: python's OOP question

2006-10-15 Thread neoedmund
I'm trying to achieve a higher level of "reusability". Maybe it cannot be done in python? Can anybody help me? Ben Finney wrote: > "neoedmund" <[EMAIL PROTECTED]> writes: > > > There's a program, it's result is "unexpected aaa", i want it to be > > "expected aaa". how to make it work? > > > > [co

Re: python's OOP question

2006-10-15 Thread Ben Finney
[Please don't top-post above the text to which you're replying.] "neoedmund" <[EMAIL PROTECTED]> writes: > I'm trying to achieve a higher level of "reusability". Maybe it > cannot be done in python? Can anybody help me? What, specifically, are you trying to achieve? What problem needs solving?

Re: python's OOP question

2006-10-15 Thread neoedmund
python use multiple inheritance. but "inheritance" means you must inherite all methods from super type. now i just need "some" methods from one type and "some" methods from other types, to build the new type. Do you think this way is more flexible than tranditional inheritance? Ben Finney wrote:

wx.grid question (trying to use code from Grid_Example.py)

2006-10-15 Thread [EMAIL PROTECTED]
I am having trouble trying to reuse the code that was provided in the wxdemo package of wxpython. The program I am trying to use parts of is Grid_MegaExample.py thier code is class MegaTable(Grid.PyGridTableBase): """ A custom wx.Grid Table using user supplied data """ def __init_

Re: wx.grid question (trying to use code from Grid_Example.py)

2006-10-15 Thread [EMAIL PROTECTED]
To extend and revise my remarks my error is File "C:\Python24\Lib\site-packages\boa-constructor\test of snake\csoundgrid.py", line 8, in create_grid win = Grid_MegaExample.MegaTable(self, data, colnames, pugins) NameError: global name 'self' is not defined Script terminated. http://www.dexrow.co

Re: OT: What's up with the starship?

2006-10-15 Thread George Sakkis
[EMAIL PROTECTED] wrote: > Robert Hicks wrote: > > [EMAIL PROTECTED] wrote: > > > T. Bryan wrote: > > > > Thomas Heller wrote: > > > > > > > > > I cannot connect to starship.python.net: neither http, nor can I login > > > > > interactively with ssl (and the host key seems to have changed as > > >

Re: python's OOP question

2006-10-15 Thread Gregor Horvath
neoedmund schrieb: > python use multiple inheritance. > but "inheritance" means you must inherite all methods from super type. > now i just need "some" methods from one type and "some" methods from > other types, > to build the new type. > Do you think this way is more flexible than tranditional in

How to send E-mail without an external SMTP server ?

2006-10-15 Thread [EMAIL PROTECTED]
Hi, I just want to send a very simple email from within python. I think the standard module of smtpd in python can do this, but I haven't found documents about how to use it after googleing. Are there any examples of using smtpd ? I'm not an expert,so I need some examples to learn how to use i

Re: python's OOP question

2006-10-15 Thread George Sakkis
neoedmund wrote: > python use multiple inheritance. > but "inheritance" means you must inherite all methods from super type. > now i just need "some" methods from one type and "some" methods from > other types, > to build the new type. > Do you think this way is more flexible than tranditional inh

Re: python's OOP question

2006-10-15 Thread neoedmund
I found a dynamic way to inherite classes: def MixIn(pyClass, mixInClass): if mixInClass not in pyClass.__bases__: pyClass.__bases__ += (mixInClass,) def test1(): o = C3() MixIn(C3,C1) MixIn(C3,C2) o.m() "expected aaa" neoedmund wrote: > thank you, Ka

Re: python's OOP question

2006-10-15 Thread neoedmund
Oh, How great is the solution! ( though i don't know how it works. ) Thank you George. George Sakkis wrote: > neoedmund wrote: > > > python use multiple inheritance. > > but "inheritance" means you must inherite all methods from super type. > > now i just need "some" methods from one type and "so

Re: OT: What's up with the starship?

2006-10-15 Thread Thomas Heller
T. Bryan schrieb: > Thomas Heller wrote: > >> I cannot connect to starship.python.net: neither http, nor can I login >> interactively with ssl (and the host key seems to have changed as well). >> >> Does anyone know more? > > starship.python.net was compromised. It looked like a rootkit may hav

Re: How to send E-mail without an external SMTP server ?

2006-10-15 Thread Rob Wolfe
[EMAIL PROTECTED] wrote: > Hi, > > I just want to send a very simple email from within python. > > I think the standard module of smtpd in python can do this, but I > haven't found documents about how to use it after googleing. Are there > any examples of using smtpd ? I'm not an expert,so I need