Re: Interactive shell for demonstration purposes

2005-05-12 Thread Bengt Richter
On Wed, 11 May 2005 16:21:19 +0200, Brian Quinlan <[EMAIL PROTECTED]> wrote: >Ville Vainio wrote: >> Hmm, do you consider the fonts in a console window unreadable? > >In fullscreen mode, yes (you get no choice of font size in Windows XP). >In Windowed mode you still only get a limited font select

Re: Finding startup files

2005-05-12 Thread jeff elkins
On Thursday 12 May 2005 05:24 am, Mike Meyer wrote: > jeff elkins <[EMAIL PROTECTED]> writes: > > On Wednesday 11 May 2005 04:44 pm, Grant Edwards wrote: > >> On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> > The following script demonstrates a method that should work for you. I >

Re: Destructor Woes, was Advice needed on __del__

2005-05-12 Thread flupke
phil wrote: > >> Then i got a tip that you can register a function that needs to be >> called when the object is going to be deleted. >> For instance to register a function __exit, you do this: >> > > > Here is the complete line class with your suggestion: > > Below is the output. > > Nice id

Re: HELP Printing with wxPython

2005-05-12 Thread jeff elkins
On Thursday 12 May 2005 04:56 am, Mike Meyer wrote: > James Carroll <[EMAIL PROTECTED]> writes: > > If you are doing this just for yourself, and you know you have a > > printer that will really print just the plain text when you send it > > plain text (like a dot matrix printer from the early 90s)

Re: Module on Getting the Date & Time

2005-05-12 Thread Edvard Majakari
Sara Khalatbari <[EMAIL PROTECTED]> writes: Hi, > Is there a Modules in Python that returns the time & > date of today when ran? You mean a method in a module? Yes, there's good 'ol time module, which will probably provide what you need: >>> import time >>> time.time() # number of seconds

subclass dialog or put in the resource files?

2005-05-12 Thread flupke
I'm using wxPython and design the gui via wxglade. One of the gui components is a simple dialog class that gets displayed when a user exits the program. I want to use the same dialog but with a different text for closing certain dialogs in the program. (it's a pure "do you want to exit " dialo

tkinter puzzler

2005-05-12 Thread Paul Rubin
I have a gui with a bunch of buttons, labels, the usual stuff. It uses the grid manager: gui = Frame() gui.grid() gui.Label().grid() # put some widgets into the gui ...# more widgets Now at the the very bottom of the gui, I want to add two more buttons, let's say "stop" and

Re: TAKE_FOCUS

2005-05-12 Thread Martin Franklin
phil wrote: > WM_TAKE_FOCUS does not work on WinXP ?? > I was sure I had used that on win before. > Works on Linux. > > I have a function I need to run when the window > gets the focus. How do you do that in Tkinter > on Win32? > Thanks > Take a look at the module docs for Tkinter you will need

Re: tkinter puzzler

2005-05-12 Thread Martin Franklin
Paul Rubin wrote: > I have a gui with a bunch of buttons, labels, the usual stuff. It > uses the grid manager: > >gui = Frame() >gui.grid() >gui.Label().grid() # put some widgets into the gui >...# more widgets > > Now at the the very bottom of the gui, I want to add two

Re: reg mail sending without smtp module

2005-05-12 Thread Roel Schroeven
praba kar wrote: > --- Tim Williams <[EMAIL PROTECTED]> wrote: >>Why don't you want to use smtplib ? > > In Php we can build a Mail Message by > Mail_mime class and send this message by > Mail::Factory's class send Method. Here Php > doesn't use any smtp modules. Like that > In Python I used emai

Re: reg mail sending without smtp module

2005-05-12 Thread Mike Meyer
praba kar <[EMAIL PROTECTED]> writes: > In Php we can build a Mail Message by > Mail_mime class and send this message by > Mail::Factory's class send Method. Here Php > doesn't use any smtp modules. Like that > In Python I used email.Message class to > build Mail Message and Now I am searching > mo

Re: Using TCL files in Python ?

2005-05-12 Thread Peter Moscatt
Many thanks to all who have helped me out on this one - much appreciated. Pete On Wed, 11 May 2005 07:22:09 -0500, Jeff Epler wrote: > While I've never used it, there *is* a Tix module in Python which > appears to wrap the widgets provided by Tix. In Fedora Core 2, Python > doesn't seem to be

