Re: calendar (date) iterator?

2007-03-06 Thread Marcus
On Mar 6, 3:19 pm, [EMAIL PROTECTED] wrote: > Marcus> I'm looking for useful starting points, suggestions, and sample > Marcus> code, to implement a calendar iterator. > > Have you looked at dateutil? > >http://labix.org/python-dateutil > > >>> from dateutil.rrule import rrule, DAIL

Re: SPE python IDE: Call for testers!

2007-03-06 Thread MonkeeSage
Very nice. One issue I've come across is that it doesn't seem to work with < wxwidgets-2.8 (segfault when trying to load a file), so you should probably set MIN_WX_VERSION to 2.8. Regards, Jordan -- http://mail.python.org/mailman/listinfo/python-list

Re: When will 2.5.1 be released?

2007-03-06 Thread Nile
On Mar 6, 1:12 pm, "A. Lloyd Flanagan" <[EMAIL PROTECTED]> wrote: > On Mar 4, 2:49 pm, "Nile" <[EMAIL PROTECTED]> wrote: > > > This is not a big deal but I would like to use Tix with 2.5. My > > understanding is this bug will be fixed in the 2.5.1 release. Does > > And while we're waiting for 2.5.

Re: calendar (date) iterator?

2007-03-06 Thread Raymond Hettinger
[Marcus] > I'm looking for useful starting points, suggestions, and sample code, > to implement a calendar iterator. Simply, the iterator is seeded with > an initial calendar date, e.g., "03-12-2006", and then subsequent > calls to next return subsequent dates. The seed could be a standard > cale

Re: Project organization and import

2007-03-06 Thread Jorge Godoy
"Martin Unsal" <[EMAIL PROTECTED]> writes: > On Mar 6, 9:19 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: >> You do? Or do you only have trouble because you don't like using "from >> foo import Foo" because you need to do more work to reload such an >> import? > > More work, like rewriting __impor

Re: Descriptor/Decorator challenge

2007-03-06 Thread Raymond Hettinger
[George Sakkis] > What would the semantics be if m is decorated as local only in A or > only in B ? The goal is to as closely as possible emulate the sematics of under- under name mangling. Raymond -- http://mail.python.org/mailman/listinfo/python-list

is it possible to give an instance a value?

2007-03-06 Thread manstey
Hi, My question probably reflects my misunderstanding of python objects, but I would still like to know the answer. The question is, is it possible for an instnace to have a value (say a string, or integer) that can interact with other datatypes and be passed as an argument? The following code o

Re: Project organization and import

2007-03-06 Thread Jorge Godoy
[EMAIL PROTECTED] (Alex Martelli) writes: > Not sure I get what you mean; when I write tests, just as when I write > production code, I'm focused (not worried:-) about the application semantics... ;-) Thanks for the correction. > functionality I'm supposed to deliver. The language mostly "get

Re: using python to query active directory

