Re: Project organization and import

2007-03-06 Thread Martin Unsal
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 now runs, rerun all tests to > see that nothing bro

Re: persistent fifo queue class

2007-03-06 Thread Diez B. Roggisch
David Bear schrieb: > I'm looking to see if there are any examples or prewritting fifo queue > classes. I know this is a broad topic. I'm looking to implement a simple > application where a web server enqueue and pickle using a local socket on > to a 'queue server' -- and then I will have another a

Re: Howto pass exceptions between threads

2007-03-06 Thread Alexander Eisenhuth
John Nagle schrieb: > Alexander Eisenhuth wrote: >> Hallo Alltogether, >> >> I've searched in this mailing list, but it seems to me that there is >> no general approach to pass exceptions from one thread to another. > >Very few languages have that. > >Actually, it could be made to work f

Re: Any way to determine test success from inside tearDown()?

2007-03-06 Thread Duncan Booth
"Christopher Corbell" <[EMAIL PROTECTED]> wrote: > What I'm after is a specialized clean-up approach for error/failure > cases. How about decorating the tests with something which tracks the status? Something like (completely untested): def track_failure(f): def test(self): try:

Re: Project organization and import

2007-03-06 Thread Gabriel Genellina
En Tue, 06 Mar 2007 04:57:18 -0300, Martin Unsal <[EMAIL PROTECTED]> escribió: > 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,

image processing

2007-03-06 Thread edurand
Hi, We are are pleased to announce the version 3.0 of the image processing library 'Filters'. You can use it in Python, and we have provided tutorials and samples in Python, with for exemple conversion from/to PIL image format. Have a look at : http://filters.sourceforge.net/ it's open source of

pytz2007c error

2007-03-06 Thread looping
Hi, Why this error ? >>> from pytz import timezone >>> eastern = timezone('US/Eastern') Traceback (most recent call last): File "", line 1, in File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz \__init__.py", line 93, in timezone File "C:\Python25\lib\site-packages\pytz-2007c-py2

Re: image processing

2007-03-06 Thread Paul Rubin
"edurand" <[EMAIL PROTECTED]> writes: > You can use it in Python, and we have provided tutorials and samples > in Python, with for exemple conversion from/to PIL image format. > Have a look at : http://filters.sourceforge.net/ Looks interesting, however the example screen shot is shrunk down so th

Re: Newbie question

2007-03-06 Thread Ayaz Ahmed Khan
"[EMAIL PROTECTED]" typed: >> Tommy Grav schrieb: >> For this case, there are list comprehensions (or map, but you shouldn't >> use it any longer): > > I didn't see anything in the docs about this. Is map going away or is > it considered un-Pythonic now? Most everywhere I've read about map() and

Re: Project organization and import

2007-03-06 Thread Dave Baum
In article <[EMAIL PROTECTED]>, "Martin Unsal" <[EMAIL PROTECTED]> wrote: > That too... although I think that's unfortunate. If reload() were > reliable, would you use it? Do you think it's inherently unreliable, > that is, it couldn't be fixed without fundamentally breaking the > Python language

Re: pytz2007c error

2007-03-06 Thread looping
On Mar 6, 9:51 am, "looping" <[EMAIL PROTECTED]> wrote: > Hi, > Why this error ? > > >>> from pytz import timezone > >>> eastern = timezone('US/Eastern') > > Traceback (most recent call last): > File "", line 1, in > File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz > \__init__.py"

Any module to parse httpd.conf?

2007-03-06 Thread Gerard Flanagan
Hello, Does anyone know of an existing module to parse httpd.conf files? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: pytz2007c error

2007-03-06 Thread Gabriel Genellina
En Tue, 06 Mar 2007 06:41:59 -0300, looping <[EMAIL PROTECTED]> escribió: > On Mar 6, 9:51 am, "looping" <[EMAIL PROTECTED]> wrote: >> >> >>> from pytz import timezone >> >>> eastern = timezone('US/Eastern') >> >> I'm running python 2.5 on WinXP French with the egg from CheeseShop. >> >> Same erro

Re: Project organization and import

2007-03-06 Thread Bruno Desthuilliers
Martin Unsal a écrit : > On Mar 5, 3:11 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > >>Your own experience *with Python* ? > > > No, my experience with Visual Basic. ;) > > Of course my experience with Python! Sorry but this was really not obvious. > Sorry, I can continue writing sn

