Re: [Tutor] WinMerge

2008-12-16 Thread W W
Perhaps bold/italics/underline/strikethrough? -Wayne On Tue, Dec 16, 2008 at 12:50 PM, Wayne Watson wrote: > Is there a way to highlight differences between the two files when > printing in b/w? Help suggests there may be some texturing, but all I see is > color choices. > -- > >Way

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Alan Gauld
"Paul McGuire" wrote and "#" as the "Number sign", although all of us have probably been instructed by voice mail menus to press the "pound key" when they mean this sign. In the UK its usually referred to as hash or square. When tone dial phones were first introduced in the UK in the late 70

Re: [Tutor] reciprocal import

2008-12-16 Thread Alan Gauld
"spir" wrote Actually, I have 2 main modules that work together to achieve the task. In the first one(A) is defined a set of objects that outline the creation of objects which classes & subclasses are in the second module(B). So far so good. A needs to import B but B does not need to impor

Re: [Tutor] reciprocal import

2008-12-16 Thread Steve Willoughby
spir wrote: Steve & Kent: Actually, I have 2 main modules that work together to achieve the task. In the first one is defined a set of objects that outline the creation of objects which classes & subclasses are in the second module. Only for clarity I need two modules. In my experience (and I r

Re: [Tutor] reciprocal import

2008-12-16 Thread spir
Steve & Kent: Actually, I have 2 main modules that work together to achieve the task. In the first one is defined a set of objects that outline the creation of objects which classes & subclasses are in the second module. Only for clarity I need two modules. A third one copes with exceptions -- so i

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Ole Henning Jensen
Marc Tompkins wrote: By the way, (totally off-topic, of course, my apologies): what do all y'all call the "@" operator? Here in the States, we call it the "at-sign", which I find boring; I believe "sleepycat" is a Scandinavian thing (I picked it up in some long-forgotten article) Continuing of

Re: [Tutor] reciprocal import

2008-12-16 Thread christopher . henk
Although you generally would want to design so that this does not happen, if the import of the first module is only needed in some of the functions in the second module, you can include the import within the function definition and that would work ok. But you can't have the second import at the

Re: [Tutor] reciprocal import

2008-12-16 Thread Kent Johnson
On Tue, Dec 16, 2008 at 3:06 PM, spir wrote: > Is it legal or possible at all for two modules to import each other? I > tried several ways and had several kinds of error messages. Usually > "can't import...". It is possible but better to avoid it, perhaps by putting common functionality into a t

Re: [Tutor] reciprocal import

2008-12-16 Thread Steve Willoughby
spir wrote: Is it legal or possible at all for two modules to import each other? I tried several ways and had several kinds of error messages. Usually "can't import...". My first impression here is that this sounds like a bad class/module design if they're really that interdependent. ___

[Tutor] reciprocal import

2008-12-16 Thread spir
Is it legal or possible at all for two modules to import each other? I tried several ways and had several kinds of error messages. Usually "can't import...". Denis ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread spir
I use decorators only to declare class methods. Denis Le lundi 15 décembre 2008 à 18:33 -0800, Marc Tompkins a écrit : > Does anybody who reads this list use decorators and have a nice word > to say about them? I'd be interested to hear it. > ___ Tut

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Paul McGuire
> By the way, (totally off-topic, of course, my apologies): what do all > y'all call the "@" operator? Back when the "what syntax should we use for decorators?" debate raged, this symbol was referred to as a "pie", I guess because it looks like the swirl on top of a cream pie. I think this term

[Tutor] WinMerge

2008-12-16 Thread Wayne Watson
Title: Signature.html Is there a way to highlight differences between the two files when printing in b/w? Help suggests there may be some texturing, but all I see is color choices. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Patrick Mullen
On Mon, Dec 15, 2008 at 5:03 PM, Alan Gauld wrote: > > "Marc Tompkins" wrote > >> If you're just starting out in Python, decorators can be hard to get >> your head around... > > I've been using Python for oover 10 years and still find decorators > hard to get my head around! :-) > > I confess I'm

Re: [Tutor] TOT: what does the "@" operator mean?

2008-12-16 Thread Gregor Lingl
Marc Tompkins schrieb: By the way, (totally off-topic, of course, my apologies): what do all y'all call the "@" operator? Here in the States, we call it the "at-sign", which I find boring; I believe "sleepycat" is a Scandinavian thing (I picked it up in some long-forgotten article); some Russi

[Tutor] GtkHTML