Re: Unique Elements in a List

2005-05-12 Thread Edvard Majakari
[EMAIL PROTECTED] (Aahz) writes: >>[x for x in data if data.count(x) == 1] >> >>suffice? it is also "stable" preserving order of items. Lemme demo: > > Only for small datasets -- this is an O(N^2) algorithm. I realized that, but maybe I should've pointed it out too. For the OP if he/she is unawa

Re: HELP Printing with wxPython

2005-05-12 Thread Mike Meyer
jeff elkins <[EMAIL PROTECTED]> writes: >> Instead, as was suggested earlier, use the "lpr" command and send it >> the text/data on standard input. Any reasonably managed Unix system >> should be able to handle a fair range of graphics formats, though >> postscript is preferred. > I've been using:

Re: Defunct Processes With subprocess.Popen

2005-05-12 Thread John Abel
Mike Meyer wrote: >John Abel <[EMAIL PROTECTED]> writes: > > > >>Hi! >> >>I'm currently writing a script which launches external programs, but >>it keeps leaving zombie/defunct processes behind, until I kill the >>launching script, which is a bit of a pain, as it's supposed to be a >>daemon. Th

Re: Python Documentation (vs PHP stuff)

2005-05-12 Thread Roel Schroeven
Terry Reedy wrote: > Because of these two posts (and a few others) extolling the PHP > documentation, I decided to take a look for myself to see what the > fuss was about and whether I could get any ideas on how to improve > Python's docs. > > [...] > > Finally, 80% of the chapter/page consis

RE: windows directories for curr user

2005-05-12 Thread Tim Golden
[flamesrock] | | Thanks for the code Tom. | | Unforunately, I get the following error message when trying to import | win32com in idle: | | >>> from win32com.shell import shell, shellcon | | Traceback (most recent call last): | File "", line 1, in -toplevel- | from win32com.shell import s

Re: pyvm -- faster python

2005-05-12 Thread Stelios Xanthakis
Kay Schluehr wrote: > > Yes. What we are seeking for and this may be the meaning of Armins > intentiously provocative statement about the speed of running HLLs is a > successor of the C-language and not just another VM interpreter that is > written in C and limits all efforts to extend it in a fl

RE: Finding startup files

2005-05-12 Thread Tim Golden
[Mike Meyer] [... snip discussions of where to put config files ...] | Yes, but Windows these days supports multiple users. Are you sure that | you want to restrict your users to one configuration file per | installed version of the program? | | I'm not sure Windows has a good solution to this p

Re: tkinter puzzler

2005-05-12 Thread Peter Otten
Paul Rubin wrote: I think you are missing the columnconfigure()/rowconfigure() methods as Martin Franklin pointed out. Anyway, here is some code to illustrate the matter. I've found it helpful to use "false" colors to see what's going on. the yellow 'main' frame contains the red 'north' and the bl

SWIG/IDLE/Python: F5 SHIP.py works but "import SHIP" gives "ImportError: dynamic module does not define init function (initSHIP)"

2005-05-12 Thread Bill Davy
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24 to obtain SHIP_wrap.cpp and SHIP.py; the latter contains the line "import _SHIP". I compile SHIP_wrap.c

Re: Proxy Design Advice Needed

2005-05-12 Thread nitrogenycs
Thanks for the hint so far! The recipe shown there does not exactly what I want though, it doesn't do the type() stuff and it hooks up every _ variable which could get crucial if the wrapped object's methods uses them too. So I think my question boils down to how I can make type(Proxy) return type

Re: HELP Printing with wxPython

2005-05-12 Thread James Carroll
There's a working version in the wxPython Demo... If you run the wxpython demo, and choose Print Framework under Miscellaneous it has code that looks a whole lot like what's on the wiki, only you can test it and try it out and see if it's broken for you there. If anything doesn't work, let the w

Re: reg mail sending without smtp module

2005-05-12 Thread praba kar
Dear All, From this below answer I got clear idea for mail sending Module. I am expecting this kind of answer . Thank you for your immediate response. --- Mike Meyer <[EMAIL PROTECTED]> wrote: > praba kar <[EMAIL PROTECTED]> writes: > > In Php we can build a Mail Message by > > Mail_mime

Re: reg mail sending without smtp module

