Re: Folding in vim

2005-07-04 Thread Ron Adam
Terry Hancock wrote: On Saturday 02 July 2005 10:35 pm, Terry Hancock wrote: I tried to load a couple of different scripts to automatically fold Python code in vim, but none of them seems to do a good job. I've tried: python_fold.vim by Jorrit Wiersma

Re: Folding in vim

2005-07-04 Thread Andrea Griffini
On Sun, 3 Jul 2005 22:42:17 -0500, Terry Hancock [EMAIL PROTECTED] wrote: It seems to be that it isn't robust against files with lots of mixed tabs and spaces. My suggestion is: - never ever use tabs; tabs were nice when they had a de-facto meaning (tabbing to next 8-space boundary) nowdays

RE: Determining actual elapsed (wall-clock) time

2005-07-04 Thread Coates, Steve (ACHE)
-Original Message- From: Roy Smith [mailto:[EMAIL PROTECTED] Sent: 02 July 2005 21:22 To: python-list@python.org Subject: Re: Determining actual elapsed (wall-clock) time SNIP If you get the UTC time, daylight savings time doesn't enter the equation. If the system clock is

Re: custom Tkinter ListBox selectMode

2005-07-04 Thread Eric Brunel
On Fri, 1 Jul 2005 20:19:20 -0400, Ron Provost [EMAIL PROTECTED] wrote: Hello, I've written a simple GUI which contains a listbox to hold some information. I've found that the click-selection schemes provided by Tkinter are insufficient for my needs. Essentiall I need to impletement a

Re: What are the other options against Zope?

2005-07-04 Thread Max M
phil wrote: Peter Hansen wrote: Now understand, I know what very well what Python, Apache, PhP, MySQL, IE and javascript do. I just don't know what Zope does. And if the answer is going contain phrases like brings together or sits on top of, don't bother. :-) It's an object oriented

Re: Tkinter Checkbutton initialization problem

2005-07-04 Thread Eric Brunel
On 03 Jul 2005 02:32:21 -0700, Paul Rubin http://[EMAIL PROTECTED] wrote: Python 2.4, Windows XP. If I say: f = Frame() f.grid() v = IntVar() c = Checkbutton(f, text='hi there', variable=v) c.grid() f.mainloop() then the checkbutton should initially display as

Re: math.nroot [was Re: A brief question.]

2005-07-04 Thread OKB (not okblacke)
Tom Anderson wrote: Yes. However, it's an excellent reason why python's precedence rules are wrong - in conventional mathematical notation, the unary minus, used to denote the sign of a literal number, does indeed have higher precedence than exponentiation: -1^2 evaluates to 1, not -1.

'Deep' pickling

2005-07-04 Thread jeanphilippe . aumasson
Hi, I have some problems when pickling an instance of a class, i don't retrieve all its attributes instances after loading. I'm quite a beginner in Python, so it may be a stupid error... Here the full description : I have a class Test, having an attribute self.problem, as an instance of Problem

Re: how to retrive highlighted text in a browser?

2005-07-04 Thread wcc
Thanks for reply. I did not expect it to be a browser specific problem. I've been using a freeware dictionary tool called wordweb (it is a great tool) and it can detect highlighted text in browsers or text editors, etc.. I'll keep searching. Thanks again. - wcc --

Re: question about raw_input

2005-07-04 Thread wcc
Thanks for your suggestion Michael. -wcc -- http://mail.python.org/mailman/listinfo/python-list

Outlook COM: how to create a MailItem from a .msg file

2005-07-04 Thread Guy Lateur
Hi all, I've been writing some code to move some data into and out of Outlook (2003 + Exchange 2003). I have some email .msg files on our file server, and I can't seem to get them back into the Outlook object I need, ie a MailItem. I've tried to use App.CopyFile() to (temporarily) put the file

Re: Better console for Windows?

2005-07-04 Thread Richie Hindle
[Richie] does anyone know of a way to scroll a Command Prompt window using the keyboard? [Bengt] Alt-spacebar, e, l, (uparrow/downarrow)*, Esc (lower case L)--^ ^--does the scrolling. Esc ends the scrolling mode. [Christos] Damn! it says Scroll in there in the system