2008-12-16 Thread Alan Gauld
"i i" wrote in message news:6fb034600812160753s4c1835d6o86f24c22094fb...@mail.gmail.com... Hi, Is their any site where i can find out about custom widget, GtkHTML, python gtkHtml. A google search brought up this http://www.fcoutant.freesurf.fr/python-gtkhtml.html Now what do you

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Alan Gauld
"Marc Tompkins" wrote y'all call the "@" operator? Here in the States, we call it the "at-sign", Thats what I've always heard in the UK too. Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Marc Tompkins
OK, having looked at http://wiki.python.org/moin/PythonDecoratorLibrary again with a less jaundiced eye, I believe my code may soon begin to contain a few of the dreaded sleepycats... By the way, (totally off-topic, of course, my apologies): what do all y'all call the "@" operator? Here in the St

Re: [Tutor] Fw: Reading gzip files

2008-12-16 Thread Kent Johnson
On Tue, Dec 16, 2008 at 11:29 AM, Dinesh B Vadhia wrote: > What I'd like to do is ... when an "IOError: CRC check failed" error happens > then close the offending file and move on to the next file in the list. How > do I achieve this with this particular type of error? You can catch IOError spe

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Paul McGuire
The Python Wiki has some example decorators at http://wiki.python.org/moin/PythonDecoratorLibrary. I think the CGIMethod wrapper is a good intuitive example, and memoize is a good technique to add to your Python toolkit. -- Paul ___ Tutor maillist -

Re: [Tutor] listen in on other program's tcp connections

2008-12-16 Thread Martin Walsh
phpfood wrote: > On windows XP, I'm running a program that sends TCP connections on port > 5039. I'v ran wireshark to determine this. I want to create a simple > program that listens for these connections and intercepts and then turns > the data transferred into a string. From there I'd obviously l

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Kent Johnson
Here is an interesting example of a decorator that munges the bytecodes of a function to optimize it: http://code.activestate.com/recipes/277940/ Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Fw: Reading gzip files

2008-12-16 Thread Dinesh B Vadhia
Hi! I sent the note below earlier and thank-you for the various responses. The program reads a bunch of gzip files, writes the content out to a text file line by line (see code below). What I'd like to do is ... when an "IOError: CRC check failed" error happens then close the offending file a

Re: [Tutor] listen in on other program's tcp connections

2008-12-16 Thread Lie Ryan
On Tue, 16 Dec 2008 02:55:55 -0600, W W wrote: > On Tue, Dec 16, 2008 at 12:57 AM, xbmuncher > wrote: > >> On windows XP, I'm running a program that sends TCP connections on port >> 5039. I'v ran wireshark to determine this. I want to create a simple >> program that listens for these connections

[Tutor] (no subject)

2008-12-16 Thread i i
Hi, Is their any site where i can find out about custom widget, GtkHTML, python gtkHtml. thanx a lot ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Reading module to import from a string

2008-12-16 Thread Mark Tolonen
"Shrutarshi Basu" wrote in message news:376fbdcf0812151438w53c8f3f7rc1dc481b52428...@mail.gmail.com... Suppose I have a module that I want to import called ImMod1 that's saved in a variable like so: var = "ImMod1" Is there some way to import ImMod1 by using var? Thanks, Basu mod = __import

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Kent Johnson
On Mon, Dec 15, 2008 at 9:33 PM, Marc Tompkins wrote: > I'm sorry I left it as flat as I did - that Dr. Dobbs article is a > pretty good explanation, and there's an article somewhere in the > Effbot bookshelf that does a decent job - but I couldn't find either > one at that moment. FWIW my attem

[Tutor] listen in on other program's tcp connections

2008-12-16 Thread phpfood
On windows XP, I'm running a program that sends TCP connections on port 5039. I'v ran wireshark to determine this. I want to create a simple program that listens for these connections and intercepts and then turns the data transferred into a string. From there I'd obviously like my program to act a

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-16 Thread W W
On Mon, Dec 15, 2008 at 9:56 AM, Benjamin Kaplan wrote: > It's not a question of sensibility. It's a question of purpose. The Zen is > the philosophy of a language that tries to be easy to learn and easy to use. > Python is used by programmers who want to experiment with it, but who > usually know

Re: [Tutor] listen in on other program's tcp connections

2008-12-16 Thread W W
On Tue, Dec 16, 2008 at 12:57 AM, xbmuncher wrote: > On windows XP, I'm running a program that sends TCP connections on port > 5039. I'v ran wireshark to determine this. I want to create a simple program > that listens for these connections and intercepts and then turns the data > transferred int