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 $

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: 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 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: 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

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: 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

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: 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: 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 *

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: 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

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

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: 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)

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/

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: 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

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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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, 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: 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 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

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: 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

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: 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: 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: 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: 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: Project organization and import

2007-03-06 Thread Ben Finney
"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 reload()", because it never even occurred to me to use the interpr

Re: Getting external IP address

2007-03-06 Thread Steven D'Aprano
On Tue, 06 Mar 2007 14:40:37 -0500, Sergio Correia wrote: > The above suggestions seem nice, but I find this one easier: [snip] Thanks to everybody who replied, that's great. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

Re: Webserver balance load

2007-03-06 Thread sjpiii
"Johny" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can anyone suggest a way how to balance load on Apache server where I > have Python scripts running? > For example I have 3 webservers( Apache servers) and I would like to > sent user's request to one of the three server dependi

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

2007-03-06 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Sure I can grab the aforementioned URL's contents but what about the > NEW contents in the NEW popup window that appears AFTER you press some > form buttons? How grab *that* ? Usually it's from some fixed url with possibly some query parameters. J

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread Istvan Albert
On Mar 6, 3:18 pm, "Istvan Albert" <[EMAIL PROTECTED]> wrote: > try the networkx package, it includes the pygraphviz module that can > generate dot files: > > https://networkx.lanl.gov/wiki should've checked it before posting, it seems nowadays is actually a separate package https://networkx.lan

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread Istvan Albert
On Mar 5, 5:16 pm, "Alex Li" <[EMAIL PROTECTED]> wrote: > I tried to avoid. Any suggestions? try the networkx package, it includes the pygraphviz module that can generate dot files: https://networkx.lanl.gov/wiki Istvan -- http://mail.python.org/mailman/listinfo/python-list

Re: calendar (date) iterator?

2007-03-06 Thread skip
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, DAILY >>> from dateutil.parser import parse >>> r

Re: How to Read Bytes from a file

2007-03-06 Thread Matthias Julius
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > En Fri, 02 Mar 2007 08:22:36 -0300, Bart Ogryczak > <[EMAIL PROTECTED]> escribió: > >> On Mar 1, 7:36 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> >> wrote: >>> Thanks Bart. That's perfect. The other suggestion was to precompute >>> count1 for all

Re: Project organization and import

2007-03-06 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Martin Unsal" <[EMAIL PROTECTED]> wrote: > On Mar 6, 9:34 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > It assumes that util.common is a module thats on the PYTHONPATH. > > Now we're getting somewhere. :) > > > The common way to ensure that this is the case

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

2007-03-06 Thread [EMAIL PROTECTED]
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 *popup window* by clicking > > the "Generate Report" button > > >http://moneycentral.msn.com

Re: using python to query active directory

2007-03-06 Thread jay graves
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 possible). > Any code samples wo

Re: calendar (date) iterator?

2007-03-06 Thread Marcus
Oops-- the iter needs to work better than I do! :) > > iter = calendarIterator("03-12-2006") > > print iter.next() > >03-12-2006 ^^ 03-13-2006 > > iter = calendarIterator("03-12-2006 01:00:00", "minutes") > > print iter.next() > >03-12-2006 01:01:00 ^^

Re: Interface Implementation in Python

2007-03-06 Thread Goldfish
> > 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, argument): raise NotImplementedError() If anybody ever uses tha

calendar (date) iterator?

2007-03-06 Thread Marcus
Hi, 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 calendar/datetime

Re: Project organization and import

2007-03-06 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Martin Unsal" <[EMAIL PROTECTED]> 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 fil

using python to query active directory

2007-03-06 Thread David Bear
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 possible). Any code samples would be great. -- David Bear -- let me buy your intellectual pro

Re: Descriptor/Decorator challenge

2007-03-06 Thread Arnaud Delobelle
On 5 Mar, 18:59, "Arnaud Delobelle" <[EMAIL PROTECTED]> wrote: [snip] > Well in fact I couldn't help but try to improve it a bit. Objects now > don't need a callerclass attribute, instead all necessary info is > stored in a global __callerclass__. Bits that didn't work now do. OK that wasn't reall

Re: Getting external IP address

2007-03-06 Thread Sergio Correia
The above suggestions seem nice, but I find this one easier: import urllib2 ext_ip = urllib2.urlopen('http://whatismyip.org/').read() print ext_ip The nice thing about the above code is that http://whatismyip.org/ only contains exactly what you want (the ip, nothing more, nothing less), so no par

Re: Project organization and import