Re: When someone from Britain speaks, Americans hear a British accent...

2005-07-04 Thread Richie Hindle
[Chan] T can be silent in England too .. frui' cricke' [Stephen] Both of those words (fruit and cricket) have the letter T sounded. Stephen (Nationality: English). Not necessarily - in my native accent they'd be replaced with glottal stops. Richie (Nationality: West Yorkshire 8-)

f*cking re module

2005-07-04 Thread jwaixs
arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! There are only reference, and if you don't know how a module work you won't learn it from a reference! This is the problem: import re str

Re: f*cking re module

2005-07-04 Thread Simon Brunning
On 4 Jul 2005 01:04:47 -0700, jwaixs [EMAIL PROTECTED] wrote: arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! http://www.amk.ca/python/howto/regex/ -- Cheers, Simon B, [EMAIL

Re: f*cking re module

2005-07-04 Thread Erik Max Francis
jwaixs wrote: arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! There are only reference, and if you don't know how a module work you won't learn it from a reference! Then Google for

Debugging embedded python

2005-07-04 Thread fotis
hello there! I am playing with embedded python these days. I wrote sth like this: -- Code --- #include Python.h #include iostream #include cmath /* Return the square root of an argument */ static PyObject* Fotis_root(PyObject *self,

Re: Lost in a sea of documentation...can you point me in the right direction?