2005-05-12 Thread praba kar
Dear All, From this below answer I got clear idea for mail sending Module. I am expecting this kind of answer . Thank you for your immediate response. --- Mike Meyer <[EMAIL PROTECTED]> wrote: > praba kar <[EMAIL PROTECTED]> writes: > > In Php we can build a Mail Message by > > Mail_mime

Re: Python Documentation (vs PHP stuff)

2005-05-12 Thread Fredrik Lundh
Terry Reedy wrote: > Conclusion 1: if PHP is anything as awful as the manual, it is not for me. the whole idea that turning the manual into a wiki or a forum will solve all problems is extremely naive. on the other hand, having written lots of "manual enhancing material", I would love to be able

Re: Destructor Woes, was Advice needed on __del__

2005-05-12 Thread Fredrik Lundh
"flupke" wrote: >> Then i got a tip that you can register a function that needs to be >> called when the object is going to be deleted. >> For instance to register a function __exit, you do this: >> class line: >> def __init__(s,glob,argl,color=''): >> atexit.register(s.__exit) > I d

Re: Destructor Woes, was Advice needed on __del__

2005-05-12 Thread Fredrik Lundh
"phil" <[EMAIL PROTECTED]> wrote: >> Then i got a tip that you can register a function that needs to be >> called when the object is going to be deleted. >> For instance to register a function __exit, you do this: > > Here is the complete line class with your suggestion: > > Below is the output. >

Re: TAKE_FOCUS

