Re: Dabo in 30 seconds?

2005-08-01 Thread Jorge Godoy
Cliff Wells wrote: On Mon, 2005-08-01 at 13:28 -0300, Jorge Godoy wrote: We can find several problems, almost all of them can be solved with the admin's creativity. import creativity Traceback (most recent call last): File stdin, line 1, in ? ImportError: No module named creativity

Re: Getting not derived members of a class

2005-08-01 Thread Brian Beck
George Sakkis wrote: z = Z() z.__class__.__mro__ (class '__main__.Z', class '__main__.Y1', class '__main__.Y2', class '__main__.X', type 'object') Old style classes don't have __mro__, so you have to write it yourself; in any case, writing old style classes in new code is discouraged.

Re: multiple inheritance super()

2005-08-01 Thread Steven Bethard
Michele Simionato wrote: I have found out that the more I use OOP, the less I use inheritance Just curious if others had a similar experience. Definitely. Though I think that's partly because I came from a Java background where it's a little more ingrained. Since Python relies heavily on

Re: Listing Processes Running on Remote Machines

2005-08-01 Thread yoda
Thanks. I'll definitely look into it. I actually got distracted while investigating Pyro(http://pyro.sourceforge.net/) to see if I could achieve the same results... It seems like a lighter weight more accessible solution than STAF (at least for my immediate needs).. I'll update you with my

Re: Comparison of functions

2005-08-01 Thread Steven Bethard
Steven D'Aprano wrote: You are confusing mathematical ordering with sorting a list. Here, I will sort some mixed complex and real numbers for you. If you look at them closely, you will even be able to work out the algorithm I used to sort them. 1 1+0j 1+7j 2 2+3j 3+3j 3-3j 3+4j 4

Re: Dabo in 30 seconds?

2005-08-01 Thread Paul McNett
Terry Reedy wrote: Ed Leafe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm serious here: I want to know what people consider acceptable for a software package that relies on other packages. To me, acceptability depends on the audience. Do you want to limit Dabo to

Re: Hiding

2005-08-01 Thread Jason Drew
Ah, good point, thanks. Must stop forgetting that C:\file.txt is bad. The whole open()/file() clairification is useful too. The Python docs for the file() constructor simply state that, File objects ... can be created with the built-in constructor file() described in section 2.1, 'Built-in

Re: Wheel-reinvention with Python

2005-08-01 Thread Paul McNett
Devan L wrote: If you're creating a new instance of your dApp(I assume its a class) with no arguments, then effectively your just creating a default program which is already defined in the dabo module. If you could write it in a few, short lines of code by defining a new class, then you might

Re: Dabo in 30 seconds?

2005-08-01 Thread Cliff Wells
On Mon, 2005-08-01 at 10:57 -0700, Paul McNett wrote: Terry Reedy wrote: Ed Leafe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm serious here: I want to know what people consider acceptable for a software package that relies on other packages. To me, acceptability

Re: Python Programming Contest: First results

2005-08-01 Thread Tomi Kyöstilä
Brian Quinlan wrote: Here are the results for the first problem in the Python Programming Contest. I haven't been able to find as much time as I excepted, so my analysis is not very in depth. You can find the results here: http://www.sweetapp.com/pycontest/contest1/results.html And

Re: Dabo in 30 seconds?

2005-08-01 Thread James Stroud
On Monday 01 August 2005 05:30 am, Ed Leafe wrote: Should we have defensive code for every possible broken installation? We use a lot of the Python standard library modules, many dbapi-compliant modules, and, of course, wxPython. If someone mis-installs one of the pre-requisites, do you

Re: Dabo in 30 seconds?

2005-08-01 Thread Ed Leafe
On Monday 01 August 2005 14:34, James Stroud wrote: I don't know. Defense code sounds like a PITA. But maybe give a hint in the INSTALL file, or a link to the proper wxPython install? These are the obvious things that might help people like me at least get to the point where we can see what

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

2005-08-01 Thread Pranav Bagora
hello, I am trying to write a python code which reads a web service and creates its corresponding wsdl file. Any idea how to do it. Thanks Pranav __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we.