2005-07-04 Thread Simon Brunning
On 6/30/05, Bruno Desthuilliers [EMAIL PROTECTED] wrote: There are 2 problems to solve: 1/ change the 'wallpaper' 2/ run as a background task (a 'service' on Win32, a 'daemon' on unix-likes) The 2nd one is already solved by your os (use Windows' task scheduler or *n*x's cron). I was

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-04 Thread Carl Banks
Steven D'Aprano wrote: Carl Banks wrote: The shamelessness with which you inflated the verbosity of the latter is hilarious. [snip] [ x**2 + y**2 for (x,y) in izip(xlist,ylist) ] Now there's no longer much advantage in conciseness for the map version (seeing that you'd have to

Re: web programming with mod_python

2005-07-04 Thread Gregory Bond
Rodrigo Dominguez wrote: My question is: is there some kind of framework that works with mod_python? I use and love Albatross, but there are heaps of others. Check the mod_python FAQ, in particular http://www.modpython.org/FAQ/faqw.py?req=showfile=faq03.010.htp --

Re: email link and foreign accent

2005-07-04 Thread Vittorio
Peter Hansen [EMAIL PROTECTED] wrote in news:6f-dnTSTQazBSlvfRVn- [EMAIL PROTECTED]: Vittorio wrote: printa href=mailto:%s; %(campovalore.encode('iso-8859-1')) print campovalore.encode('iso-8859-1') print /a It might help if you showed us the output of repr(x) where x is the output of

Re: f*cking re module

2005-07-04 Thread Matthias Huening
jwaixs (04.07.2005 10:04): arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! Did you try this one? http://www.amk.ca/python/howto/regex/regex.html import re str = blablapythonRe modules

Re: f*cking re module

2005-07-04 Thread Max M
jwaixs wrote: arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! There are only reference, and if you don't know how a module work you won't learn it from a reference! If you want to try

Re: f*cking re module

2005-07-04 Thread Diez B. Roggisch
jwaixs wrote: arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! There are only reference, and if you don't know how a module work you won't learn it from a reference! This is the

Re: How do you program in Python?

2005-07-04 Thread dirk dierickx
On Sun, 03 Jul 2005 17:35:16 +0100, anthonyberet wrote: I see lots of alternate IDEs etc, but which would allow me the simple interface that I have described? - I really don't know about IDEs in general, and I suspect I would be out of my depth with one of those. Eclipse and pydev are good.

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-04 Thread Carl Banks
Christopher Subich wrote: Carl Banks wrote: Christopher Subich wrote: I've heard this said a couple times now -- how can listcomps not completely replace map and filter? If you're doing heavy functional programming, listcomps are tremendously unwieldy compared to map et al.

Re: f*cking re module

2005-07-04 Thread Gurpreet Sachdeva
try: re.search((python)(/python), str).group() except: print 'not found' otherwise, re.search((python).*?(\/python), str).group() this is will help! Regards, Gurpreet Singh Blogging [at] http://garrythegambler.blogspot.com On 4 Jul 2005 01:04:47 -0700, jwaixs [EMAIL PROTECTED]

Re: Embedding performance.

2005-07-04 Thread [EMAIL PROTECTED]
amit wrote: Is there any kind of performance differences to the different ways of embedding python? PyEval_EvalCode() PyRun_SimpleFile() PyObject_CallObject() AFAIK, these are only different wrappers, while you're generally getting at the same functionality. I assume

Re: email link and foreign accent

2005-07-04 Thread Vittorio
Vittorio [EMAIL PROTECTED] wrote in news:Xns96896D46D9DCCSoToSpeak@ 195.110.128.18: Thanks Peter for replying. This is an example of the output of repr(x) as you requested: '[EMAIL PROTECTED]' Results: link opened from IE6-Outlook: it works link opened from IE6-Pocomail: it works link

MySQL posting confirmation for python-list@python.org

2005-07-04 Thread MySQL Lists Automoderator
This is an automatic reply to an email you sent to a MySQL mailing address protected by our 'self-moderation' system. To reduce the amount of spam received at these addresses, we require you to confirm that you're a real person before your email will be allowed through. Unfortunately, we got a

Re: I am a Java Programmer

2005-07-04 Thread bruno modulix
[EMAIL PROTECTED] wrote: I am a java programmer Too bad :( and I want to learn Python So there's still hope !-) Please help me. 1/ download and install Python 2/ go thru the 'dive into Python' and 'Thinking in Python' free books 3/ post here when you're in doubt or in trouble... And don't

Re: your purge request

2005-07-04 Thread Lyris ListManager
Re: your purge request purge Sorry, but your email address: python-list@python.org is not listed as a member of a mailing list. Thus, you could not be unsubscribed from any mailing lists. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to compare files

2005-07-04 Thread bruno modulix
Lad wrote: Hi, What is the best method for comparing two files by words? try the difflib module: http://www.python.org/doc/2.4.1/lib/module-difflib.html -- bruno desthuilliers python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')]) --

Re: f*cking re module

2005-07-04 Thread Stephen Harris
jwaixs [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! There are only reference, and if you don't know how a module work you

curses -- getxy() error

2005-07-04 Thread shablool
Hi, Could someone please explain why stdscr.getxy() always raise an exception: import curses import traceback def init(stdscr): x = y = 0 while 1: c = stdscr.getch() if c == ord('q'): break stdscr.addch(c) (x, y) = stdscr.getxy()

Re: curses -- getxy() error

2005-07-04 Thread [EMAIL PROTECTED]
shablool wrote: Could someone please explain why stdscr.getxy() always raise an exception: [code here] the method is named getyx(), this is old unix heritage. see http://www.python.org/doc/2.0.1/lib/curses-window-objects.html -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you program in Python?

2005-07-04 Thread Terry Hancock
On Sunday 03 July 2005 11:35 am, anthonyberet wrote: What I would really like is something like an old-style BASIC interpreter, in which I could list, modify and test-run sections of code, to see the effects of tweaks, without having to save it each time, or re-typing it over and over (I

Re: Will Guido's Python Regrets ever get implemented/fixed?

2005-07-04 Thread Peter Maas
George Sakkis schrieb: Given that the latest 2.x python will be 2.9 Why not 2.13 or 2.4711? Version strings are sequences of arbitrary integers separated by dots and not decimal numbers, or are they? -- --- Peter Maas, M+R

Re: looping over a big file

2005-07-04 Thread Terry Hancock
On Sunday 03 July 2005 08:28 pm, Peter Hansen wrote: If open() can ever return things other than files, it seems likely it will do so only under conditions that make it pretty much safe to assume that existing code will continue to operate as expected (note: not always with a file). WHEN

Re: f*cking re module

2005-07-04 Thread jwaixs
Thank you for your replies, it's much obvious now. I know more what I can and can't do with the re module. But is it possible to search for more than one string in the same line? bv. I want to replace the python with /python with \n and every thing that's not between the two python tags must

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-04 Thread Terry Hancock
On Sunday 03 July 2005 07:05 pm, Erik Max Francis wrote: I personally think that map looks clearer than a list comprehension for a simple function call, e.g. I have to disagree map(str, sequence) This says call a function 'map' on 'str' and 'sequence' Which, syntactically, is not

Re: f*cking re module

2005-07-04 Thread Cyril BAZIN
If you are looking for HTML tags or something like that. Have a look at the HTMLParser (docs.python.org). On 4 Jul 2005 03:37:02 -0700, jwaixs [EMAIL PROTECTED] wrote: Thank you for your replies, it's much obvious now. I know more what I can and can't do with the re module. But is it possible

precision problems in base conversion of rational numbers

2005-07-04 Thread Brian van den Broek
Hi all, I guess it is more of a maths question than a programming one, but it involves use of the decimal module, so here goes: As a self-directed learning exercise I've been working on a script to convert numbers to arbitrary bases. It aims to take any of whole numbers (python ints, longs,

Review of 'data crunching'

2005-07-04 Thread TechBookReport
There's a review of 'Data Crunching' by Greg Wilson over at TechBookReport. This is not a teach-yourself Python book but one that uses Python to solve various common data-related tasks with regular expressions, XML, SQL and so on. The review is here: http://www.techbookreport.com/tbr0172.html

Re: math.nroot [was Re: A brief question.]

2005-07-04 Thread George Sakkis
Steven D'Aprano [EMAIL PROTECTED] wrote: But it doesn't make sense to say that two flags are equal: keep_processing = True more_reading_needed = True while more_reading_needed and keep_processing: get_more_records() process_records() if not keep_processing: print User

Unicode drives me crazy...

2005-07-04 Thread [EMAIL PROTECTED]
Hi ! I want to get the WMI infos from Windows machines. I use Py from HU (iso-8859-2) charset. Then I wrote some utility for it, because I want to write it to an XML file. def ToHU(s,NoneStr='-'): if s==None: s=NoneStr if not (type(s) in [type(''),type(u'')]): s=str(s) if

Trapping user logins in python ( post #1)

2005-07-04 Thread thinkgeek
I am writting a daemon in python which should start at system start up with all inet.d serviceson an NIS server. Then it should listen to any user login and then start a new process for that user on his login which will continue throughout his entire session. Can anyone give any help or any

Re: Outlook COM: how to create a MailItem from a .msg file

2005-07-04 Thread Simon Brunning
On 7/4/05, Guy Lateur [EMAIL PROTECTED] wrote: I've been writing some code to move some data into and out of Outlook (2003 + Exchange 2003). I have some email .msg files on our file server, and I can't seem to get them back into the Outlook object I need, ie a MailItem. I've tried to use

Connecting to Firebird database using Kinterbasdb+Python

2005-07-04 Thread Maurice LING
Hi, I've been using FB1.5 and access the database using Kinterbasdb + Python. My connection is established using kinterbasdb.connect() method and the parameters host, dns, database, user, password are all defaulted to 'None'. On my own machine running Mac OSX 10.3, I can connect using the

RE: Unicode drives me crazy...

2005-07-04 Thread Tim Golden
[EMAIL PROTECTED] | I want to get the WMI infos from Windows machines. | I use Py from HU (iso-8859-2) charset. OK, there are people better placed than I to explain about Unicode. Check out the following article, for example: http://www.joelonsoftware.com/printerFriendly/articles/Unicode.html

Re: python project layout

2005-07-04 Thread Huron
Hi Peter, Thanks for you detailed reply. The layout that you suggest sounds wise to me (I'm about to start a project). I confess that, coming from the java world, I've trouble to move away from the paradigm one class = one file ... and to gather things inside python

Cancelling a subprocess based on its output

2005-07-04 Thread jelle
Hi, I'm using the subprocess module to run a open-source lighting simulation software, Radiance, and am using python to script it. When Radiance finds a scene where no light is present its prints out 'warning - no light sources found' to the console. I'm looking for a way to terminate the

Re: python project layout

2005-07-04 Thread Huron
Hi again, For instance, if you have several classes implementing the same interface (say, doing the same things with different strategies), how would you organize that in terms of files (modules) and directories (packages) ? -- huron --

Re: How do you program in Python?

2005-07-04 Thread bruno modulix
anthonyberet wrote: My question isn't as all-encompassing as the subject would suggest... I am almost a Python newbie, but I have discovered that I don't get along with IDLE, as i can't work out how to run and rerun a routine without undue messing about. What I would really like is

Re: How do you program in Python?

2005-07-04 Thread Roy Smith
bruno modulix [EMAIL PROTECTED] wrote: Try Emacs + python-mode. Emacs surely has a lot of warts, but I'm still looking for a better and more versatile code editor/IDE - specially when it comes to languages with REPL (- Read-Eval-Print Loop). When you build Python, make sure you build it with

OT: ^ in redirection (windows)

2005-07-04 Thread Miki Tebeka
Hello All, Can someone explain me the difference between: echo 1 1.txt 21 and echo 1 1.txt 2^1 (Windows XP cmd shell) Both produce 1.txt with the content 1. (Sadly, I don't know how to search for ^ in google). Thanks. --

Re: Unicode drives me crazy...

2005-07-04 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: I want to get the WMI infos from Windows machines. I use Py from HU (iso-8859-2) charset. Why not use Unicode for everything? Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't

Re: Unicode drives me crazy...

2005-07-04 Thread Fuzzyman
[EMAIL PROTECTED] wrote: Hi ! I want to get the WMI infos from Windows machines. I use Py from HU (iso-8859-2) charset. Then I wrote some utility for it, because I want to write it to an XML file. def ToHU(s,NoneStr='-'): if s==None: s=NoneStr if not (type(s) in

Re: Unicode drives me crazy...

2005-07-04 Thread Fuzzyman
At some point you have to convert - esp. when writing data out to file. If you receive data as a byte string and have to store it as a byte string, it is sometimes convenient to *not* convert in the middle. Best Regards, Fuzzy http://www.voidspace.org.uk/python --

trace function calls to get signatures

2005-07-04 Thread harold fellermann
Hi all, I am trying to write a script that prints out the signatures of each function call that occurs during the execution of a second script which is invoked by my program. i.e. if the inspected program is 'foo.py': def bar(x,y,z=None) : pass bar(1,a,bar) bar(2,int)

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 29)

2005-07-04 Thread TZOTZIOY
On Sun, 03 Jul 2005 08:59:30 +1000, rumours say that John Machin [EMAIL PROTECTED] might have written: Neutral: no, they always seem to be active combatants. Neuter: one would hope so, lest they procreate. Thanks for the correction. The first line of my sig is not completely humourous, I

Re: Will Guido's Python Regrets ever get implemented/fixed?

2005-07-04 Thread John Roth
Peter Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] George Sakkis schrieb: Given that the latest 2.x python will be 2.9 Why not 2.13 or 2.4711? Version strings are sequences of arbitrary integers separated by dots and not decimal numbers, or are they? Because Guido said

Re: f*cking re module

2005-07-04 Thread George Sakkis
jwaixs [EMAIL PROTECTED] wrote: Thank you for your replies, it's much obvious now. I know more what I can and can't do with the re module. But is it possible to search for more than one string in the same line? bv. I want to replace the python with /python with \n and every thing that's

Re: OT: ^ in redirection (windows)

2005-07-04 Thread Duncan Booth
Miki Tebeka wrote: Can someone explain me the difference between: echo 1 1.txt 21 and echo 1 1.txt 2^1 (Windows XP cmd shell) Both produce 1.txt with the content 1. (Sadly, I don't know how to search for ^ in google). The first of these joins stderr to stdout, but since

Re: Unicode drives me crazy...

2005-07-04 Thread John Roth
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi ! I want to get the WMI infos from Windows machines. I use Py from HU (iso-8859-2) charset. Then I wrote some utility for it, because I want to write it to an XML file. def ToHU(s,NoneStr='-'): if s==None: s=NoneStr if

Re: Debugging embedded python

2005-07-04 Thread Miki Tebeka
Hello Fotis, I linked it to python24.lib (under eclipse cdt/win2k) and it compiles, links and runs fine. The problem is when I try to debug it (gdb). I cannot go single stepping into the code, more than one threads seem to be running, I get messages like No source file named

Obtaining glyph width in Python

2005-07-04 Thread Charlie
Hi, I'm looking for a way to obtain the width of a string, either in actual inches/centimeters, or pixels will also work. Unfortunately this seems difficult as I'd like to keep things as close to the stock Python install as possible, and I'm not working with Graphics or X at all. Here are the

Re: Connecting to Firebird database using Kinterbasdb+Python

2005-07-04 Thread Mathias Waack
Maurice LING wrote: I've been using FB1.5 and access the database using Kinterbasdb + Python. My connection is established using kinterbasdb.connect() method and the parameters host, dns, database, user, password are all defaulted to 'None'. On my own machine running Mac OSX 10.3, I can

Re: Debugging embedded python

2005-07-04 Thread fotis
Thank's a lot miki for your response! It seems that this problem is now solved, yet a new one now occured. And the name of my new problem is... Stack is not available: Cannot access memory at address 0x1. Let me rewrite the code a little bit more clearly...

Re: Obtaining glyph width in Python

2005-07-04 Thread Andreas Lobinger
Aloha, Charlie wrote: Hi, I'm looking for a way to obtain the width of a string, either in actual inches/centimeters, or pixels will also work. Unfortunately this seems difficult as I'd like to keep things as close to the stock Python install as possible, and I'm not working with Graphics or

Where can I get the new version of python-mode for emacs?

2005-07-04 Thread Marcio Rosa da Silva
Hi all, My first try on using RST to write an email. so I can (will) make mistakes :-) I am experiencing the problem shown in this thread_ of the `python-mode`_ discussion list hosted at SourceForge. .. _thread: https://sourceforge.net/tracker/?func=detailatid=581349aid=1215039group_id=86916

importing pyc from memory?

2005-07-04 Thread Derek van Vliet
Using the Python/C API, is there a way I can import a pyc file that I have in memory (as opposed to loading from disk)? I'm trying to save compiled python code in a proprietary file format to cut reduce the overhead of compiling all my scripts when my app starts up. Derek --

Re: Outlook COM: how to create a MailItem from a .msg file

2005-07-04 Thread Guy Lateur
Thanks for the tip, Simon, but unfortunately it doesn't work; it says The interface name 'MailItem' does not appear in the same library as object 'win32com.gen_py.Microsoft Outlook 11.0 Object Library._DocumentItem instance at 0x29912600 Anything else I could try? Cheers, g Simon Brunning

Re: python project layout

2005-07-04 Thread Peter Hansen
Huron wrote: Hi Peter, Thanks for you detailed reply. The layout that you suggest sounds wise to me (I'm about to start a project). I wouldn't necessarily recommend something so complex (not that it's particular complex, but it's more than just flat) for a newcomer, however. One of the few

Re: Determining actual elapsed (wall-clock) time

2005-07-04 Thread Peter Hansen
Coates, Steve (ACHE) wrote: There is already an NTP client in the ASPN cookbook :- http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/117211 Thanks Steve. As it turns out, Windows XP already has support (via NTP I presume, though of course since this is Microsoft they try to keep the

Re: curses -- getxy() error

2005-07-04 Thread shablool
Thanks! (silly me) [EMAIL PROTECTED] wrote: shablool wrote: Could someone please explain why stdscr.getxy() always raise an exception: [code here] the method is named getyx(), this is old unix heritage. see http://www.python.org/doc/2.0.1/lib/curses-window-objects.html --

Re: Determining actual elapsed (wall-clock) time

2005-07-04 Thread Roy Smith
Peter Hansen [EMAIL PROTECTED] wrote: As it turns out, Windows XP already has support (via NTP I presume, though of course since this is Microsoft they try to keep the user base ignorant by making no mention of that even in the help page) for keeping the clock accurate, right on the last

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-04 Thread Tom Anderson
On Sun, 3 Jul 2005, Robert Kern wrote: Erik Max Francis wrote: Ron Adam wrote: So you are saying that anything that has a 1% use case should be included as a builtin function? I think I can find a few hundred other functions in the library that are used more than ten times as often as

Re: When someone from Britain speaks, Americans hear a British accent...

2005-07-04 Thread Nick Efford
Grant Edwards [EMAIL PROTECTED] wrote: I'm an American who grew up watching plenty of BBC, and I run into afew native Londoners whom I have hard time understanding. I don't ever remember having troubly understanding people outside the city. But have you encountered regional dialects? - e.g.

Re: Accepted Summer of Code proposals

2005-07-04 Thread A.M. Kuchling
On Fri, 1 Jul 2005 14:22:51 -0400, Terry Reedy [EMAIL PROTECTED] wrote: Thanks for posting this and thanks for coordinating the PSF effort. I did little beyond writing up that wiki page. David Ascher has been the primary coordinator for the PSF. --amk --

Re: curses -- getxy() error

2005-07-04 Thread Peter Hansen
shablool wrote: Hi, Could someone please explain why stdscr.getxy() always raise an exception: If you post the exception traceback here (the whole thing, cut and pasted from your terminal window), we can show you how to analyze it to determine for yourself exactly what the problem is. This

Re: math.nroot [was Re: A brief question.]

2005-07-04 Thread Tom Anderson
On Sun, 3 Jul 2005, Dennis Lee Bieber wrote: On Sun, 3 Jul 2005 20:53:22 +0100, Tom Anderson [EMAIL PROTECTED] declaimed the following in comp.lang.python: 2 -1 Evaluates to -1? But what do you expect, say 2 -X to evaluate as? (-X)^2 or -(X^2) I'd expect the

Re: math.nroot [was Re: A brief question.]

2005-07-04 Thread Tom Anderson
On Sun, 3 Jul 2005, Tim Peters wrote: [Tom Anderson] So, is there a way of generating and testing for infinities and NaNs that's portable across platforms and versions of python? Not that I know of, and certainly no simple way. If not, could we perhaps have some constants in the math

Re: OT: ^ in redirection (windows)

2005-07-04 Thread Bengt Richter
On 4 Jul 2005 13:07:02 GMT, Duncan Booth [EMAIL PROTECTED] wrote: Miki Tebeka wrote: Can someone explain me the difference between: echo 1 1.txt 21 and echo 1 1.txt 2^1 (Windows XP cmd shell) Both produce 1.txt with the content 1. (Sadly, I don't know how to search for ^

wxPy + Py2Exe + sys.argv[0]

2005-07-04 Thread [EMAIL PROTECTED]
Hi ! I have been finished my WMI information getter simple application, but the exe is not working as like the py modules before compilation. The problem that when I started the program from CMD, the sys.argv is show the good path (in my machine the c:\dev\...) from Dialog1.py. But when I

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-04 Thread Peter Hansen
Terry Hancock wrote: On Sunday 03 July 2005 07:05 pm, Erik Max Francis wrote: I personally think that map looks clearer than a list comprehension for a simple function call This on the other hand, [str(x) for x in sequence] is practically plain English: call the function str on x,

missing cephes module

2005-07-04 Thread Justin
Hi All: When I used py2exe to create executable file, "cephes" module missingerror occurred.I have installed python 2.3 and scientific and numeric python.Can anybody suggest me how to resolve the problem? Justin Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile

Re: Where can I get the new version of python-mode for emacs?

2005-07-04 Thread Skip Montanaro
Marcio I have version 4.70 installed in my debian system (installed Marcio with apt-get, so I don't know where the sources are from). After Marcio reading the thread_ at sourceforge, I did a google search for Marcio python emacs and found the `Emacs goodies`_ page at python.org

Re: curses -- getxy() error

2005-07-04 Thread [EMAIL PROTECTED]
Peter Hansen wrote: post the exception traceback here[...], we can show you how to analyze it to determine for yourself exactly what the problem is true, remember that for the future. and that goes to everybody asking questions here. thing is, I've done enough curses programming (in both Python

Re: OT: ^ in redirection (windows)

2005-07-04 Thread Duncan Booth
Bengt Richter wrote: You'd think ^ would be mentioned in http://www.microsoft.com/resources/documentation/windows/xp/all/pro ddocs/en-us/redirection.mspx but it seems not to be. You mean you didn't think to look at

Re: python project layout

2005-07-04 Thread Huron
A concrete example would probably help. What are you envisioning? Let say you have an interface (zope.interface) IMyProduct and two classes implementing the interface MyProduct1 and MyProduct2 ... But I think I found the answer. One file each. Python is just more

Re: What are the other options against Zope?

2005-07-04 Thread phil
It's an object oriented database, with a structure that is similar to files and directories in an ordinary OS. But it is a lot smarter, because the files and directories are actually objects with different attributes and parameters. The methods on these objects can then be called eg.

Re: unittest: collecting tests from many modules?

2005-07-04 Thread Jorgen Grahn
On 12 Jun 2005 10:14:50 GMT, Jorgen Grahn [EMAIL PROTECTED] wrote: [regarding module unittest] What's the best way of creating a test.py which - aggregates the tests from all the test_*.py modules? - doesn't require me to enumerate all the test classes in test.py (forcing each module to

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-04 Thread George Sakkis
Tom Anderson [EMAIL PROTECTED] wrote: I'll just chip in and say i'd quite like a flatten(), too; at the moment, i have one like this: def flatten(ll): return reduce(lambda a, l: a.extend(l), ll, []) This doesn't work; a.extend() returns None, not the extended list a: seq =

Re: How do you program in Python?

2005-07-04 Thread bruno modulix
Roy Smith wrote: bruno modulix [EMAIL PROTECTED] wrote: Try Emacs + python-mode. Emacs surely has a lot of warts, but I'm still looking for a better and more versatile code editor/IDE - specially when it comes to languages with REPL (- Read-Eval-Print Loop). When you build Python, make

Re: noob question

2005-07-04 Thread Jorgen Grahn
On Sun, 26 Jun 2005 03:36:58 -0400, Chinook [EMAIL PROTECTED] wrote: ... Here is something I copied from somewhere (someone else might know the source): Summary of Naming Conventions ... Hope it does not come out too jumbled, It did, but it seemed so useful that I repost it with minor

Re: A question for profile

2005-07-04 Thread slchen
Sorry~~ I found the problem~~ There is an error profile.pyc in the same folder. some it execute error. thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: missing cephes module

2005-07-04 Thread Robert Kern
Justin wrote: Hi All: When I used py2exe to create executable file, cephes module missing error occurred. I have installed python 2.3 and scientific and numeric python. Can anybody suggest me how to resolve the problem? Did you try what I suggested the last time you posted this

Re: Will Guido's Python Regrets ever get implemented/fixed?

2005-07-04 Thread Rocco Moretti
John Roth wrote: Peter Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] George Sakkis schrieb: Given that the latest 2.x python will be 2.9 Why not 2.13 or 2.4711? Version strings are sequences of arbitrary integers separated by dots and not decimal numbers, or are they?

Re: importing pyc from memory?

2005-07-04 Thread Sybren Stuvel
Derek van Vliet enlightened us with: I'm trying to save compiled python code in a proprietary file format to cut reduce the overhead of compiling all my scripts when my app starts up. Why is that faster than having the .pyc files ready on your filesystem? And why do you want it in a

  1   2   >