FrOSCon 2006 - Call for Papers

2006-01-16 Thread M.-A. Lemburg
I'm sending this on behalf of Sebastian Bergmann, one of the organizers of FrOSCon: Hello, The first Free and Open Source Conference FrOSCon takes place on 24th and 25th June 2006 in St. Augustin, near Bonn, Germany, Organized by a committed team, it aims to become a significant event for

Re: Ann: pywinauto 0.1.1 (initial release) released

2006-01-16 Thread Mark Mc Mahon
The 2nd release of pywinauto is now available. Download it from the Files section of SourceForge for the project: https://sourceforge.net/project/showfiles.php?group_id=157379 Relevant Changes: * Updated Readme (original readme was incorrect) * Added clipboard module * Fixed DrawOutline part

Re: ConfigParser: writes a list but reads a string?

2006-01-16 Thread Sybren Stuvel
Terry Carroll enlightened us with: It looks like ConfigParser will accept a list to be writing to the *.ini file; but when reading it back in, it treats it as a string. It doesn't say so explicitly in the manual, but I did find this: The values in defaults must be appropriate for the %()s

Re: What is the method for class destroy

2006-01-16 Thread Fredrik Lundh
K Satish wrote: Like __init__ which is called when object instatiated, what is the method when object destroys. __del__ see http://docs.python.org/ref/customization.html (and make sure you read the note and the warning carefully) /F --

trap the Newwindow2 event on wxPython with IE ActiveX

2006-01-16 Thread oyster
Hi, everyone. I work on windows os and want to write a IE based webbrowser. For I find that the only method which can handle most of the HTML standard is to embed IE object, I want to change demo\wxIEHtmlWin.py (from old wxPython) into a kind of multi-tab webbrowser( like greenbrowser, maxthon).

Re: Why keep identity-based equality comparison?

2006-01-16 Thread Antoon Pardon
Op 2006-01-14, Mike Meyer schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] writes: If you want to argue that the builtin sets should do that, you can - but that's unrelated to the question of how the comparison operators behave for the rest of the bulitin types. What I argue is

Arithmetic sequences in Python

2006-01-16 Thread Gregory Petrosyan
Please visit http://www.python.org/peps/pep-0204.html first. As you can see, PEP 204 was rejected, mostly because of not-so-obvious syntax. But IMO the idea behind this pep is very nice. So, maybe there's a reason to adopt slightly modified Haskell's syntax? Something like [1,3..10] --

Re: instance attributes not inherited?

2006-01-16 Thread Xavier Morel
John M. Gabriele wrote: I'm having a hard time finding the documentation to the super() function. I checked the language reference ( http://docs.python.org/ref/ref.html ) but didn't find it. Can someone please point me to the relevant docs on super? help( super ) doesn't give much info at

FrOSCon 2006 - Call for Papers

2006-01-16 Thread M.-A. Lemburg
I'm sending this on behalf of Sebastian Bergmann, one of the organizers of FrOSCon: Hello, The first Free and Open Source Conference FrOSCon takes place on 24th and 25th June 2006 in St. Augustin, near Bonn, Germany, Organized by a committed team, it aims to become a significant event for

Re: Getting better traceback info on exec and execfile - introspection?

2006-01-16 Thread R. Bernstein
Fernando Perez [EMAIL PROTECTED] writes: So any regexp-matching based approach here is likely to be fairly brittle, unless you restrict your tool to the standard python interpreter, and you get some guarantee that it will always tag interactive code with 'string'. Meant to mention for what

Re: ConfigParser: writes a list but reads a string?

2006-01-16 Thread Fuzzyman
ConfigObj will read and write list values. You get all sorts of other advantages as well (nested subsections to any depth), and the resulting code will be much simpler. from configobj import ConfigObj cfgfile = cfgtest.ini cfg = ConfigObj(cfgfile) t1 = range(1,11) # no *need* to create a

Re: Arithmetic sequences in Python

2006-01-16 Thread Bas
I like the use of the colon as in the PEP better: it is consistant with the slice notation and also with the colon operator in Matlab. I like the general idea and I would probably use it a lot if available, but the functionality is already there with range and irange. Bas --