2007-03-06 Thread David Bear
jay graves wrote: > On Mar 6, 1:34 pm, David Bear <[EMAIL PROTECTED]> wrote: >> Is it possible to use python to make calls agains microsoft active >> directory? I suppose this should be qualified by what is needed to do it >> from windows (I assume the win32all package) and from linux (if >> possi

Re: Project organization and import

2007-03-06 Thread [EMAIL PROTECTED]
On Mar 6, 12:49 pm, "Martin Unsal" <[EMAIL PROTECTED]> wrote: > On Mar 6, 9:19 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > You do? Or do you only have trouble because you don't like using "from > > foo import Foo" because you need to do more work to reload such an > > import? > > More work,

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread bearophileHUGS
Alex Li: > Now, I am sure we will redo it in C# after my "prototype"; Sadly this happens often, they don't want to keep using two languages when one may suffice. On the other hand, you may even find a way to adapt your Python code to IronPython, so maybe you can avoid the translation to C#. Bye,

Re: Project organization and import

2007-03-06 Thread [EMAIL PROTECTED]
On Mar 6, 4:58 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > "Martin Unsal" <[EMAIL PROTECTED]> writes: > > I think you should be asking yourselves, "Did we all abandon reload() > > because it is actually an inferior workflow, or just because it's > > totally broken in Python?" > > I never "abandoned

Re: is it possible to give an instance a value?

2007-03-06 Thread Terry Reedy
"manstey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi, | | My question probably reflects my misunderstanding of python objects, | but I would still like to know the answer. | | The question is, is it possible for an instnace to have a value (say a | string, or integer) that c

Re: is it possible to give an instance a value?

2007-03-06 Thread Bruno Desthuilliers
manstey a écrit : > Hi, > > My question probably reflects my misunderstanding of python objects, > but I would still like to know the answer. > > The question is, is it possible for an instnace to have a value (say a > string, or integer) that can interact with other datatypes and be > passed as

Re: is it possible to give an instance a value?

2007-03-06 Thread fumanchu
On Mar 6, 2:45 pm, "manstey" <[EMAIL PROTECTED]> wrote: > The question is, is it possible for an instance to have a value (say a > string, or integer) that can interact with other datatypes and be > passed as an argument? > > The following code of course gives an error: > > class Test(object): >

Re: Interface Implementation in Python

2007-03-06 Thread p_shakil
On Mar 6, 11:55 am, "Goldfish" <[EMAIL PROTECTED]> wrote: > > > I would like to know the interface concept in Python.How the > > > Interface is defined and implemented in Python?. > > One way I have implemented interfaces, is as follows: > > class MyInterface(object): > def someMethod(self, ar

Re: Interface Implementation in Python

2007-03-06 Thread MonkeeSage
On Mar 6, 6:23 pm, [EMAIL PROTECTED] wrote: > I dont want to expose the above Point3D implementation to the user / > client side.To achieve that we can use interface concept.In Python to > use interface concept. In python you would use name mangling to hide parts of the interface from the public.

Re: askstring Window to the top under Windows

2007-03-06 Thread jim-on-linux
On Tuesday 06 March 2007 08:13, iwl wrote: > Hi, > > I tryed askstring to input some text in my > script, but some ugly empty Window appears with > the Input-Window behind and all together behind > my Console showing my script. So all have to > brought to the top first by the user - very > unconfor

Re: When will 2.5.1 be released?

2007-03-06 Thread Waldemar Osuch
On Mar 6, 12:12 pm, "A. Lloyd Flanagan" <[EMAIL PROTECTED]> wrote: > On Mar 4, 2:49 pm, "Nile" <[EMAIL PROTECTED]> wrote: > > And while we're waiting for 2.5.1, can somebody post a clear (as > opposed to the one that comes with Tix ;)) explanation of how to > manually install Tix into python 2.5?

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread Alex Li
On Mar 6, 3:20 pm, "Istvan Albert" <[EMAIL PROTECTED]> wrote: > > https://networkx.lanl.gov/wiki/pygraphviz Thanks Albert. I looked into pygraphviz as well but it requires compiling C extension, and there is no Windows compilation instruction (though it probably won't be hard). -- http://mail.p

Re: Squisher -- a lightweight, self-contained alternative to eggs?

2007-03-06 Thread Adam Atlas
I updated it. http://adamatlas.org/2007/03/Squisher-0.2.py New Things: - It supports C extensions within squished packages. - It supports including squished packages within other squished packages. (That is, you can have a package that includes a .pyc generated by this, and turn that whole package

Re: is it possible to give an instance a value?

2007-03-06 Thread Steven D'Aprano
On Tue, 06 Mar 2007 14:45:45 -0800, manstey wrote: > class Test(object): > def __init__(self, val): >self.val = val > a = Test('hello') a.val + ' happy' > 'hello happy' a + 'happy' > TypeError: unsupported operand type(s) for +: 'Test' and 'str' > > Is there a wa

arenable in Python

2007-03-06 Thread Alan Isaac
Is the functionality of arenable http://sourceforge.net/projects/arenable/ available as a Python project? (It enables commenting features in Reader.) I am assuming the legitimacy of the arenable project. Correct me if I am wrong. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/py

re-point mod_python - is it possible?

2007-03-06 Thread leland
i've upgraded my RHEL3 box to run python 2.3. problem is, mod_python still points to the old python 2.2. is there any way to tell mod_python that i've got a new version of python installed, and to use that version now? any help would be great - thanks! -- http://mail.python.org/mailman/listinfo/

Re: is it possible to give an instance a value?

2007-03-06 Thread Subscriber123
In answer to this part of your question, how to make this work: Person.Address 'Sydney' >>>Person.Address.type '%String' >>>Person.Address = 'Canberra' >>>print Person.Address. Person.Address.type Canberra %String try using the __getattr__ method of the class: class objWithTypeAttr(object)

Direct memory access

2007-03-06 Thread Collin Stocks
Does anyone know how to directly handle memory using python? I want to be able, for example, to copy the actual contents of a memory address, or set the actual contents of a memory address. Here is an example of what I would like to be able to do: num=12 addr=id(num) contents=(hex(addr)).read(2)

Re: image processing

2007-03-06 Thread Gabriel Genellina
En Tue, 06 Mar 2007 10:16:21 -0300, edurand <[EMAIL PROTECTED]> escribió: > On Mar 6, 9:57 am, Paul Rubin wrote: >> "edurand" <[EMAIL PROTECTED]> writes: >> > Have a look at :http://filters.sourceforge.net/ > It's a DLL, so yes, it run on Windows. > If someone would

Re: re-point mod_python - is it possible?

2007-03-06 Thread Graham . Dumpleton
On Mar 7, 3:08 pm, "leland" <[EMAIL PROTECTED]> wrote: > i've upgraded my RHEL3 box to run python 2.3. problem is, mod_python > still points to the old python 2.2. is there any way to tell > mod_python that i've got a new version of python installed, and > to use that version now? > > any help woul

How to check whether file is open or not

2007-03-06 Thread Ros
There are 10 files in the folder. I wish to process all the files one by one. But if the files are open or some processing is going on them then I do not want to disturb that process. In that case I would ignore processing that particular file and move to next file. How can I check whether the fil

Re: This web site creates a *popup window* => how fetch contents in a script?

2007-03-06 Thread Gabriel Genellina
En Tue, 06 Mar 2007 17:02:00 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On Mar 5, 10:38 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Tue, 06 Mar 2007 03:18:23 -0300, [EMAIL PROTECTED] >> <[EMAIL PROTECTED]> escribió: >> >> > The following web page puts a report in a *

Re: This web site creates a *popup window* => how fetch contents in a script?

2007-03-06 Thread Paul Rubin
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > - same as above, but using a protocol sniffer to record the HTTP > requests/responses. This may be needed if HTTP POST is used instead. Usually studying the originating page is enough, or at worst use a client side proxy to log the http session. A

Re: How to Read Bytes from a file

2007-03-06 Thread Gabriel Genellina
En Tue, 06 Mar 2007 17:07:45 -0300, Matthias Julius <[EMAIL PROTECTED]> escribió: > "Gabriel Genellina" <[EMAIL PROTECTED]> writes: > >> Dictionary access is highly optimized in Python. In fact, using a >> precomputed dictionary is about 12 times faster: > > Why using a dictionary and not a list

Re: Project organization and import

2007-03-06 Thread Terry Hancock
Martin Unsal wrote: > I'm using Python for what is becoming a sizeable project and I'm > already running into problems organizing code and importing packages. > I feel like the Python package system, in particular the isomorphism > between filesystem and namespace, doesn't seem very well suited for

Recommended FastCGI module?

2007-03-06 Thread John Nagle
What's the recommended FastCGI module for Python. There are at least five: The Robin Dunn / Total Control Software version: http://alldunn.com/python/fcgi.py Last revised in 1998. The "JonPy" version: http://jonpy.sourceforge.net/fcgi.html Last

Re: Is every number in a list in a range?

2007-03-06 Thread Hendrik van Rooyen
"Steven D'Aprano" wrote: 8< --- some code with heavy reliance on Booleans and 'is' --- All Right. This has convinced me. Some Australians do have a sense of humour. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong exist status for os.system, os.poepen, etc.

2007-03-06 Thread Hendrik van Rooyen
"Paolo Pantaleo" <[EMAIL PROTECTED]> wrote: > $./x > $echo $? > 20 > > $ python > > give the following commands: > > >>> import os > >>> os.system("/tmp/x") > 5120 > 256 times 20 is 5120 this is a big/little endian little bug - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread Ian Parker
In message <[EMAIL PROTECTED]>, Alex Li <[EMAIL PROTECTED]> writes >Thanks Michel, I will give it a try. > >Alex > > > You could simply generate the .dot files from python and do os.startfile on the dot file (which is what I do because it is remarkably easy!) Regards -- Ian Parker -- http://m

Re: Wrong exist status for os.system, os.poepen, etc.

2007-03-06 Thread Gabriel Genellina
En Wed, 07 Mar 2007 02:50:59 -0300, Hendrik van Rooyen <[EMAIL PROTECTED]> escribió: > "Paolo Pantaleo" <[EMAIL PROTECTED]> wrote: >> >>> import os >> >>> os.system("/tmp/x") >> 5120 >> > 256 times 20 is 5120 > this is a big/little endian little bug No, it's the old "RTFM" one. -- Gabriel Gen

Re: Project organization and import

2007-03-06 Thread Michele Simionato
On Mar 5, 1:21 am, "Martin Unsal" <[EMAIL PROTECTED]> wrote: > 2) Importing and reloading. I want to be able to reload changes > without exiting the interpreter. What about this? $ cat reload_obj.py """ Reload a function or a class from the filesystem. For instance, suppose you have a module $

<    1   2