Re: Newbie question

2007-03-06 Thread Gabriel Genellina
En Tue, 06 Mar 2007 06:15:03 -0300, Ayaz Ahmed Khan <[EMAIL PROTECTED]> escribió: > "[EMAIL PROTECTED]" typed: >>> Tommy Grav schrieb: >>> For this case, there are list comprehensions (or map, but you shouldn't >>> use it any longer): >> >> I didn't see anything in the docs about this. Is map g

IPython on Windows dir problem

2007-03-06 Thread Marko Bozikovic
Hi all, I have a small problem with IPython shell on Windows. If I run 'python C:\python\scripts\ipython -p pysh' from cmd.exe or directly from Run dialog, I don't get any output from 'shell' commands like ddir. If I run ipython shell from 4NT, ddir and similar commands work fine. Python versio

Good handling of input data (was Re: Newbie question)

2007-03-06 Thread Tommy Grav
On Mar 5, 2007, at 12:47 PM, Larry Bates wrote: > Tommy Grav wrote: >> Hi list, >> >>this is somewhat of a newbie question that has irritated me for >> a while. >> I have a file test.txt: >> >> 0.3434 0.5322 0.3345 >> 1.3435 2.3345 5.3433 >> >> and this script >> lines = open("test.txt","

Try to get help on pymat

2007-03-06 Thread CHRIS CHEW
I am trying to get my pymat to work. The Python script did not interface to matlab yet. What are the required script to get the interface to work? Please send me email at [EMAIL PROTECTED] Chris Chew -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Jorge Godoy
[EMAIL PROTECTED] (Alex Martelli) writes: > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >> >>I don't reload... When my investigative tests gets bigger I write a script >> >>and run it with the interpreter. It is easy since my text editor can call >> >>Python on a buffer (I use Emacs). >> >

Device Drivers in python(kernel modules)

2007-03-06 Thread rishi pathak
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 a C object code then it can be done. Can some one sugg

Re: Project organization and import

2007-03-06 Thread Jorge Godoy
"Martin Unsal" <[EMAIL PROTECTED]> writes: > 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 thought my > opinions were the re

Re: CherryPy + Database questions

2007-03-06 Thread Diez B. Roggisch
> SQLite isn't really a DBMS at all, it's just a library. Where is the difference? From the DB-API-side none. And there are plenty of DBs out there that work similar, like MS Access. Show me where it is written that a DBMS has to run as separate server process. > According to > their FAQ (http:

Re: pytz2007c error

2007-03-06 Thread Stuart Bishop
looping wrote: On Mar 6, 9:51 am, "looping" <[EMAIL PROTECTED]> wrote: Hi, Why this error ? from pytz import timezone eastern = timezone('US/Eastern') Traceback (most recent call last): File "", line 1, in File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz \__init__.py", line

Re: Interface Implementation in Python

2007-03-06 Thread Johannes Woolard
'Lo, I think I know what you're asking: > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. I assume you're talking about the what Java calls an interface - and the simple answer is that we don't have an equivalent in Python. This is

Re: Device Drivers in python(kernel modules)

2007-03-06 Thread Thomas Ploch
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 a C object > code then it

SPE python IDE: Call for testers!

2007-03-06 Thread SPE - Stani's Python Editor
I've been working a lot on fixing SPE and upgrading it with the latest plugins. The winpdb debugger no longer fails and wxGlade crashes are history. Is that not great? Are you eager to try it out yourself? Please do! Get it from subversion and test it for any critical bug, so I can iron it out. I h

Re: Good handling of input data (was Re: Newbie question)

2007-03-06 Thread Steven D'Aprano
On Tue, 06 Mar 2007 05:57:43 -0500, Tommy Grav wrote: > So how would you handle this type of error handling? > My main problem is that occasionally there is an entry > in the list that is a string: > > 0.9834 134.4933 78.009 run11 27 How do you want to deal with such an occasional string? What d

askstring Window to the top under Windows

2007-03-06 Thread iwl
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 unconfortable -- http://mail.python.org/mailman/listinfo/python-

Re: Good handling of input data (was Re: Newbie question)

2007-03-06 Thread Jussi Salmela
Tommy Grav kirjoitti: > > Thanks for the great response. > > So how would you handle this type of error handling? > My main problem is that occasionally there is an entry > in the list that is a string: > > 0.9834 134.4933 78.009 run11 27 > > Again I would like to avoid having to individually

Re: Good handling of input data (was Re: Newbie question)

2007-03-06 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Tue, 06 Mar 2007 05:57:43 -0500, Tommy Grav wrote: > > >>So how would you handle this type of error handling? >>My main problem is that occasionally there is an entry >>in the list that is a string: >> >>0.9834 134.4933 78.009 run11 27 > > > How do you want to dea

Re: image processing

2007-03-06 Thread edurand
On Mar 6, 9:57 am, Paul Rubin wrote: > "edurand" <[EMAIL PROTECTED]> writes: > > You can use it in Python, and we have provided tutorials and samples > > in Python, with for exemple conversion from/to PIL image format. > > Have a look at :http://filters.sourceforge.net/ >

Re: Good handling of input data (was Re: Newbie question)

2007-03-06 Thread Tommy Grav
On Mar 6, 2007, at 8:14 AM, Jussi Salmela wrote: > Tommy Grav kirjoitti: >> >> Thanks for the great response. >> >> So how would you handle this type of error handling? >> My main problem is that occasionally there is an entry >> in the list that is a string: >> >> 0.9834 134.4933 78.009 run11 2

Re: askstring Window to the top under Windows

2007-03-06 Thread Jussi Salmela
iwl kirjoitti: > 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 unconfortable > Are you asking abou

Re: askstring Window to the top under Windows

2007-03-06 Thread Tim Golden
Jussi Salmela wrote: > iwl kirjoitti: >> 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: Is every number in a list in a range?

2007-03-06 Thread Steven D'Aprano
On Mon, 05 Mar 2007 14:03:50 -0500, Steven W. Orr wrote: > I have a list ll of intergers. I want to see if each number in ll is > within the range of 0..maxnum > > I can write it but I was wondering if there's a better way to do it? No, the way you wrote it is the absolute best way. Or possibl

Re: askstring Window to the top under Windows

2007-03-06 Thread Tim Golden
On Mar 6, 1:13 pm, "iwl" <[EMAIL PROTECTED]> 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 u

Re: Getting external IP address

2007-03-06 Thread Steven D'Aprano
On Mon, 05 Mar 2007 09:02:44 +, Duncan Booth wrote: > Try running it interactively and looking at the data you receive: > conn = HTTPConnection('xml.showmyip.com') conn.request('GET', '/') > resp = conn.getresponse() print resp > data = resp.read() print data >

Re: Try to get help on pymat

2007-03-06 Thread Alexander Schmolck
"CHRIS CHEW" <[EMAIL PROTECTED]> writes: > I am trying to get my pymat to work. The Python script did not interface to > matlab yet. What are the required script to get the interface to work? Please > send me email at [EMAIL PROTECTED] You might want to have a look at . c

Re: Python GUI + OpenGL

2007-03-06 Thread Diez B. Roggisch
>> I didn't say so. I just pointed out an alternative, as the OP had issues >> with obtaining binary packages for wx + py2.5 >> > > I believe he was having trouble with binary packages for PyOpenGL, > wxPython has 2.5 binaries and has since it was released. Ah, I didn't read it that way as the O

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

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

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

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

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

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

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

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

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

  1   2   >