Re: Wheel-reinvention with Python

2005-08-01 Thread Kay Schluehr
Reinhold Birkenfeld wrote: In practise any Python GUI is going to contain code from otyher languages since if it was coded all the way down in python it would be too slow. Oh, I could imagine that a MFC-like wrapper around win32gui, or another one around Xlib wouldn't be slower that

ANN: Kamaelia 0.2.0 released!

2005-08-01 Thread Michael Sparks
Kamaelia 0.2.0 has been released! What is it? === Kamaelia is a collection of Axon components designed for network protocol experimentation in a single threaded, select based environment. Axon components are python generators are augmented by inbox and outbox queues (lists) for

MySQL help

2005-08-01 Thread [EMAIL PROTECTED]
So i'm writing this program to check if a row exists in a table. If it doesn't it inserts it if it does it will update that row with the current info. Well it sorta works but not fully. It goes through and executes the correct querries but when it comes to determining if the row exists it

Re: Dabo in 30 seconds?

2005-08-01 Thread James Stroud
On Monday 01 August 2005 05:59 am, Cliff Wells wrote: But then I'm willing to actually work a little to get what I want.  For other it seems they won't be happy unless you drive to their house and install it for them (which only seems fair, cause if you hadn't volunteered to write such crap

Re: On fighting fire with fire...

2005-08-01 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): Twice today I responded to rude messages (once here, once on the SpamBayes list) whose authors didn't deserve the benefit of my time. In both cases, other people rightfully responded with some small amount of return venom (but provided useful responses

Re: Dabo in 30 seconds?

2005-08-01 Thread Ed Leafe
On Monday 01 August 2005 15:00, James Stroud wrote: Perhaps some of us are writing software with non-developer end-users in mind, and we kind of keep that mentality when evaluating modules our code uses. Do your end-users really want to figure out that the need to and how to install stylized

Re: Wheel-reinvention with Python

2005-08-01 Thread Mark Roseman
Ed Leafe [EMAIL PROTECTED] wrote: On Sunday 31 July 2005 12:03, Paul Rubin wrote: How on earth did you decide that, since tkinter actually runs out of the box when you install Python on most platforms, and wxPython doesn't? Because Tkinter looked like crap on OS X. Sorry, but it's hard

Re: Wheel-reinvention with Python

2005-08-01 Thread Mark Roseman
How can I embed a browser in Tk (I mean a real browser, like Mozilla, Safari, or even Exploder)? At all? On any platform? This has always been the tradeoff for Tk. Try this as one example: http://wiki.tcl.tk/4094 Tk is great for learning, easy to write small, basic interfaces,

Re: Dabo in 30 seconds?

2005-08-01 Thread Jaime Wyant
It is usually referred to as STC. This is from my BUILD.txt instructions for unix builds: 2. To build and install wxWidgets you could just use the make command but there are other libraries besides the main wxWidgets libs that also need to be built so again I make a script to do it all

Re: Dabo in 30 seconds?

2005-08-01 Thread Paul Rubin
Ed Leafe [EMAIL PROTECTED] writes: a lot of the Python standard library modules, many dbapi-compliant modules, and, of course, wxPython. If someone mis-installs one of the pre-requisites, do you expect Dabo to catch that and present you with a diagnostic message? I'm serious here: I want to

Re: Is this Pythonic?

2005-08-01 Thread Caleb Hattingh
Peter To my mind, this kind of setup (interface class, or abstact class) is more usually used in static languages to benefit polymorphism - but python is dynamically typed, so in which situations would this setup be useful in a python program? You see, I expected your post to say that it

Re: Wheel-reinvention with Python

2005-08-01 Thread Paul Rubin
Peter Decker [EMAIL PROTECTED] writes: Geez, can you whine some more? Most people are running wxPython just fine, Most people? What percentage of actual Python users do you think have wxPython installed? If you're really claiming it's over 50%, you're out of your mind. --

Re: [path-PEP] Path inherits from basestring again

2005-08-01 Thread Ron Adam
Ivan Van Laningham wrote: People can subclass Path and add it if they really want it. They can use Jason's original module. My position is that the PEP without this use of __div__ is (a) better as a standard module, and (b) improves the chance of the PEP being accepted. I disagree.

Re: Dabo in 30 seconds?

2005-08-01 Thread Daniel Dittmar
Jorge Godoy wrote: We can find several problems, almost all of them can be solved with the admin's creativity. You must distinguish between solving technical problems once a course has ben set and choosing such a course in the first place. The latter has to deal also with the risks of the

Re: Wheel-reinvention with Python

2005-08-01 Thread Ed Leafe
On Monday 01 August 2005 15:21, Mark Roseman wrote: FWIW, some people may find this page interesting, which gives you an idea what standard Tk looks like on OS X, and then with adopting the tile extension to Tk and a few other tweaks, which is on its way to becoming a standard part of Tk:    

Re: Python IDE's

2005-08-01 Thread Caleb Hattingh
You know, for several years I was one of those people who simply ignored posts like this about Vi/Vim because I happened to come across it once on a sparc machine and thought it was ridiculous that I couldn't figure out how to type a simple note. I thought that Vi (Vim) was some kind of

Re: MySQL help

2005-08-01 Thread deelan
[EMAIL PROTECTED] wrote: So i'm writing this program to check if a row exists in a table. If it doesn't it inserts it if it does it will update that row with the current info. (...) quick tip: are you aware of the mysql's REPLACE command? http://dev.mysql.com/doc/mysql/en/replace.html --

Re: Is this Pythonic?

2005-08-01 Thread Bruno Desthuilliers
Caleb Hattingh a écrit : Peter To my mind, this kind of setup (interface class, or abstact class are two different things. ) is more usually used in static languages True. to benefit polymorphism This is a good reason to use an interface in Java. C++ has no notion of 'interface',

Re: Wheel-reinvention with Python

2005-08-01 Thread Peter Decker
On 01 Aug 2005 12:58:57 -0700, Paul Rubin http://phr.cx@nospam.invalid wrote: Geez, can you whine some more? Most people are running wxPython just fine, Most people? What percentage of actual Python users do you think have wxPython installed? If you're really claiming it's over 50%,

Short term project

2005-08-01 Thread Michael Seeley
I have a client in Fort Worth, TX that needs a Python programmer for a short project. This could be a telecommuting position. Please email me at [EMAIL PROTECTED] if interested. -- http://mail.python.org/mailman/listinfo/python-list

Re: need for speed

2005-08-01 Thread Bruno Desthuilliers
Michael Rybak a écrit : (snip) Is there a way of profiling other than manual (debug output with measurements and all)? Some tools? http://docs.python.org/lib/profile.html HTH -- http://mail.python.org/mailman/listinfo/python-list

Re: Using win32com for web automation

2005-08-01 Thread calfdog
ina wrote: Look up pamie it should do all the work you need. If it dosn't I can send you ishyBrowser but pamie has more comunity support. FYI #Imports from win32com.client import Dispatch from time import sleep # Create a new browser object ie = Dispatch('InternetExplorer.App­lication') #

Terminate a thread that doesn't check for events

2005-08-01 Thread Liu Shuai
Hi all, I am aware that similar and probably same questions have been posted many times, but I was unable to find a solution after reading a dozen threads in the archive. So here it goes again. I have a thread that does some heavy task (hash calculation, for instance). I need a

Re: Dabo in 30 seconds?

2005-08-01 Thread Peter Decker
On 01 Aug 2005 12:50:56 -0700, Paul Rubin http://phr.cx@nospam.invalid wrote: I seem to be in a minority here Wow, you finally said something that I agree with! but I vote for avoiding such dependencies as much as possible. This isn't a contest here. Do what you like, and don't expect

Re: Wheel-reinvention with Python

2005-08-01 Thread Paul Rubin
Peter Decker [EMAIL PROTECTED] writes: We were discussing your 'enormous pain' installing wxPython. I find it interesting that you selectively quoted part of one line of my post, Yes, the one line I quoted was the one that said most people have wxPython installed, which is a preposterous claim.

Re: MySQL help

2005-08-01 Thread [EMAIL PROTECTED]
I wasn't aware of the replace command I'll take a look at that tomorrow and see if it helps. Thanks quick tip: are you aware of the mysql's REPLACE command? http://dev.mysql.com/doc/mysql /en/replace.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-08-01 Thread Cliff Wells
On Mon, 2005-08-01 at 15:26 -0400, Mark Roseman wrote: How can I embed a browser in Tk (I mean a real browser, like Mozilla, Safari, or even Exploder)? At all? On any platform? This has always been the tradeoff for Tk. Try this as one example: http://wiki.tcl.tk/4094 Okay, I

Re: Wheel-reinvention with Python

2005-08-01 Thread Peter Decker
On 01 Aug 2005 13:38:21 -0700, Paul Rubin http://phr.cx@nospam.invalid wrote: Peter Decker [EMAIL PROTECTED] writes: We were discussing your 'enormous pain' installing wxPython. I find it interesting that you selectively quoted part of one line of my post, Yes, the one line I quoted was

inheriting from datetime

2005-08-01 Thread Rob Conner
So this is simple, why can't I run the following code? I've tried many variances of this, but simply cannot inherit from datetime or datetime.datetime. I get this on line 3. TypeError: function takes at most 2 arguments (3 given) import datetime _datetime =

Re: Wheel-reinvention with Python

2005-08-01 Thread Cliff Wells
On Mon, 2005-08-01 at 13:38 -0700, Paul Rubin wrote: Peter Decker [EMAIL PROTECTED] writes: We were discussing your 'enormous pain' installing wxPython. I find it interesting that you selectively quoted part of one line of my post, Yes, the one line I quoted was the one that said most

Re: Is this Pythonic?

2005-08-01 Thread Erik Max Francis
phil hunt wrote: Suppose I'm writing an abstract superclass which will have some concrete subclasses. I want to signal in my code that the subclasses will implement certan methods. Is this a Pythonic way of doing what I have in mind: class Foo: # abstract superclass def bar(self):

Re: python SMTP server

2005-08-01 Thread Benjamin Niemann
Cliff Wells wrote: On Mon, 2005-08-01 at 12:28 +0200, Benjamin Niemann wrote: Cliff Wells wrote: [snip] By using a local SMTP server to proxy, your app can queue up a large amount of mail in a much shorter period. It won't necessarily go out any faster, but at least your app won't be

Distutils Question - Creating an installer for python users?

2005-08-01 Thread Gregory Piñero
Hey guys, I wrote a fairly simple program that has 3 python files, and needs a couple directories created to run. It also uses PythonCard. I would like make it easily distributable to users who already have Python installed. Would anyone mind explaining this in easy to follow steps or pointing

Re: inheriting from datetime

2005-08-01 Thread Grant Edwards
On 2005-08-01, Rob Conner [EMAIL PROTECTED] wrote: So this is simple, why can't I run the following code? I've tried many variances of this, but simply cannot inherit from datetime or datetime.datetime. I get this on line 3. TypeError: function takes at most 2 arguments (3 given) I think I

Re: inheriting from datetime

2005-08-01 Thread Lee Harr
On 2005-08-01, Rob Conner [EMAIL PROTECTED] wrote: So this is simple, why can't I run the following code? I've tried many variances of this, but simply cannot inherit from datetime or datetime.datetime. I get this on line 3. TypeError: function takes at most 2 arguments (3 given)

Re: Wheel-reinvention with Python

2005-08-01 Thread Reinhold Birkenfeld
Kay Schluehr wrote: Reinhold Birkenfeld wrote: In practise any Python GUI is going to contain code from otyher languages since if it was coded all the way down in python it would be too slow. Oh, I could imagine that a MFC-like wrapper around win32gui, or another one around Xlib

Re: Standard Threads vs Weightless Threads

2005-08-01 Thread Björn Lindström
Christopher Subich [EMAIL PROTECTED] writes: the primary benefit (on uniprocessor systems) that if one thread executes a blocking task (like IO writes) another thread will receive CPU attention. On multiprocessor systems, of course, the benefit is that threads can run on separate CPUs. This

Re: Wheel-reinvention with Python