2007-03-06 Thread Chris Mellon
On 6 Mar 2007 10:58:14 -0800, Martin Unsal <[EMAIL PROTECTED]> wrote: > On Mar 6, 10:13 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > You have to reload the importing module as well as the module that > > changed. That doesn't require rewriting the import infrastructure. > > As far as I can tel

Re: When will 2.5.1 be released?

2007-03-06 Thread A. Lloyd Flanagan
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.1, can somebody post a clear (as opposed to the one that comes with Tix ;)) e

Re: Project organization and import

2007-03-06 Thread Martin Unsal
On Mar 6, 10:13 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > You have to reload the importing module as well as the module that > changed. That doesn't require rewriting the import infrastructure. As far as I can tell, the moment you use "from foo_module import bar", you've broken reload(). Rel

Re: Getting external IP address

2007-03-06 Thread Cousin Stanley
> I have a PC behind a firewall, and I'm trying to programmatically > determine the IP address visible from outside the firewall. > Steven Following is another alternative that might at least be worth consideration I use the lynx command shown as a command-line alias u

Re: Project organization and import

2007-03-06 Thread Chris Mellon
On 6 Mar 2007 10:30:03 -0800, Martin Unsal <[EMAIL PROTECTED]> wrote: > On Mar 6, 9:34 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > It assumes that util.common is a module thats on the PYTHONPATH. > > Now we're getting somewhere. :) > > > The common way to ensure that this is the case is eithe

Re: Project organization and import

2007-03-06 Thread Matthew Woodcraft
Martin Unsal <[EMAIL PROTECTED]> wrote: > We could discuss this till we're blue in the face but it's beside the > point. For any given project, architecture, and workflow, the > developers are going to have a preference for how to organize the > code structurally into files, directories, packages,

Re: Using string as file

2007-03-06 Thread Paddy
On Mar 5, 8:13 pm, Florian Lindner <[EMAIL PROTECTED]> wrote: > Hello, > I have a function from a library thast expects a file object as argument. > How can I manage to give the function a string resp. have the text it would > have written to file object as a string? > > Thanks, > > Florian You ca

Re: Project organization and import

2007-03-06 Thread Martin Unsal
On Mar 6, 9:34 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > It assumes that util.common is a module thats on the PYTHONPATH. Now we're getting somewhere. :) > The common way to ensure that this is the case is either to handle > util as a separate project, and install it into the system > site-

Re: Project organization and import

2007-03-06 Thread Chris Mellon
On 6 Mar 2007 09:49:55 -0800, 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

Re: Project organization and import

2007-03-06 Thread Martin Unsal
On Mar 6, 9:46 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > The only usage I've ever made of "reload()" has been during > interactive debugging: Modify the module, then reload it at the > interactive prompt so I could create an instance of the modified code, > and manually manipulate

Re: Project organization and import

2007-03-06 Thread Martin Unsal
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 __import__ and reload??? :) There's a point where you shou

Re: Project organization and import

2007-03-06 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : >>I'd like to point out something though. More than one of the people >>who responded have implied that I am bringing my prior-language >>mindset to Python, even suggesting that my brain isn't built for >>Python. ;) In fact I think it's the other way around. I am struggli

Re: askstring Window to the top under Windows

2007-03-06 Thread Jussi Salmela
Jussi Salmela kirjoitti: > > > > Every GUI implementation has a command loop and things to initiate the OOPS: an EVENT loop Cheers, Jussi -- http://mail.python.org/mailman/listinfo/python-list

Re: askstring Window to the top under Windows

2007-03-06 Thread Jussi Salmela
iwl kirjoitti: > On 6 Mrz., 14:48, "Tim Golden" <[EMAIL PROTECTED]> wrote: >> On Mar 6, 1:13 pm, "iwl" <[EMAIL PROTECTED]> wrote: >> >> It's not clear whether you're talking about the usual >> "Why do I get a DOS window when I run my python script?" >> question -- to which the answer is, in essence

Re: Project organization and import

2007-03-06 Thread Chris Mellon
On 6 Mar 2007 09:24:32 -0800, Martin Unsal <[EMAIL PROTECTED]> wrote: > On Mar 6, 8:56 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > Scrollbar *can't* assume that util will be present in its namespace, > > because it won't be unless it imports it. Scrollbar needs to import > > its own dependenc

Re: Project organization and import