Re: New Python.org website ?

2006-01-16 Thread Tim Parkin
JW wrote: On Sun, 15 Jan 2006 22:19:37 +, Tim Parkin wrote: http://pyyaml.org/downloads/masterhtml/ Feedback appreciated ... Many thanks Again, with FF 1.0.7 (on FC4 Linux BTW), the left column no longer violates the right. However, ViewPage Stylelarge text makes the button

Re: Is 'everything' a refrence or isn't it?

2006-01-16 Thread Antoon Pardon
Op 2006-01-15, Steven D'Aprano schreef [EMAIL PROTECTED]: On Sun, 15 Jan 2006 12:14:16 +0100, Fredrik Lundh wrote: Do two instances of Empty have the same value, or is the question meaningless? Things are a bit mixed up wrt. old-style classes (because they're implemented in terms of true

Re: Is 'everything' a refrence or isn't it?

2006-01-16 Thread Antoon Pardon
Op 2006-01-14, Steven D'Aprano schreef [EMAIL PROTECTED]: On Sat, 14 Jan 2006 14:14:01 +, Antoon Pardon wrote: On 2006-01-14, Steven D'Aprano [EMAIL PROTECTED] wrote: On Thu, 12 Jan 2006 16:11:53 -0800, rurpy wrote: It would help if you or someone would answer these five questions (with

Re: Arithmetic sequences in Python

2006-01-16 Thread Paul Rubin
Gregory Petrosyan [EMAIL PROTECTED] writes: As you can see, PEP 204 was rejected, mostly because of not-so-obvious syntax. But IMO the idea behind this pep is very nice. So, maybe there's a reason to adopt slightly modified Haskell's syntax? I like this with some issues: Python loops tend to

Re: Arithmetic sequences in Python

2006-01-16 Thread Gregory Petrosyan
_Consistentsy_ is what BDFL rejects, if I understand pep right. As for me, it's not too god to have similar syntax for really different tasks. And [1:10] is really not obvious, while [1..10] is. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is 'everything' a refrence or isn't it?

2006-01-16 Thread Antoon Pardon
Op 2006-01-14, Mike Meyer schreef [EMAIL PROTECTED]: Paul Rubin http://[EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] writes: Whether the '==' operation conforms to your idea of what equality means is unclear. Care to say what it does mean, then? I'd say a==b doesn't necessarily

Re: Is 'everything' a refrence or isn't it?

2006-01-16 Thread Antoon Pardon
Op 2006-01-14, Mike Meyer schreef [EMAIL PROTECTED]: Donn Cave [EMAIL PROTECTED] writes: | 3. If two objects are equal with ==, does that | mean their values are the same? Yes. | 3.0 == 3 | True Evidently the value of 3.0 is the same as the value of 3. And they do. They are two

OT: excellent book on information theory

2006-01-16 Thread Paul Rubin
I came across this while looking up some data compression info today. David J.C. MacKay Information Theory, Inference, and Learning Algorithms Full text online: http://www.inference.phy.cam.ac.uk/mackay/itila/ It's a really excellent book, on the level of SICP but about

Re: XML Writer in wxPython

2006-01-16 Thread Marco Meoni
Could you post an example please? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

how to handle jpg images with Tkinter

2006-01-16 Thread K Satish
Hi,I am not able to load jpg images in photoimage widget. That is showing different different errors. can I findany examples on internet. Thanks, SatishSend instant messages to your online friends http://in.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] pysqlite 2.1.0 released

2006-01-16 Thread Gerhard Häring
Alex Martelli wrote: Gerhard Häring [EMAIL PROTECTED] wrote: ... An optimized shortcut has been enabled to retrieve Unicode strings for non-ASCII data, but bytestrings for non-ASCII text: con.text_factory = sqlite.OptimizedUnicode I assume you mean ASCII text rather than non-ASCII

Re: proposal: another file iterator

2006-01-16 Thread Bengt Richter
On 15 Jan 2006 18:58:53 -0800, Paul Rubin http://[EMAIL PROTECTED] wrote: Jean-Paul Calderone [EMAIL PROTECTED] writes: Which is only very slightly longer than your version. I would like it even more if iter() had been written with the impending doom of lambda in mind, so that this would

Class __init__ trouble

2006-01-16 Thread SkyRanger
I create class: FOClassName:= PyString_FromString(ClasName); FClass:= PyClass_New(nil, FDict, FOClassName); PyDict_SetItemString(FDict, ClasName, FClass); Py_DECREF(FOClassName); Py_DECREF(FDict); Py_DECREF(FClass); Add methods for it: MyFunc:=PyCFunction_New(MyMethod, nil);

Re: instance attributes not inherited?

2006-01-16 Thread Bengt Richter
On Sun, 15 Jan 2006 20:37:36 -0500, John M. Gabriele [EMAIL PROTECTED] wrote: David Hirschfield wrote: Nothing's wrong with python's oop inheritance, you just need to know that the parent class' __init__ is not automatically called from a subclass' __init__. Just change your code to do that

strange (and orrible) behavior in gtk.CellRendererCombo using pygtk

2006-01-16 Thread _v_tiziano
Hi folks! I notice a strange (and orrible) behavior in gtk.CellRendererCombo. My code work trapping the 'edited' signal to store in a temporary buffer before the save all operation (by clicking a save-button). The is that gtk.CellRendererCombo (unlike gtk.CellRendererEntry, and others...) dont

Re: Preventing class methods from being defined

2006-01-16 Thread Steven D'Aprano
On Sun, 15 Jan 2006 18:41:02 -0800, David Hirschfield wrote: Here's a strange concept that I don't really know how to implement, but I suspect can be implemented via descriptors or metaclasses somehow: I want a class that, when instantiated, only defines certain methods if a global

Posting examples with tabs

2006-01-16 Thread Duncan Booth
Bengt Richter wrote: Nit: Someone is posting with source using tabs Which reminds me: can anyone tell me how to configure idle so that the shell has tabs disabled by default? The editor defaults to not using tabs, and I can toggle the setting from the options dialog, but the shell has tab

Re: More than you ever wanted to know about objects

2006-01-16 Thread Boris Borcic
Mike Meyer wrote : For even more fun, consider 1.0 == 1 == decimal.Decimal('1.0'). Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type copyright, credits or license() for more information. import decimal 1 == 1.0 == decimal.Decimal('1.0') False

Re: Arithmetic sequences in Python

2006-01-16 Thread Steven D'Aprano
On Mon, 16 Jan 2006 01:01:39 -0800, Gregory Petrosyan wrote: Please visit http://www.python.org/peps/pep-0204.html first. As you can see, PEP 204 was rejected, mostly because of not-so-obvious syntax. But IMO the idea behind this pep is very nice. So, maybe there's a reason to adopt

Re: Is 'everything' a refrence or isn't it?

2006-01-16 Thread Steven D'Aprano
On Mon, 16 Jan 2006 10:34:40 +, Bengt Richter wrote: class A: ... def __getattr__(self, attr): print 'A().%s'%attr; raise AttributeError ... class B: ... def __getattr__(self, attr): print 'B().%s'%attr; raise AttributeError ... A()==B() A().__eq__ B().__eq__

Re: Arithmetic sequences in Python

2006-01-16 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: For finite sequences, your proposal adds nothing new to existing solutions like range and xrange. Oh come on, [5,4,..0] is much easier to read than range(5,-1,-1). The only added feature this proposal introduces is infinite iterators, and they aren't

Socket Programming HOWTO example

2006-01-16 Thread Marco Meoni
Hi. I read the Gordon McMillan's Socket Programming Howto. I tried to use the example in this howto but this doesn't work. The code is class mysocket: '''classe solamente dimostrativa - codificata per chiarezza, non per efficenza''' def __init__(self, sock=None):

Linking to Python for Windows CE

2006-01-16 Thread Martin Evans
I've just been tasked with porting our desktop embedded Python support onto our existing CE offering. I've managed to compile the Python sources and have produced an armdbg420\python23.lib file. When I come to link to the Python library though from our one of our DLLs, I am getting the

Re: More than you ever wanted to know about objects [was: Is everything a refrence or isn't it]

2006-01-16 Thread Boris Borcic
Tim Peters a écrit : [Alex Martelli] ... In mathematics, 1 is not the same as 1.0 -- there exists a natural morphism of integers into reals that _maps_ 1 to 1.0, but they're still NOT the same thing. And similarly for the real-vs-complex case. - but does there exists any sense of

Re: Preventing class methods from being defined

2006-01-16 Thread Dan Sommers
On Mon, 16 Jan 2006 21:25:50 +1100, Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 15 Jan 2006 18:41:02 -0800, David Hirschfield wrote: Here's a strange concept that I don't really know how to implement, but I suspect can be implemented via descriptors or metaclasses somehow: I want a

Re: Arithmetic sequences in Python

2006-01-16 Thread Xavier Morel
Paul Rubin wrote: There's something to be said for that. Should ['a'..'z'] be a list or a string? To me, the most obvious result would be either a range object as a result, or always a list/generator of objects (to stay perfectly consistent). If a range of numbers translate into a list of

Re: Removing a substring from a string

2006-01-16 Thread Peter Hansen
ankit wrote: I am using mainstr.replace(substr, ) but it gives me additional carriage returns which leads to empty spaces as follows: The .replace() method does *not* introduce additional carriage returns (nor newlines/linefeeds, which is probably what you meant). If you think it does, your

Re: Linking to Python for Windows CE

2006-01-16 Thread Martin Evans
Sorry, false alarm. It turned out one of my own files was using fopen/fclose and this was upseting things. After removing those it linked fine. Martin Evans wrote: I've just been tasked with porting our desktop embedded Python support onto our existing CE offering. I've managed to compile

Re: ConfigParser: writes a list but reads a string?

2006-01-16 Thread Frithiof Andreas Jensen
Terry Carroll [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It looks like ConfigParser will accept a list to be writing to the *.ini file; but when reading it back in, it treats it as a string. ConfigParser is nasty because it does not really support type conversions but still

Re: Linking to Python for Windows CE

2006-01-16 Thread Fuzzyman
There are modified Python sources for Windows CE via the sourceforge site : http://sourceforge.net/projects/pythonce There is now a rudimentary website : http://pythonce.sf.net It seems like this project now has traction again. The source has to be 'hacked' quite a bit to compile for Windows

Re: ConfigParser: writes a list but reads a string?

2006-01-16 Thread Fuzzyman
Note that ConfigObj also supports type conversion via the ``validate`` module which comes with it. This validates a config file against an (optional) ``configspec`` which you supply, and does all the conversion. It reports any errors it encounters. Syntax for reading and writing is a standard

Re: Linking to Python for Windows CE

2006-01-16 Thread Fuzzyman
Hmmm... looks like you're already using this. Sorry. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

boost.python on Debian

2006-01-16 Thread Joe bloggs
Can anyone tell me how to get boost.python to work on Debian Sarge? When I try to build the tutorial hello world example bjam reports: /usr/share/doc/libboost-doc/examples/libs/python/example/boost-build.jam attempted to load the build system by invoking 'boost-build

Trying to generate a list of the subclasses of C

2006-01-16 Thread Charles Krug
List: I have this: # classC.py class C(object): pass class D(C): pass class E(C): pass def CSubclasses(): for name in dir(): pass I'm trying to create a list of all of C's subclasses: import classC print C aList = [] for name in dir(classC): print name, try: if

Re: Socket Programming HOWTO example

2006-01-16 Thread Steve Holden
Marco Meoni wrote: Hi. I read the Gordon McMillan's Socket Programming Howto. I tried to use the example in this howto but this doesn't work. The code is class mysocket: '''classe solamente dimostrativa - codificata per chiarezza, non per efficenza''' def

Re: Trying to generate a list of the subclasses of C

2006-01-16 Thread Diez B. Roggisch
The end result I'm after is an automatically generated dictionary containing instaces of the subclasses keyed by the subclass names: {'D':D(), 'E':E(), . . . } I can see the information I need in the module's __dict__ and by using the dir() method, but I'm not having much success

Python and Word

2006-01-16 Thread rodmc
Is there a way to write Word plug-ins in Python? I am using Python 2.3.5 and Word 2000, and need to be able to write a small network application with a basic GUI which can run inside Word. cheers, rod -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python.org website ?

2006-01-16 Thread Tim Chase
The nav styles have crept back in sync with the rest of the site.. ;-) can you check again and tell me if it looks ok (and if not get me another screenie?) Sorry it took so long to get back to you. It looked fine from home, but the originals were snapped back at work (where my configuration

Re: Python and Word

2006-01-16 Thread Tim N. van der Leeuw
rodmc wrote: Is there a way to write Word plug-ins in Python? I am using Python 2.3.5 and Word 2000, and need to be able to write a small network application with a basic GUI which can run inside Word. cheers, rod Hi Rod, Does it really need to be an application which runs inside Word?

Re: Python and Word

2006-01-16 Thread rodmc
Hi Tim, Thanks for replying. It needs to be a small application/plug-in which can visualise data that is either within Word already or which is sent to it via a server on the localhost. The actual GUI will be very simple, for example and image and some buttons. What it actually has to do should

recursively removing files and directories

2006-01-16 Thread rbt
What is the most efficient way to recursively remove files and directories? Currently, I'm using os.walk() to unlink any files present, then I call os.walk() again with the topdown=False option and get rid of diretories with rmdir. This works well, but it seems that there should be a more

Re: Python and Word

2006-01-16 Thread Tim N. van der Leeuw
Hi Rod, If you download and install the 'Python Win' extensions, which I think are linked from from the Python download page for windows, you have a set of COM classes for Python which allow you to do everything you can do in Word from a Python program. It allows a lot of interactive exploration

Re: recursively removing files and directories

2006-01-16 Thread Fuzzyman
shutil.rmtree You might need an ``onerror`` handler to sort out permissions. There is one for just this in pathutils : http://www.voidspace.org.uk/python/pathutils.html All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml --

Re: recursively removing files and directories

2006-01-16 Thread Richie Hindle
[rbt] What is the most efficient way to recursively remove files and directories? shutil.rmtree: http://docs.python.org/lib/module-shutil.html#l2h-2356 -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: recursively removing files and directories

2006-01-16 Thread Tim N. van der Leeuw
Wasn't this the example given in the Python manuals? Recursively deleting files and directories? cheers, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Word

2006-01-16 Thread rodmc
Hi Tim. Thanks for the tips. As for VBA, well I am looking at that as well. Although for architectural reasons elsewhere in the project Python or C++ are the only options. While I could use several languages I am trying where possible to stick to one or at most two. cheers, rod --

Re: boost.python on Debian

2006-01-16 Thread Pierre Barbier de Reuille
Joe bloggs a écrit : Can anyone tell me how to get boost.python to work on Debian Sarge? When I try to build the tutorial hello world example bjam reports: /usr/share/doc/libboost-doc/examples/libs/python/example/boost-build.jam attempted to load the build system by invoking

Re: Trying to generate a list of the subclasses of C

2006-01-16 Thread Pierre Barbier de Reuille
Charles Krug a écrit : List: I have this: # classC.py class C(object): pass class D(C): pass class E(C): pass def CSubclasses(): for name in dir(): pass I'm trying to create a list of all of C's subclasses: import classC print C aList = [] for name in

Extracting results from a large hotshot profile

2006-01-16 Thread Brian Cole
I'm profiling some code that screens a large database. The algorithm efficiency is heavily variable, based upon the different records in the database. In order to get a sense of the best place to start optimizing the code I did a hotshot profile. To make this profile took about a day. However,

Re: Python and Word

2006-01-16 Thread Diez B. Roggisch
rodmc wrote: Hi Tim. Thanks for the tips. As for VBA, well I am looking at that as well. Although for architectural reasons elsewhere in the project Python or C++ are the only options. While I could use several languages I am trying where possible to stick to one or at most two. I

Re: recursively removing files and directories

2006-01-16 Thread rbt
Tim N. van der Leeuw wrote: Wasn't this the example given in the Python manuals? Recursively deleting files and directories? I don't know... I wrote it without consulting anything. Hope I'm not infringing on a patent :) -- http://mail.python.org/mailman/listinfo/python-list

Re: recursively removing files and directories

2006-01-16 Thread rbt
Fuzzyman wrote: shutil.rmtree Many thanks. I'll give that a go! You might need an ``onerror`` handler to sort out permissions. There is one for just this in pathutils : http://www.voidspace.org.uk/python/pathutils.html All the best, Fuzzyman

Re: Arithmetic sequences in Python

2006-01-16 Thread bearophileHUGS
Ranges of letters are quite useful, they are used a lot in Delphi/Ada languages: a, b, c, d, e... I like the syntax [1..n], it looks natural enough to me, but I think the Ruby syntax with ... isn't much natural. To avoid bugs the following two lines must have the same meaning: [1..n-1] [1..(n-1)]

Re: OT: excellent book on information theory

2006-01-16 Thread Grant Edwards
On 2006-01-16, Paul Rubin wrote: I came across this while looking up some data compression info today. David J.C. MacKay Information Theory, Inference, and Learning Algorithms Full text online: http://www.inference.phy.cam.ac.uk/mackay/itila/ It's a really excellent book,

Re: Removing a substring from a string

2006-01-16 Thread Paul Watson
ankit wrote: Hi All, I want to remove a substring from a string without any additional tabs/returns in the output string. Is there any method availaible or how can I do it. For the ease, I am giving an example: [code] mainstr = ${if:isLeaf} Dont include this isLeaf=True ${/if:isLeaf}

Re: On Numbers

2006-01-16 Thread Terry Hancock
On 15 Jan 2006 21:14:33 -0800 Dan Bishop [EMAIL PROTECTED] wrote: although I personally would prefer (number) / \ (realnumber) complex | | | int float | | Decimal Mathematically, real numbers are a subset of complex numbers, though, so the

Re: New Python.org website ?

2006-01-16 Thread Tim Parkin
Tim Chase wrote: The nav styles have crept back in sync with the rest of the site.. ;-) can you check again and tell me if it looks ok (and if not get me another screenie?) Sorry it took so long to get back to you. It looked fine from home, but the originals were snapped back at work

Re: Python and Word

2006-01-16 Thread BartlebyScrivener
How to automate Word http://www.faqts.com/knowledge_base/view.phtml/aid/37034/fid/244 rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting results from a large hotshot profile

2006-01-16 Thread Mike C. Fletcher
Brian Cole wrote: ... I did a hotshot profile. To make this profile took about a day. However, I've been trying to extract results from the profile for the past two days. It's eating up all the memory (2G memory) on the machine and is slowing sucking up the swap space (another 2G). I'm hesitant

Re: Widget that displays a directory tree?

2006-01-16 Thread Christos Georgiou
On Thu, 12 Jan 2006 11:55:46 -0500, rumours say that Edward C. Jones [EMAIL PROTECTED] might have written: Do any of the Python GUIs have a super-high-level widget that displays a directory tree? Most file managers or editors have this type of window. If you have idle installed, you can check

Space left on device

2006-01-16 Thread sir_alex
Is there any function to see how much space is left on a device (such as a usb key)? I'm trying to fill in an mp3 reader in a little script, and this information could be very useful! Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Space left on device

2006-01-16 Thread sir_alex
Is there any function to see how much space is left on a device (such as a usb key)? I'm trying to fill in an mp3 reader in a little script, and this information could be very useful! Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Arithmetic sequences in Python

2006-01-16 Thread Steven D'Aprano
On Mon, 16 Jan 2006 12:51:58 +0100, Xavier Morel wrote: For those who'd need the (0..n-1) behavior, Ruby features something that I find quite elegant (if not perfectly obvious at first), (first..last) provides a range from first to last with both boundaries included, but (first...last)

Re: Python and Word

2006-01-16 Thread Diez B. Roggisch
I guess you will be way easier off writing the GUI-Parts that are embedded in word in VBA. Actually I have difficulties imaging who not to do so. ^^^ Gosh, must be permutation day. That was supposed to be how. Diez --

Re: On Numbers

2006-01-16 Thread Alex Martelli
Terry Hancock [EMAIL PROTECTED] wrote: ... I'm bothered by the fact that int can be coerced into either decimal or float. In practice, you should have to choose one or the other. Practically speaking, Why ever?! You're indicating is a subset of, and int IS a subset of both (net of floats'

Re: Widget that displays a directory tree?

2006-01-16 Thread Claudio Grondi
Christos Georgiou wrote: On Thu, 12 Jan 2006 11:55:46 -0500, rumours say that Edward C. Jones [EMAIL PROTECTED] might have written: Do any of the Python GUIs have a super-high-level widget that displays a directory tree? Most file managers or editors have this type of window. If you

Re: Arithmetic sequences in Python

2006-01-16 Thread Alex Martelli
Paul Rubin http://[EMAIL PROTECTED] wrote: ... while the traditional xrange(f(n)-1, -1, -1) only evaluates it once but is IMO repulsive. Yep, reversed(range(f(n))) is MUCH better. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Arithmetic sequences in Python

2006-01-16 Thread Alex Martelli
Paul Rubin http://[EMAIL PROTECTED] wrote: Steven D'Aprano [EMAIL PROTECTED] writes: For finite sequences, your proposal adds nothing new to existing solutions like range and xrange. Oh come on, [5,4,..0] is much easier to read than range(5,-1,-1). But not easier than reversed(range(6))

Re: Indentation/whitespace

2006-01-16 Thread thakadu
It just has to be consistent within a *single* block. Correct, and therein lies the problem I am describing. If someone has used two spaces and you paste into the SAME block where you are using four spaces you will break your code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to generate a list of the subclasses of C

2006-01-16 Thread Alex Martelli
Charles Krug [EMAIL PROTECTED] wrote: ... I'm trying to create a list of all of C's subclasses: There's a class method for that very purpose: class C(object): pass ... class D(C): pass ... class E(C): pass ... C.__subclasses__() [class '__main__.D', class '__main__.E'] Alex --

Re: Widget that displays a directory tree?

2006-01-16 Thread Fredrik Lundh
Claudio Grondi wrote: Christos Georgiou wrote: On Thu, 12 Jan 2006 11:55:46 -0500, rumours say that Edward C. Jones [EMAIL PROTECTED] might have written: Do any of the Python GUIs have a super-high-level widget that displays a directory tree? Most file managers or editors have this

Re: Space left on device

2006-01-16 Thread rbt
sir_alex wrote: Is there any function to see how much space is left on a device (such as a usb key)? I'm trying to fill in an mp3 reader in a little script, and this information could be very useful! Thanks! On windows with the win32 extensions, you might try this: # Get hard drive info

zipfile decompress problems

2006-01-16 Thread Waguy
Hi all, I am new to python and want to create a process to unzip large numbers of zip files I get from a SOAP application. The files all have a ZIP extention and can be unzipped using WinZip. However when I try opening the files using zlib or zipfile modules I get the following error:

Re: Arithmetic sequences in Python

2006-01-16 Thread Alex Martelli
Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 16 Jan 2006 12:51:58 +0100, Xavier Morel wrote: For those who'd need the (0..n-1) behavior, Ruby features something that I find quite elegant (if not perfectly obvious at first), (first..last) provides a range from first to last with both

Re: Pythonic wrappers for SQL?

2006-01-16 Thread Stian Soiland
On 1/14/06, EleSSaR^ [EMAIL PROTECTED] wrote: Kenneth McDonald si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: there any good libraries out there that let one write (basic) queries in a Pythonic syntax, rather than directly in SQL? You need an ORM. Beyond

Re: Preventing class methods from being defined

2006-01-16 Thread Steven D'Aprano
On Mon, 16 Jan 2006 06:39:48 -0500, Dan Sommers wrote: By the principle of least surprise, if dir(some_sobject) contains foo, then some_object.foo should *not* raise a NameError. Good thinking. Yes, it should raise a different exception. -- Steven. --

Re: Widget that displays a directory tree?

2006-01-16 Thread Claudio Grondi
Fredrik Lundh wrote: Claudio Grondi wrote: Christos Georgiou wrote: On Thu, 12 Jan 2006 11:55:46 -0500, rumours say that Edward C. Jones [EMAIL PROTECTED] might have written: Do any of the Python GUIs have a super-high-level widget that displays a directory tree? Most file managers or

Re: Extracting results from a large hotshot profile

2006-01-16 Thread Brian Cole
Thanks for the tip. I got the following error message when trying to run your profiler. Traceback (most recent call last): File c:\Documents and Settings\coleb2\My Documents\software\Python24\lib\site -packages\wx-2.6-msw-ansi\wx\_core.py, line 13469, in lambda lambda event:

Re: Space left on device

2006-01-16 Thread Jean-Paul Calderone
On 16 Jan 2006 07:52:46 -0800, sir_alex [EMAIL PROTECTED] wrote: Is there any function to see how much space is left on a device (such as a usb key)? I'm trying to fill in an mp3 reader in a little script, and this information could be very useful! Thanks! If you are on a platform with

Re: Trying to generate a list of the subclasses of C

2006-01-16 Thread Duncan Booth
Charles Krug wrote: The end result I'm after is an automatically generated dictionary containing instaces of the subclasses keyed by the subclass names: {'D':D(), 'E':E(), . . . } I can see the information I need in the module's __dict__ and by using the dir() method, but I'm not having

Re: Indentation/whitespace

2006-01-16 Thread Diez B. Roggisch
thakadu wrote: It just has to be consistent within a *single* block. Correct, and therein lies the problem I am describing. If someone has used two spaces and you paste into the SAME block where you are using four spaces you will break your code. And then you invoke your in/dedent block

Re: Arithmetic sequences in Python

2006-01-16 Thread Steven D'Aprano
On Mon, 16 Jan 2006 02:58:39 -0800, Paul Rubin wrote: Steven D'Aprano [EMAIL PROTECTED] writes: For finite sequences, your proposal adds nothing new to existing solutions like range and xrange. Oh come on, [5,4,..0] is much easier to read than range(5,-1,-1). Only in isolation, and

Re: Extracting results from a large hotshot profile

2006-01-16 Thread Mike C. Fletcher
Brian Cole wrote: Thanks for the tip. I got the following error message when trying to run your profiler. ... File c:\Documents and Settings\coleb2\My Documents\software\Python24\Lib\site -packages\runsnakerun\hotshotreader.py, line 95, in loadHotshot localDeltas[depth] = 0

Re: Extracting results from a large hotshot profile

2006-01-16 Thread Brian Cole
Tried replacing sys.getrecursionlimit() with 40,000. Choked with the same error, just took longer to get there. It looks like depth is not reset to zero after the yield: if (not i%yieldCount) and i: yield i, files, functions Should it be? On 1/16/06, Mike C. Fletcher [EMAIL PROTECTED]

Shrinky-dink Python (also, non-Unicode Python build is broken)

2006-01-16 Thread Larry Hastings
I'm an indie shareware Windows game developer. In indie shareware game development, download size is terribly important; conventional wisdom holds that--even today--your download should be 5MB or less. I'd like to use Python in my games. However, python24.dll is 1.86MB, and zips down to 877k.

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-16 Thread skip
Andreas Am Donnerstag, den 05.01.2006, 15:03 -0800 schrieb Andreas [EMAIL PROTECTED]: I know this sounds like brutal, but I've been Andreas developing Python code for a decade now, and I've almost never Andreas used pdb.py. OTOH I also use gdb only for bt from a core Andreas

Re: Arithmetic sequences in Python

2006-01-16 Thread Roy Smith
Alex Martelli [EMAIL PROTECTED] wrote: Agreed. *IF* we truly needed an occasional up to X *INCLUDED* sequence, it should be in a syntax that can't FAIL to be noticed, such as range(X, endincluded=True). How about... for i in (0..x]: blah --

Re: zipfile decompress problems

2006-01-16 Thread Giovanni Bajo
Waguy wrote: import zipfile file = zipfile.ZipFile(c:\\chessy.zip, r) Use rb. -- Giovanni Bajo -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >