Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-08 Thread Icarus Sparry
On Tue, 08 Feb 2011 14:30:53 -0800, Xah Lee wrote: > On Feb 8, 9:32 am, Icarus Sparry wrote: [snip] >> The 'modern' way to do this is >> find . -maxdepth 2 -name '*.html' -exec grep whatever {} + >> >> The key thing which makes this 'modern&#

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-08 Thread Icarus Sparry
On Tue, 08 Feb 2011 13:51:54 +0100, Petter Gustad wrote: > Xah Lee writes: > >> problem with find xargs is that they spawn grep for each file, which >> becomes too slow to be usable. > > find . -maxdepth 2 -name '*.html -print0 | xargs -0 grep whatever > > will call grep with a list of filenam

Re: Problems with using queue in Tkinter application

2009-07-05 Thread Icarus
On Jul 4, 11:24 am, Peter Otten <__pete...@web.de> wrote: > Icarus wrote: > > On Jul 4, 3:21 am, Peter Otten <__pete...@web.de> wrote: > >> Icarus wrote: > >> > I'm working on a serial protocol analyzer in python.  We have an > >> > appli

Re: Problems with using queue in Tkinter application

2009-07-04 Thread Icarus
On Jul 4, 3:21 am, Peter Otten <__pete...@web.de> wrote: > Icarus wrote: > > I'm working on a serial protocol analyzer in python.  We have an > > application written by someone else in MFC but we need something that > > is cross platform.  I intended to implement th

Problems with using queue in Tkinter application

2009-07-03 Thread Icarus
I'm working on a serial protocol analyzer in python. We have an application written by someone else in MFC but we need something that is cross platform. I intended to implement the GUI portion in Tkinter but am having trouble. The idea is that I will read messages from the serial port and output

optparse options

2009-05-19 Thread icarus
Why do I need to put two options for this script to print the path? if I just specify the option and argument... $ python

broken ncurses on python 3.0

2008-12-10 Thread icarus
OS: win32, python 3.0 I've been trying to run some curses demos and I get this: C:\Python\Lib\curses>python textpad.py Traceback (most recent call last): File "textpad.py", line 3, in import curses File "C:\Python\lib\curses\__init__.py", line 15, in from _curses import * ImportErro

getting global variables from dictionary

2008-09-26 Thread icarus
global_vars.py has the global variables set_var.py changes one of the values on the global variables (don't close it or terminate) get_var.py retrieves the recently value changed (triggered right after set_var.py above) Problem: get_var.py retrieves the old value, the built-in one but not the rece

Re: wxpython ms-dos black window popping up in background

2008-09-09 Thread icarus
python.exe > pythonw.exe suppresses the DOS box from coming up and should be used > for running GUI applications such as yours. > > Regards, > Chris > > > > On Tue, Sep 9, 2008 at 1:33 PM, icarus <[EMAIL PROTECTED]> wrote: > > platform: windows xp professiona

wxpython ms-dos black window popping up in background

2008-09-09 Thread icarus
platform: windows xp professional, python 2.5, wxpython When I double-check on my program file test.py (for simplicity I'll be using this code below), I see the window just fine. But the ms-dos black window pops up in the background. On Linux, no issues at all. How can I get rid of that ms-dos b

Flash interface for a python program

2008-03-06 Thread icarus
Is it possible to call an external python program, through a Flash interface? Meaning, I create a Flash window with a button. When I press that button, it automagically invokes the external python program. Is that possible? Any books/online tutorials you can recommend me? I guess I'm looking fo

global variables: to be or not to be

2008-02-22 Thread icarus
I've read 'global variables' are bad. The ones that are defined as 'global' inside a function/method. The argument that pops up every now and then is that they are hard to keep track of. I don't know Python well enough to argue with that. Just started learning it a few days ago, so I won't get i

Re: how to finish a while loop...

2008-02-19 Thread icarus
> To the original poster what environment are you running this in? Linux. Xubuntu if that matters. > When I put your program in notepad and run it from the windows command > prompt it works. yeah yeah...same here. After I got the tip that it actually worked, I went int

Re: how to finish a while loop...

2008-02-19 Thread icarus
> That code works. Maybe you fixed it while you were mailing it =) > > -- > -- Guilherme H. Polo Goncalves This is weird mate. I'm using eclipse 3.2 with the pydev plugin. There it loops forever - from the eclipse console. Two hours of trying, changing the code...finally gave up. Then I got you

how to finish a while loop...

2008-02-19 Thread icarus
Hi all, i'm new to python. Learning on my own how to ask a user to finish a loop or not. For some reason, it behaves as infinite loop although I changed its condition. Please tell me what I'm doing wrong. Thanks in advance. condition = True while ( condition ): try: in