2007-03-06 Thread Martin Unsal
On Mar 6, 8:56 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > Scrollbar *can't* assume that util will be present in its namespace, > because it won't be unless it imports it. Scrollbar needs to import > its own dependencies. But why do you think thats a problem? OK, maybe I'm totally missing some

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-06 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 02 Mar 2007 14:38:59 -0300, Donn Cave <[EMAIL PROTECTED]> > escribió: > > > In article <[EMAIL PROTECTED]>, > > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > >> On http://docs.python.org/lib/popen2

Re: Project organization and import

2007-03-06 Thread Chris Mellon
On 6 Mar 2007 09:09:13 -0800, Martin Unsal <[EMAIL PROTECTED]> wrote: > On Mar 6, 6:07 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > Because you're advocating single class per file. > > What I actually said was "Smallest practical functional block." I > never said one class per file, in fact I

Re: Getting external IP address

2007-03-06 Thread Sion Arrowsmith
Steven D'Aprano <[EMAIL PROTECTED]> wrote: >I have a PC behind a firewall, and I'm trying to programmatically >determine the IP address visible from outside the firewall. > [ ... ] >Can anyone help me fix that code snippet, or suggest another (better) way >to get the externally visible IP address

Re: Project organization and import

2007-03-06 Thread Martin Unsal
On Mar 6, 6:07 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > Because you're advocating single class per file. What I actually said was "Smallest practical functional block." I never said one class per file, in fact I generally have more than one class per file. Nonetheless I frequently have a cl

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread Alex Li
Thanks all for your suggestions. Nick: I am trying to avoid generate the dot file manually so that I can minimize bugs coz by me ;) SPE: Unfortunately that may be too radical ;) I work in a corporate environment (read: MS shop) and my group wants to generate a dependency graph of our system. I

Re: Project organization and import