2005-08-01 Thread Paul Rubin
Cliff Wells [EMAIL PROTECTED] writes: Still, that leaves Linux and Mac out in the cold. But I'll admit you met my challenge. Most likely you can actually do most of the things with Tk you can with Wx, it's simply a matter of how much effort is going to be (for instance, it's certainly quite

Re: inheriting from datetime

2005-08-01 Thread rafi
Rob Conner wrote: So this is simple, why can't I run the following code? I've tried many variances of this, but simply cannot inherit from datetime or datetime.datetime. I get this on line 3. TypeError: function takes at most 2 arguments (3 given) line 3 of the following code or line 3 of the

Re: Wheel-reinvention with Python

2005-08-01 Thread Paul Rubin
Cliff Wells [EMAIL PROTECTED] writes: It was quite clear that by saying most people he was not referring to the set of most Python users, but rather the set of most people who have tried wxPython. That wasn't clear to me. If that's what he meant, he should have said so. --

Newer than a Newbe

2005-08-01 Thread None
Hello, I am just starting to look into python.I have been prog with php for several years.My question is: Can/Is Python used as a web scripting language , and if so do many hosts support it? Thanks Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Newer than a Newbe

2005-08-01 Thread gene tani
http://www.python.org/cgi-bin/moinmoin/PythonHosting -- http://mail.python.org/mailman/listinfo/python-list

Path as a dictionary tree key? (was Re: PEP on path module for standard library)

2005-08-01 Thread Ron Adam
I'm wondering if a class that acts as a interface to a tree data structure stored in a dictionary could also be useful as a base class for accessing filesystems, urls, and zip (or rar) files. Then a path object could then be used as a dictionary_tree key. This idea seems much more useful to

Re: Wheel-reinvention with Python

2005-08-01 Thread Cliff Wells
On Mon, 2005-08-01 at 14:13 -0700, Paul Rubin wrote: Cliff Wells [EMAIL PROTECTED] writes: Still, that leaves Linux and Mac out in the cold. But I'll admit you met my challenge. Most likely you can actually do most of the things with Tk you can with Wx, it's simply a matter of how much

Re: inheriting from datetime

2005-08-01 Thread Rob Conner
gah, yeah that was strange. but i got it now. thanks. side question: what is the point of accepting invalid dates? thats a long story. but it would be nice to have invalid dates at least just stored. so i want to try to put a class together that does it. --

Re: Is this Pythonic?

2005-08-01 Thread phil hunt
On Mon, 01 Aug 2005 12:52:02 -0400, Peter Hansen [EMAIL PROTECTED] wrote: phil hunt wrote: Suppose I'm writing an abstract superclass which will have some concrete subclasses. I want to signal in my code that the subclasses will implement certan methods. Is this a Pythonic way of doing what

Re: Wheel-reinvention with Python

2005-08-01 Thread Cliff Wells
On Mon, 2005-08-01 at 14:16 -0700, Paul Rubin wrote: Cliff Wells [EMAIL PROTECTED] writes: It was quite clear that by saying most people he was not referring to the set of most Python users, but rather the set of most people who have tried wxPython. That wasn't clear to me. If that's

Re: namespaces

2005-08-01 Thread Paolino
Bengt Richter wrote: Ok, to make the statement execute, execute function: function() a=function.foo a 'something' vars(function) {'foo': 'something'} Yep too stupid I've been :) Thanks ___ Yahoo! Mail:

Re: Wheel-reinvention with Python

2005-08-01 Thread Mark Roseman
Paul Rubin http://[EMAIL PROTECTED] wrote: Cliff Wells [EMAIL PROTECTED] writes: Still, that leaves Linux and Mac out in the cold. But I'll admit you met my challenge. Most likely you can actually do most of the things with Tk you can with Wx, it's simply a matter of how much effort is

Re: Python IDE's

2005-08-01 Thread Jon Hewer
I do use Vim a lot. I am currently using it for some PHP development i'm doing. I'm been using it so much recently that i keep pressing ESC and typing vi commands out of vi. But, if i use Vi, then whenever i want to test some code i have to open up python, import the necessary modules and run

Re: namespaces

2005-08-01 Thread Paolino
George Sakkis wrote: Paolino wrote: Even worse I get with methods and function namespaces. What is even worse about them? For my thinking, worse is to understand how they derive their pattern from generic namespaces. Methods seems not to have a writeble one,while functions as George and

Re: Path as a dictionary tree key? (was Re: PEP on path module for standard library)

2005-08-01 Thread Brian Beck
Ron Adam wrote: This give a more general purpose for path objects. Working out ways to retrieve path objects from a dictionary_tree also would be useful I think. I think a Tree class would also be a useful addition as well. Any thoughts on this? I don't think this would be as useful as

Re: namespaces

2005-08-01 Thread Paolino
Paul Rubin wrote: Paolino [EMAIL PROTECTED] writes: What I'm needing as a global (in globals() or at the module level or in the module namespace) is 'translate'.The rest of bindings (all,badcars and table) is something which is 'polluting' the module namespace. do you want __all__ =

Re: Wheel-reinvention with Python

2005-08-01 Thread Cliff Wells
On Mon, 2005-08-01 at 17:54 -0400, Mark Roseman wrote: I'll point out that this has been done (in fact, many times). For example: http://tkhtml.hwaci.com (Integrating Gecko in has also been done, as a side note). Interesting. Your later point about hard to find is certainly

Re: Python IDE's

2005-08-01 Thread Benji York
Jon Hewer wrote: But, if i use Vi, then whenever i want to test some code i have to open up python, import the necessary modules and run it - I like the idea of developing python in an IDE and just hitting a run button. map F5 :wCR:!python %CR -- Benji York --

Re: Dabo in 30 seconds?

2005-08-01 Thread Jorge Godoy
Daniel Dittmar wrote: Jorge Godoy wrote: We can find several problems, almost all of them can be solved with the admin's creativity. You must distinguish between solving technical problems once a course has ben set and choosing such a course in the first place. The latter has to deal

Re: namespaces

2005-08-01 Thread Paolino
Paolino wrote: Now this is the non polluting version : class translate: import string all=string.maketrans('','') badcars=all.translate(all,string.letters+string.digits) @staticmethod def __call__(text,table=string.maketrans(badcars,'_'*len(badcars))): return

Re: Path as a dictionary tree key? (was Re: PEP on path module for standard library)

2005-08-01 Thread Ron Adam
Brian Beck wrote: Ron Adam wrote: This give a more general purpose for path objects. Working out ways to retrieve path objects from a dictionary_tree also would be useful I think. I think a Tree class would also be a useful addition as well. Any thoughts on this? I don't think

RE: Is this Pythonic?

2005-08-01 Thread Delaney, Timothy (Tim)
Peter Hansen wrote: Change those to raise NotImplementedError('blah') instead and you'll be taking the more idiomatic approach. One thing I've noticed, which I may raise on python-dev ... NotImplementedError does *not* play well with super() ... class A (object): def test (self):

RE: rfc822 module bug?

2005-08-01 Thread Tony Meyer
[rfc822 module bug] Date: Tue,26 Jul 2005 13:14:27 GMT +0200 It seems to be correct¹, but parsedate_tz is not able to decode it, it is confused by the absence of a space after the ,. [...] I think I'll submit this bug on the Python web-site. Please don't. The rfc822 module is deprecated

Using gnu readline in my own python program?

2005-08-01 Thread sboyle55
Hi...I'm a newbie to python, and very confused. I'm writing a simple program and want the user to be able to edit a line that I display using the full gnu readline capabilitites. (For example, control+a to go to the beginning of the line.) Then I want to be able to read the line after it's been

calling functions

2005-08-01 Thread anthonyberet
This is the first time I have tried out functions (is that the main way of making subroutines in Python?) Anyway, my function, mutate, below #make a child string by randomly changing one character of the parent Def mutate(): newnum=random.randrange(27) if newnum==0:

Re: Using gnu readline in my own python program?

2005-08-01 Thread Thomas Lotze
sboyle55 wrote: Hi...I'm a newbie to python, and very confused. I'm writing a simple program and want the user to be able to edit a line that I display using the full gnu readline capabilitites. (For example, control+a to go to the beginning of the line.) Then I want to be able to read

Re: Python IDE's

2005-08-01 Thread gene tani
(instead of saying google is your bud, because this ? isn't readily FAQ-able) i suggest Google Advanced Searching c.l.py for python IDE intellisense or code completion or regex debugger or contextual help or whatever_feature (each feature has about 15 codenames, keep at it), maybe throw in your

How to execute code when a module is imported ?

2005-08-01 Thread Arthas
How I do it? I wanna execute some code when a module is imported: -- foo.py -- #!/usr/bin/env python def codetoexecwhenloaded(): print bar -- end of foo.py -- -- in console -- import foo ^ and then it should print bar Thanks, Arthas -- http://mail.python.org/mailman/listinfo/python-list

Re: calling functions

2005-08-01 Thread jepler
Without a 'global' statement, all variables which are assigned in the body of a function are local to that function. Here is an example showing that f() does not create a module-level variable, but g() does. def f(): ... z = 3 ... def g(): ... global z ... z = 3 ... z Traceback

Re: Using gnu readline in my own python program?

2005-08-01 Thread sboyle55
raw_input is an excellent suggestion, and almost exactly what I want. But, I want to give the user a string to edit, not have them start from scratch inputting a string. Any other ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: Using gnu readline in my own python program?

2005-08-01 Thread Thomas Lotze
sboyle55 wrote: raw_input is an excellent suggestion, and almost exactly what I want. But, I want to give the user a string to edit, not have them start from scratch inputting a string. http://svn.thomas-lotze.de/PyASDF/pyasdf/cli.py Take a look at the fancy_input function. -- Thomas --

Tkinter, Menu(bar) font size

2005-08-01 Thread Bob Greschke
Option adding Menu*font changes the font size of the _commands, _radiobuttons, etc., but not the File, Edit, etc. labels on the menubar itself. What is the name for those labels? If I go Top.add_cascade(Label = File, menu = Fi, font = Courier 20) they change, but I can't figure out the

Re: How to execute code when a module is imported ?

2005-08-01 Thread Titi Anggono
I tried foo.codetoexecwhenloaded() and it worked --- Arthas [EMAIL PROTECTED] wrote: How I do it? I wanna execute some code when a module is imported: -- foo.py -- #!/usr/bin/env python def codetoexecwhenloaded(): print bar -- end of foo.py -- -- in console -- import foo ^

Re: How to execute code when a module is imported ?

2005-08-01 Thread jepler
Depending what you mean, it may be dirt simple: -- foo.py -- print bar -- end of foo.py -- When a module is first imported, all the statements in it are executed. def statements define functions, and class statements define clasess. But you can have any type of statement you like at the top

Re: Tkinter, Menu(bar) font size

2005-08-01 Thread jepler
Tk tries to use the native menu control on Windows (and, I think, MacOS). One result seems to be that for the application's menu bar you can't change the font. Of course, Windows provides a way for users to select a uniform font for menu bars in all applications, in the Display control panel.

JOB: Python/web developer/network contract

2005-08-01 Thread Steven Arnold
Neosynapse Inc is seeking an experienced Python developer for a short- term engagement with a new Neosynapse government customer. The task will require 5-7 years of overall programming experience; at least two years of Python experience; experience writing web applications; and a good

Application Error (referenced error)

2005-08-01 Thread David Blomstrom
This is my first post on this list, and I'm new to Python. I downloaded a content management system called Plone and get the following error message when I try to start it: Plone Controller - [Plone Status]: pythonw.exe - Application Error The instruction at 0x009d3f09 referenced memory at

Re: Application Error (referenced error)

2005-08-01 Thread Brian Beck
David Blomstrom wrote: I downloaded a content management system called Plone and get the following error message when I try to start it: Plone isn't a stand-alone application, it's a skin and collection of products for the Zope application server. You'll have to get Zope up and running

Re: Application Error (referenced error)

2005-08-01 Thread Brian Beck
David Blomstrom wrote: This is my first post on this list, and I'm new to Python. Oh, and I forgot to mention: welcome to Python and our community! -- Brian Beck Adventurer of the First Order -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Tcl/Tk?

2005-08-01 Thread Michael P. Soulier
On 27/07/05 William Park said: Old habits die hard. Soon, these folks will die off, and we'll be left with GTK+ or wxWidgets. Not to mention dependency hell. Until wxPython is bundled with Python, it's a PITA to set it up on multiple boxes of different architectures and get all of the

Re: Python IDE's

2005-08-01 Thread en.karpachov
On Mon, 01 Aug 2005 18:21:08 -0400 Benji York wrote: Jon Hewer wrote: But, if i use Vi, then whenever i want to test some code i have to open up python, import the necessary modules and run it - I like the idea of developing python in an IDE and just hitting a run button. map F5

Re: Dabo in 30 seconds?

2005-08-01 Thread David Cuthbert
Ed Leafe wrote: Should we have defensive code for every possible broken installation? We use a lot of the Python standard library modules, many dbapi-compliant modules, and, of course, wxPython. If someone mis-installs one of the pre-requisites, do you expect Dabo to catch that and present

Re: Wheel-reinvention with Python

2005-08-01 Thread Mike Meyer
Cliff Wells [EMAIL PROTECTED] writes: On Sun, 2005-07-31 at 14:58 -0400, Mike Meyer wrote: And what do I use to bundle my application for Unix? Most of the things I build get installed on Unix servers. You install GUI apps on Unix *servers*? Yup. Thanks to the wonders of X, I can run GUI

Re: Wheel-reinvention with Python

2005-08-01 Thread Mike Meyer
Jorge Godoy [EMAIL PROTECTED] writes: Mike Meyer wrote: We already have multiple distributions of Python: CPython, IronPython, and Jython (and there's at least one more). We even have multiple distributions of CPython, what with Active State doing their own and the MacPython distribution.

Re: Wheel-reinvention with Python

2005-08-01 Thread Mike Meyer
Torsten Bronger [EMAIL PROTECTED] writes: Hallöchen! Mike Meyer [EMAIL PROTECTED] writes: Torsten Bronger [EMAIL PROTECTED] writes: [...] None of us has talked about changing syntax. However, the standard library is part of the language unless you're really very petty. Or you use

Re: Wheel-reinvention with Python

2005-08-01 Thread Cliff Wells
On Mon, 2005-08-01 at 23:49 -0400, Mike Meyer wrote: Cliff Wells [EMAIL PROTECTED] writes: On Sun, 2005-07-31 at 14:58 -0400, Mike Meyer wrote: And what do I use to bundle my application for Unix? Most of the things I build get installed on Unix servers. You install GUI apps on Unix

Re: Path as a dictionary tree key? (was Re: PEP on path module for standard library)

2005-08-01 Thread Ron Adam
Here's an example of how path objects could possibly be used to store and retrieve data from tree_dictionary class. I used lists here in place of path objects, but I think path objects would be better. I think paths used this way creates a consistant way to access data stored in both

Re: Wheel-reinvention with Python

2005-08-01 Thread Cliff Wells
On Mon, 2005-08-01 at 23:56 -0400, Mike Meyer wrote: I think you have me confused with someone else. I was responding to someone who was claiming that the lack of a standard enterprise strength GUI toolkit was a serious problem for Python - I disagree. I won't recap the thread, but other

Re: Wheel-reinvention with Python

2005-08-01 Thread Cliff Wells
On Tue, 2005-08-02 at 00:18 -0400, Mike Meyer wrote: Or maybe you could switch to Jython, and just use swing? Man, c.l.py is getting *mean* ;) -- [EMAIL PROTECTED] http://www.develix.com :: Web applications and hosting :: Linux, PostgreSQL and Python specialists :: --

Re: Wheel-reinvention with Python

2005-08-01 Thread Jorge Godoy
Mike Meyer wrote: Exactly what problem are you trying to solve? If it's the one about not having a standard GUI, I don't think it's a problem. Me neither. You pointed out that having a standard distribution made by some company would solve the non-standard GUI problem. I believe we share the

<    1   2   3   >