2005-05-12 Thread Fredrik Lundh
"phil" wrote: > WM_TAKE_FOCUS does not work on WinXP ?? > I was sure I had used that on win before. > Works on Linux. > > I have a function I need to run when the window > gets the focus. How do you do that in Tkinter > on Win32? binding the event should work. (and make sure that the takefocus

Re: Python Documentation (vs PHP stuff)

2005-05-12 Thread Fredrik Lundh
> toolchain that adds relevant links to the generated HTML. e.g. oops. here's the pre-paste-and-cut-error text: toolchain that adds relevant links to the generated HTML. with that in place, external contributors can then place an annotation file on their own server, and send the li

Re: Importing modules

2005-05-12 Thread qwweeeit
Hi all. Steve Holden wrote: > > ... to conflict with the "can't teach an old dog new tricks" ... Excuse my English (also some terms of your replay have no correspondance in my English dictionary...) and my lack of patience (beeing an "old dog" ...). My original request was mainly centered on flo

Re: Destructor Woes, was Advice needed on __del__

2005-05-12 Thread phil
> > do you (or whoever gave you the tip) have the slightest idea what atexit does? > Yeah, I got the tip on this group. researched and found it was for when program ends! I was trying to treat it like a destructor. darn. -- http://mail.python.org/mailman/listinfo/python-list

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-12 Thread Mike brown
I don't give a feather or a fig. MJRB -- http://mail.python.org/mailman/listinfo/python-list

Re: Read tab delimited ascii file

2005-05-12 Thread Swaroop C H
On 5/12/05, Irvine, Wayne D <[EMAIL PROTECTED]> wrote: > I have a tab delimited ascii/excel file formated like ... The CSV module can help you: http://docs.python.org/lib/module-csv.html HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python

pexpect: TIMEOUT exception never raised

2005-05-12 Thread Adrian Casey
I have a python script which uses pexpect and I want to timeout (i.e. raise pexpect.TIMEOUT) if a long running command does not produce the output I am expecting. To simulate the 'long running command', consider the following example which simply runs the 'yes' command which prints an endless seri

Sleepycat Bsdbd 4.3.27 and Python 2.4.1

2005-05-12 Thread Cassiano, Marco
Hi all, I’ve just compiled Python 2.4.1 on a linux box (RHEL 3AS) after having installed Berkeley DB 4.3.27 from sleepycat Software.During the configure/build process python correctly found the BSBDB library. I then installed the rest of my environment which is correctly working with Python 2

Re: Python Documentation (vs PHP stuff)

2005-05-12 Thread James Carroll
> > > Conclusion 1: if PHP is anything as awful as the manual, it is not for me. > > the whole idea that turning the manual into a wiki or a forum will solve all > problems is extremely naive. > Wha? I haven't done PHP for a couple of years, but when I really needed documentation, the PHP docs

Re: Destructor Woes, was Advice needed on __del__

2005-05-12 Thread flupke
Fredrik Lundh wrote: > "flupke" wrote: > > >>>Then i got a tip that you can register a function that needs to be >>>called when the object is going to be deleted. >>>For instance to register a function __exit, you do this: > > >>>class line: >>>def __init__(s,glob,argl,color=''): >>>

Europython update

2005-05-12 Thread Jacob Hallen
This is a news update about the Europython 2005 conference, to be held in Göteborg, Sweden 27-29 June - We have received a very nice array of talks this year, and we expect to be the biggest Python conference ever in terms of subjects covered. Many thanks to all the speakers who are putting t

Re: Problem combining python code and html

2005-05-12 Thread Hansan
Any suggestions to the problem with only one character being displayed? Thanks Thanks for your time "Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hansan a écrit : >> Hi all, I hope you have time to help me out a little. My problem is that >> I want to combi

Launch file in Notepad

2005-05-12 Thread George
Newbie question: I'm trying to lauch Notepad from Python to open a textfile: import os b1="c:\test.txt" os.system('notepad.exe ' + b1) However, the t of test is escaped by the \, resulting in Notepad trying to open "c: est.txt". How do I solve this? (By the way, b1 comes from a command line p

Re: Python Documentation (should be better?)

2005-05-12 Thread Skip Montanaro
Paul> Some parts of the lib doc are better than others. The only way to Paul> understand SocketServer, for example, is to read the long comment Paul> at the beginning of the source file. I've been wanting to get Paul> around to merging that with the doc writeup and adding some

Re: Importing modules

2005-05-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > So forgive me if I'm in trouble... Instead of mocking me, the better > should be to give me an brief idea of the import's roll (namespaces, > visibility and so on...) if you're interested in learning stuff, why not spend your time reading up on how things work, rather t

RE: Launch file in Notepad

2005-05-12 Thread Michael . Coll-Barth
try b1="c:/test.txt" It seems to work for me on Windows 2000. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf Of George Sent: Thursday, May 12, 2005 9:41 AM To: python-list@python.org Subject: Launch file in Notepad Newbie question: I'm trying to l

Re: Launch file in Notepad

2005-05-12 Thread Brian van den Broek
George said unto the world upon 2005-05-12 09:41: > Newbie question: > > I'm trying to lauch Notepad from Python to open a textfile: > > import os > b1="c:\test.txt" > os.system('notepad.exe ' + b1) > > However, the t of test is escaped by the \, resulting in Notepad trying > to open "c: est.tx

Re: Python Documentation (should be better?)

2005-05-12 Thread Skip Montanaro
Ivan> I get that. My question, cleverly concealed in a rant, was, "Why Ivan> does clicking on the Documentation link at python.org NOT take me Ivan> to docs.python.org?" I almost changed that link, but then reconsidered. Compare http://docs.python.org/ with http://www.pyt

Re: pyvm -- faster python

2005-05-12 Thread Skip Montanaro
>> - hacking SWIG. Shouldn't be too hard and will instantly give >> us access to wx, qt, etc. Mike> You can't assume that because some package is a C/C++ library Mike> wrapped for Python that it uses SWIG. pyqt, for example, doesn't Mike> use SWIG at all. It uses SIP, which i

Re: Launch file in Notepad

2005-05-12 Thread Richie Hindle
[George] > b1="c:\test.txt" With this code, your problem is the embedded tab as you say. Use either r"c:\test.txt" or "c:\\test.txt". However, if this is true: > By the way, b1 comes from a command line parameter, so the user enters > c:\test.txt as command line parameter. then there will be

Re: Finding startup files

2005-05-12 Thread Grant Edwards
On 2005-05-11, jeff elkins <[EMAIL PROTECTED]> wrote: > I'm totally new to Python (obvious,yes?) so how might argv[0] fail? argv[0] contains whatever is put there by the program that exec'ed you, and can therefore contain just about anything (or nothing). It may not contain a full path, and your

Re: "/usr/bin/ld: cannot find -lmysqlclient" when building MySQL-Python

2005-05-12 Thread Andy Dustman
[EMAIL PROTECTED] wrote: > Hi. I'm trying to build MySQL-python-1.2.0 on my Linux FC2 > (with MySQL 3.23.58). See: https://sourceforge.net/tracker/index.php?func=detail&aid=1146226&group_id=22307&atid=374932 And also try the new 1.2.1c3 release candidate. -- http://mail.python.org/mailman/list

Re: Launch file in Notepad

2005-05-12 Thread Grant Edwards
On 2005-05-12, Brian van den Broek <[EMAIL PROTECTED]> wrote: >> b1="c:\test.txt" >> os.system('notepad.exe ' + b1) >> >> However, the t of test is escaped by the \, resulting in Notepad trying >> to open "c: est.txt". > There are several ways, but the preferred solution is to switch the > sla

Re: pyvm -- faster python

2005-05-12 Thread François Pinard
[Paul Rubin] > It's true that CPython doesn't have a compiler and that's > a serious deficiency. Hi, Paul. I did not closely follow all of the thread, so maybe my remark below, only repeats what others might have said and I missed? Deep down, why or how not having a [traditional, to-native-code

Speed of the different python-based HTTP-servers

2005-05-12 Thread Thomas W
I'm thinking of switching from my Twisted-HTTP-server-project to CherryPy or Snakelets etc etc. The project involves alot of database-access using SQLObject and SQLite ( perhaps MySQL and PostgreSQL in the future ) and some heavy IO-stuff ( scanning of local filesystem to extract meta information a

Re: urllib download insanity

2005-05-12 Thread Skip Montanaro
Timothy> i DELETED the file from my webserver, uploaded the new Timothy> one. when my app logs in it checks the file, if it's changed it Timothy> downloads it. the impossible part, is that on my pc is Timothy> downloading the OLD file i've deleted! if i download it via IE, Timo

Re: Launch file in Notepad

2005-05-12 Thread Bengt Richter
On Thu, 12 May 2005 15:41:14 +0200, George <[EMAIL PROTECTED]> wrote: >Newbie question: > >I'm trying to lauch Notepad from Python to open a textfile: > >import os >b1="c:\test.txt" >os.system('notepad.exe ' + b1) > >However, the t of test is escaped by the \, resulting in Notepad trying >to ope

Re: Launch file in Notepad

2005-05-12 Thread George
Richie Hindle wrote: >>By the way, b1 comes from a command line parameter, so the user enters >>c:\test.txt as command line parameter. > > > How are you prompting the user? When I run this: > > import os > b1=raw_input("Enter a filename: ") > os.system('notepad.exe ' + b1) > > and enter c:\te

Re: Sleepycat Bsdbd 4.3.27 and Python 2.4.1

2005-05-12 Thread Skip Montanaro
Marco> I've just compiled Python 2.4.1 on a linux box (RHEL 3AS) after Marco> having installed Berkeley DB 4.3.27 from sleepycat Software. Marco> During the configure/build process python correctly found the Marco> BSBDB library. ... Marco> File "/usr/local/lib/python2.

Re: subclass dialog or put in the resource files?

2005-05-12 Thread flupke
flupke wrote: > > I'm using wxPython and design the gui via wxglade. One of the gui > components is a simple dialog class that gets displayed when a user > exits the program. > I want to use the same dialog but with a different text for closing > certain dialogs in the program. (it's a pure "do

Re: Importing modules

2005-05-12 Thread qwweeeit
Hi Fredrik, thank you for saying that I am > ... posting silly assertions. I didn't born " Python expert", and I am hardly trying to learn something. I don't like classes but this assertion (silly... I agree) is due to the fact that "I don't understand them well" (I hope to change mind in a near fu

Re: Launch file in Notepad

2005-05-12 Thread George
Grant Edwards wrote: > On 2005-05-12, Brian van den Broek <[EMAIL PROTECTED]> wrote: > Does Python really look at the string and mess with the slash? > I don't think it needs to, since the Windows system calls have > always accepted forward slashses, haven't they? It did, but now not anymore.

Re: Launch file in Notepad

2005-05-12 Thread Bengt Richter
On Thu, 12 May 2005 14:20:29 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2005-05-12, Brian van den Broek <[EMAIL PROTECTED]> wrote: > >>> b1="c:\test.txt" >>> os.system('notepad.exe ' + b1) >>> >>> However, the t of test is escaped by the \, resulting in Notepad trying >>> to open "c: es

Re: Python Documentation (should be better?)

2005-05-12 Thread Terry Hancock
On Thursday 12 May 2005 08:57 am, Skip Montanaro wrote: > Ivan> I get that. My question, cleverly concealed in a rant, was, "Why > Ivan> does clicking on the Documentation link at python.org NOT take me > Ivan> to docs.python.org?" > I almost changed that link, but then reconsidered.

Re: Launch file in Notepad

2005-05-12 Thread George
Bengt Richter wrote: > On Thu, 12 May 2005 15:41:14 +0200, George <[EMAIL PROTECTED]> wrote: >>(By the way, b1 comes from a command line parameter, so the user enters >>c:\test.txt as command line parameter.) > > It should be ok then, unless you have somehow processed the command line > paramet

Re: Python Documentation (should be better?)

2005-05-12 Thread Christopher J. Bottaro
Steven Bethard wrote: > Ivan Van Laningham wrote: >> The Python docs are not ideal. I can never remember, for instance, >> where to find string methods (not methods in the string module, but >> methods with '') > > Hmmm... Well going to http://docs.python.org/ and typing "string > methods" into

Re: Python Documentation (should be better?)

2005-05-12 Thread Christopher J. Bottaro
Steven Bethard wrote: > Christopher J. Bottaro wrote: >> Contrast that with Python. First off there is no "search" mechanism >> built into the documentation page (yes I know you can google it, but that >> just doesn't feel right). > > Um, are you looking at the current documentation page? > > h

How "return" no return ?

2005-05-12 Thread Ximo
Hello, I want that the return sentence don't return anything, how can I do it?. If i do only return it returns None, and pass don't run too. Can anyone help me?, thanks. XIMO -- http://mail.python.org/mailman/listinfo/python-list

Re: How "return" no return ?

2005-05-12 Thread Joseph Garvin
Ximo wrote: >Hello, I want that the return sentence don't return anything, how can I do >it?. If i do only return it returns None, and pass don't run too. > >Can anyone help me?, thanks. >XIMO > > > > Returning None is the same as returning nothing. What exactly are you trying to do? -- http:

Creating new StructuredText-like content type for Zope/Plone

2005-05-12 Thread pugnatio
I prefer to use my own text format instead of StructuredText or the like, because I also use emacs outline mode a lot. What would be the best approach for creating this new content type in Zope/Plone? Writing a new Plone product with page templates seems fairly involved, but maybe it's desirable t

Re: Launch file in Notepad

2005-05-12 Thread Grant Edwards
On 2005-05-12, Bengt Richter <[EMAIL PROTECTED]> wrote: >>> There are several ways, but the preferred solution is to switch the >>> slash direction: "c:/test.txt". Python's smart enough to notice its >>> running on Windows and do the right thing with the slash. >> >>Does Python really look at th

Re: Interactive shell for demonstration purposes

2005-05-12 Thread Brian Quinlan
Bengt Richter wrote: > If you make your console 96 wide and set the font to Lucida Console Bold > 24point, > it will probably expand to near full screen on 1024x768. You can set the > scroll buffer > to a couple hundred lines and adjust console widow height to suit. Use the > properties > from t

Re: How "return" no return ?

2005-05-12 Thread Tim Williams
"Ximo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, I want that the return sentence don't return anything, how can I do > it?. If i do only return it returns None, and pass don't run too. > > Can anyone help me?, thanks. > XIMO > Just don't use a return statement at all, o

Is there a better way to delete the image from a Tkinter button other than the following:

2005-05-12 Thread Casey Hawthorne
Is there a better way to delete the image from a Tkinter button other than the following: - reconstructing the button - image=blank.gif -- Regards, Casey -- http://mail.python.org/mailman/listinfo/python-list

Re: How "return" no return ?

2005-05-12 Thread Ximo
I am doing a interpret of lines and it show me a prompt, and I want if I write a declaration as "int a" my progrtam return de prompt and nothing more, for exemple: >>> 2+2 4 >>> int a >>> Then I'm finding that de function which execute "int a" return me nothing, and no >>> int a None >>> "

Re: How "return" no return ?

2005-05-12 Thread François Pinard
[Ximo] > I want that the return sentence don't return anything, how can I do > it? `return' always return something (if we except the case of generators). Used without arguments, it returns None, as you discovered already. If a function "falls through" its end, None is implicitely returned. A fu

Re: How "return" no return ?

2005-05-12 Thread Grant Edwards
On 2005-05-12, Tim Williams <[EMAIL PROTECTED]> wrote: > "Ximo" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hello, I want that the return sentence don't return anything, how can I do >> it?. If i do only return it returns None, and pass don't run too. >> >> Can anyone help me?,

Re: pyvm -- faster python

2005-05-12 Thread Andrew Dalke
Paul Rubin wrote: > Yes, there are several Python compilers already ... > It's true that CPython doesn't have a compiler and that's a serious > deficiency. A lot of Python language features don't play that well > with compilation, and that's often unnecessary. So I hope the baseline > implem

Re: How "return" no return ?

2005-05-12 Thread Corrado Gioannini
On Thu, May 12, 2005 at 04:42:34PM +0100, Tim Williams wrote: > Just don't use a return statement at all, or do something like > > [function body] > if not val = None: > return val > [end of function] i didn't understood that. if you don't return nothing explicitly the function returns None.

Re: a cx_Oracle ORA-01036 problem

2005-05-12 Thread Damjan
>> SQL = """insert into D.D_NOTIFY values (:CARDREF, :BANKKEY, :OK1, :OK2 \ >> :DEBTEUR, :DEBTDEN, to_date(:INVOICE_DATE,'DD.MM.YY'), >> to_date(:PAYMENT_DEADLINE,'DD.MM.YY'), :POINTS)""" >> > Try using a variable name other than "id" for the CARDREF variable... say > "card_id".

Re: Python Documentation (should be better?)

2005-05-12 Thread Mike Meyer
"Christopher J. Bottaro" <[EMAIL PROTECTED]> writes: > because there are no namespaces or classes, but still I think Python could > do something similar. Say for instance search for "append" and it will > come back with a page for list's append, a page for array's append, etc. A seperate page fo

Re: Compiling Tcl apps redux

2005-05-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: . . . >Absolutely! Looking at the wiki there are a bunch of solutions, all of >which work in specialized circumstances. Nothing like, say the "freeze" >script of Pyt

Re: How "return" no return ?

2005-05-12 Thread Tim Williams
- Original Message - From: "Corrado Gioannini" <[EMAIL PROTECTED]> > On Thu, May 12, 2005 at 04:42:34PM +0100, Tim Williams wrote: > > Just don't use a return statement at all, or do something like > > > > [function body] > > if not val = None: > > return val > > [end of function]

Re: urllib download insanity

2005-05-12 Thread Andrew Dalke
Timothy Smith wrote: > ok what i am seeing is impossible. > i DELETED the file from my webserver, uploaded the new one. when my app > logs in it checks the file, if it's changed it downloads it. the > impossible part, is that on my pc is downloading the OLD file i've > deleted! if i download it

Re: Python Documentation (should be better?)

2005-05-12 Thread Skip Montanaro
Mike> Given that Python hides the difference between user-defined Mike> objects and built-in objects, it's not clear to me that anything Mike> other than the current system, with all the classes/types in one Mike> place, makes sense. Maybe the Module Index should be renamed "Modul

Python Polymorphism

2005-05-12 Thread Carlos Moreira
Dear all, How could I use Python polymorphism? Which kind of structures Python give me to use polymorphism? Where can I find specific documentation? Thanks and Best regards. Cadu Moreira __ Do you Yahoo!? Make Yahoo! y

Re: Unique Elements in a List

2005-05-12 Thread Scott David Daniels
Edvard Majakari wrote: > I realized that, but maybe I should've pointed it out too. For the OP if > he/she is unaware - notation O(N^2) (big O n squared) means the computing time > of the algorithm increases exponentially (where exponent is 2) relative to the > size of the input. Normally this is c

Debugging python with c++ extensions under windows with eclipse CDT

2005-05-12 Thread peter
Hello all, I would like to debug my python libraries, written in c++, with GDB (gnu debugger) I'm using the mingw compiler in a windows environment. As development environment I use eclipse with the CDT plugin. This plugin also has a nice GUI frontend for the GDB. I've already tried several set

Tix hlist and item_exists

2005-05-12 Thread theoryboy
I can't seem to get this function to work. If the item does not exist I get an exception, rather than a return value of false. Here's an example: #!/usr/bin/python from Tix import * root = Tk() listBox = HList(root) item = "some item" if not listBox.item_exists(item, 0): listBox.add(ite

Python with MSC.Mentat

2005-05-12 Thread Jeroen Kleijer
Hi all, I'm running into a very strange problem at work. We're using an application called MSC.Mentat (modelling/meshing application) which provides a programmable interface through Python. Because we were told that the Python version they ship is missing some libraries we compiled it ourselves

Re: Finding startup files

2005-05-12 Thread Bernhard Herzog
Grant Edwards <[EMAIL PROTECTED]> writes: > On 2005-05-11, jeff elkins <[EMAIL PROTECTED]> wrote: > >> I'm totally new to Python (obvious,yes?) so how might argv[0] fail? > > argv[0] contains whatever is put there by the program that > exec'ed you, and can therefore contain just about anything (or

Can get reference of a part of a list?

2005-05-12 Thread flyaflya
I want make a 2-D array from a list,all elements is references of list's,like this: a = [1,2,3,4] b = [ [1,2], [3,4] ] when change any elements of a, the elements of b will change too, so I can use some function for list to change b. c/c++ can work in this way,I think let b[0] = a[0:2], b[1] = a

Re: Python Graphing Utilities.

2005-05-12 Thread Petr Mikulik
> A pslatex backend certainly would be interesting. A Gnuplot backend > would probably not be feasible. Does it expose its raw drawing operations? There is a patch [ 1027032 ] Connect gnuplot_x11 to exterior application window http://sourceforge.net/tracker/index.php?func=detail&aid=1027032&group_

Re: Can get reference of a part of a list?

2005-05-12 Thread Terry Reedy
"flyaflya" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want make a 2-D array from a list,all elements is references of > list's,like this: > a = [1,2,3,4] > b = [ [1,2], [3,4] ] > when change any elements of a, the elements of b will change too, so I > can use some function fo

Re: Can get reference of a part of a list?

2005-05-12 Thread F. Petitjean
Le Fri, 13 May 2005 00:58:49 +0800, flyaflya a écrit : > I want make a 2-D array from a list,all elements is references of > list's,like this: > a = [1,2,3,4] > b = [ [1,2], [3,4] ] > when change any elements of a, the elements of b will change too, so I > can use some function for list to chang

Re: Speed of the different python-based HTTP-servers

2005-05-12 Thread Irmen de Jong
Thomas W wrote: > I don't expect this project to have alot of traffic once online, but it > would kinda suck if my software couldn't handle it if it really took > off. What would be "a lot" > So my question is; based on the very brief description above, are there > any of the python-based fr

Re: Python Documentation (should be better?)

2005-05-12 Thread Terry Reedy
"Skip Montanaro" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Maybe the Module Index should be renamed "Module/Type Index" and > embellished > with the builtin types, so that you'd find "float (builtin)", "string > (builtin)", "dict (builtin)", etc. in the appropriate alphabetic

Re: Python Polymorphism

2005-05-12 Thread Fredrik Lundh
Carlos Moreira wrote: > How could I use Python polymorphism? > Which kind of structures Python give me to use > polymorphism? > Where can I find specific documentation? www.python.org (have you read the tutorial?) -- http://mail.python.org/mailman/listinfo/python-list

Re: How "return" no return ?

2005-05-12 Thread Fredrik Lundh
"Ximo" wrote: > I am doing a interpret of lines and it show me a prompt, and I want if I > write a declaration as "int a" my progrtam return de prompt and nothing > more, for exemple: > > >>> 2+2 > 4 > >>> int a > >>> > > Then I'm finding that de function which execute "int a" return me nothing, >

Re: Python Polymorphism

2005-05-12 Thread Carlos Moreira
--- Fredrik Lundh <[EMAIL PROTECTED]> wrote: > www.python.org :-/ > > (have you read the tutorial?) Are you talking about: http://docs.python.org/tut/tut.html I fear that doesn't exist one word about polymorphism (in an explicit way). Anyway, I use Python since 2000 year and already use OO P

Re: Python Documentation (should be better?)

2005-05-12 Thread Bill Mill
On 5/12/05, Terry Reedy <[EMAIL PROTECTED]> wrote: > > "Skip Montanaro" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Maybe the Module Index should be renamed "Module/Type Index" and > > embellished > > with the builtin types, so that you'd find "float (builtin)", "string > > (

Re: Problem combining python code and html

2005-05-12 Thread Fredrik Lundh
"Hansan" wrote: > The change did remove the error message, and I can see what was wrong. > However there is now a new problem, the only thing that is displayed is one > single character and that is: < > > Do you or anyone else have a suggestion to what the cause to this new > problem is ? my faul

  1   2   >