2007-03-06 Thread Chris Mellon
On 6 Mar 2007 08:42:00 -0800, Martin Unsal <[EMAIL PROTECTED]> wrote: > On Mar 5, 2:18 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > > Martin Unsal a écrit : > > > For example, say > > > you want to organize the widgets package as follows: > > > > > widgets/scrollbar/*.py > > > widgets/for

[CfP] Dynamic Languages Symposium 2007

2007-03-06 Thread Pascal Costanza
* * * Dynamic Languages Symposium 2007 * *at ooPSLA 2007 - http://www.oopsla.org * * * * Montreal, Quebec, Canada, October 22, 2007 * * * * http://www.swa.hpi.uni-po

Re: Project organization and import

2007-03-06 Thread Diez B. Roggisch
> I'd like to point out something though. More than one of the people > who responded have implied that I am bringing my prior-language > mindset to Python, even suggesting that my brain isn't built for > Python. ;) In fact I think it's the other way around. I am struggling > to take full advantage

Re: Project organization and import

2007-03-06 Thread Martin Unsal
On Mar 5, 2:18 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Martin Unsal a écrit : > > For example, say > > you want to organize the widgets package as follows: > > > widgets/scrollbar/*.py > > widgets/form/*.py > > widgets/common/util.py > > > Other than messing around with PYTHONPATH, whi

Re: Device Drivers in python(kernel modules)

2007-03-06 Thread John Nagle
Thomas Ploch wrote: > rishi pathak schrieb: > >>I am not much of a kernel programmer , I have a requirement to shift a >>python code to work as a kernel module. >>So I was just wondering whether we can write a kernel module in python. >>A thought is that if we can somehow convert python code into

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread SPE - Stani's Python Editor
On Mar 6, 8:39 am, "Nick Vatamaniuc" <[EMAIL PROTECTED]> wrote: > On Mar 5, 5:16 pm, "Alex Li" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I would like to use Python 2.5 on Windows with Graphviz to generate > > graphs. I used yapgvb but it only requires Python 2.4 (won't work > > with Python 2.5

Re: Project organization and import

2007-03-06 Thread Martin Unsal
Bruno Desthuilliers wrote: > > Which is not a problem. reload() is of very limited use for any > non-trivial stuff. > Now that I've heard this from 5 different people it might be sinking in. :) :) I really do appreciate all of you taking the time to explain this to me. When I started using Pyt

Re: wxPython import error...

2007-03-06 Thread Chris Mellon
On 4 Mar 2007 16:42:07 -0800, king kikapu <[EMAIL PROTECTED]> wrote: > Hi, > > i am just completed installing Python/Pydev/Eclipse/wxPython on an > Ubuntu system and all are running fine except program that contains > references to wx > > It gives me: > ImportError: /usr/lib/python2.4/site-packages

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

2007-03-06 Thread PAolo
On 6 Mar, 16:51, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 6 Mar, 16:39, "Paolo Pantaleo" <[EMAIL PROTECTED]> wrote: > > > > > The os.system() (but all the other funciont with similar behavior) reports > > wrong exit status. I can reproduce the bug in the following way > > I think you should lo

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

2007-03-06 Thread Paul Boddie
On 6 Mar, 16:39, "Paolo Pantaleo" <[EMAIL PROTECTED]> wrote: > > The os.system() (but all the other funciont with similar behavior) reports > wrong exit status. I can reproduce the bug in the following way I think you should look at some previous threads related to this (obtained by searching Goog

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

2007-03-06 Thread Adam Atlas
Doesn't seem to work. I guess zipimport doesn't support that by default... but if I remember correctly, Setuptools adds that. Maybe I'll take a look at how it does it (I think by extracting the .so to / tmp?) and see how easy it would be to integrate it here. -- http://mail.python.org/mailman/lis

Re: wxPython import error...

2007-03-06 Thread Fabio Zadrozny
On 4 Mar 2007 16:42:07 -0800, king kikapu <[EMAIL PROTECTED]> wrote: Hi, i am just completed installing Python/Pydev/Eclipse/wxPython on an Ubuntu system and all are running fine except program that contains references to wx It gives me: ImportError: /usr/lib/python2.4/site-packages/wx-2.8-gtk

Re: Project organization and import

2007-03-06 Thread Alex Martelli
Jorge Godoy <[EMAIL PROTECTED]> wrote: ... > > My favorite way of working: add a test (or a limited set of tests) for > > the new or changed feature, run it, check that it fails, change the > > code, rerun the test, check that the test now runs, rerun all tests to > > see that nothing broke, add

Re: Project organization and import

2007-03-06 Thread Alex Martelli
Martin Unsal <[EMAIL PROTECTED]> wrote: > On Mar 5, 10:06 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > > My favorite way of working: add a test (or a limited set of tests) for > > the new or changed feature, run it, check that it fails, change the > > code, rerun the test, check that the test no

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

2007-03-06 Thread Paolo Pantaleo
Subject: python2.4: Wrong exist status for os.system, os.poepen, etc. Package: python2.4 Version: 2.4.4-2 Severity: normal -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (800, 'testing'), (70, 'stable'), (60, 'unstable') Architecture: i386 (i686) Shell: /bin/sh l

Re: askstring Window to the top under Windows

2007-03-06 Thread iwl
On 6 Mrz., 14:48, "Tim Golden" <[EMAIL PROTECTED]> wrote: > On Mar 6, 1:13 pm, "iwl" <[EMAIL PROTECTED]> wrote: > > It's not clear whether you're talking about the usual > "Why do I get a DOS window when I run my python script?" > question -- to which the answer is, in essence, change > your script

Re: Interface Implementation in Python

2007-03-06 Thread BJörn Lindqvist
On 5 Mar 2007 16:25:03 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. > > How to access the interface fromn Client? You have a class with methods and data. You write many

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

2007-03-06 Thread Peter Wang
On Mar 5, 12:31 am, "Adam Atlas" <[EMAIL PROTECTED]> wrote: > Right now I'm just testing and polishing up the code... in the > meantime, any comments? How does this work with compiled extension modules? -- http://mail.python.org/mailman/listinfo/python-list

Re: Interface Implementation in Python

2007-03-06 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. > > How to access the interface fromn Client? > > Thanks > PSB > You might want to look at how Zope 3 implements interfaces. http://wiki.zope.org/

Re: Any module to parse httpd.conf?

2007-03-06 Thread Jeff McNeil
I looked at http://www.python.org/pypi/httpdrun not so long ago, it might be able to do what you want. I think it was a bit hard to read. Remember that with Apache you (may) also need to worry about configuration merges and whatnot (, , .htaccess, and so on...). What specifically do you want to

Re: Project organization and import

2007-03-06 Thread Chris Mellon
On 5 Mar 2007 23:35:00 -0800, Martin Unsal <[EMAIL PROTECTED]> wrote: > On Mar 5, 11:06 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > I never advocated big files with many functional units - just files > > that are "just big enough". > > Then we're in total agreement. I'm not sure why you thoug

Re: ANN: PyDSTool now compatible with numpy 1.0.1, scipy 0.5.2 and 64-bit CPUs.

2007-03-06 Thread [EMAIL PROTECTED]
On Mar 5, 10:17 pm, "Rob Clewley" <[EMAIL PROTECTED]> wrote: > I have a different and admittedly limited view of hybrid systems as > part of dynamical systems theory. In principle, I would love to have > time to write an interface to something like Modelica, but PyDSTool > isn't intended as an ind

  1   2   >