Re: [Tutor] PyQt segfault

2007-11-30 Thread David Boddie
On Fri Nov 30 18:56:04 CET 2007, Eric Brunson wrote: > This comboboxsegfault.py doesn't seem to do anything on my box, but I > did get an "MemoryError" and a stack trace when I ran cbox.py and > changed the dropdown menu selection. > > I changed the line: > Globals.changedtext = qstring >

Re: [Tutor] Variables and Functions

2007-11-30 Thread Ricardo Aráoz
Alan Gauld wrote: > "Devon MacIntyre" <[EMAIL PROTECTED]> wrote > >> input their own numbers to fill in the board. My problem is that I >> can't get >> the variables 'puzzle' and 'new_puzzle' into that function (to be >> compared) >> because they are not globally defined; only in 'new_sudoku' >

[Tutor] Selecting a browser

2007-11-30 Thread Ricardo Aráoz
Hi, I've checked webbrowser module and so far I find no way of selecting a browser other than the default one. Say I want certain places opened with IE and others with Mozilla, and I don't want to mess with the user's setting of the default browser. Any tips? TIA __

Re: [Tutor] lstrip removes '/' unexpectedly

2007-11-30 Thread Danny Yoo
> Hello: > I'm seeing some strange behavior with lstrip operating > on string representations of *nix-style file paths > Example: s = '/home/test/' s1 = s.lstrip('/home') s1 > 'test/' ## '/test/' was expected! '/' was unexpectedly removed > Any comments or corrective measures are w

Re: [Tutor] Indentation Issue and Blind People

2007-11-30 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hi, > I am just getting started with Python, as in learning the syntax for basic > statements and how to write functions and all. Here is my question. > Usually, if you are a person who is blind, you run the risk of having > trouble keeping your code indented properly. Th

Re: [Tutor] lstrip removes '/' unexpectedly

2007-11-30 Thread Kent Johnson
Tim Johnson wrote: > Hello: > I'm seeing some strange behavior with lstrip operating > on string representations of *nix-style file paths > Example: s = '/home/test/' s1 = s.lstrip('/home') s1 > 'test/' ## '/test/' was expected! '/' was unexpectedly removed > Any comments or correc

Re: [Tutor] Indentation Issue and Blind People

2007-11-30 Thread jim stockford
you might consider keeping your code at two spaces and when/if the need arises to share your code, write a little filter program that translates the two-space indents to four. very interesting idea to play piano notes. how'd you do that? On Nov 30, 2007, at 10:58 AM, [EMAIL PROTECTED] wr

Re: [Tutor] lstrip removes '/' unexpectedly

2007-11-30 Thread jim stockford
it might work just to strip 'home' and leave print s1 //test/ the '/' character is a separator, so /this//that/andmore/ is, at least at the shell level, the same as /this/that/andmore/ i.e. any number of '/' characters adjacent has the effect of a single '/' character (again, at the shell level)

[Tutor] Indentation Issue and Blind People

2007-11-30 Thread james . homme
Hi, I am just getting started with Python, as in learning the syntax for basic statements and how to write functions and all. Here is my question. Usually, if you are a person who is blind, you run the risk of having trouble keeping your code indented properly. There are ways to do it, but they ar

Re: [Tutor] Starting a browser instance and passing a parameter to it.

2007-11-30 Thread Don Taylor
Eric Brunson wrote: > Don Taylor wrote: >> Eric Brunson wrote: >> >> >>> Definitely, or even just CGIHTTPServer. >>> >>> >> No, I don't think so. I am not a RESTafarian. :-) >> > > Forgive my inexperience with the SimpleXMLRPCServer, but I didn't think > it provided state any more t

Re: [Tutor] PyQt segfault

2007-11-30 Thread Eric Brunson
Tiago Saboga wrote: > First, I just noticed I sent a non-working version of the code. The line > > print ("The same" if Aux.mystring==Aux.mystring2 else "Different") > > should be > > print ("The same" if Aux.mystring==Aux.compare else "Different") > > Sorry for that. > This comboboxsegfault.p

Re: [Tutor] lstrip removes '/' unexpectedly

2007-11-30 Thread Eric Brunson
Tim Johnson wrote: > Hello: > I'm seeing some strange behavior with lstrip operating > on string representations of *nix-style file paths > Example: > s = '/home/test/' s1 = s.lstrip('/home') s1 > 'test/' ## '/test/' was expected! '/' was unexpectedly removed >

Re: [Tutor] lstrip removes '/' unexpectedly

2007-11-30 Thread Tiago Saboga
Read this: In [50]: print str.lstrip.__doc__ S.lstrip([chars]) -> string or unicode Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping --- The

[Tutor] lstrip removes '/' unexpectedly

2007-11-30 Thread Tim Johnson
Hello: I'm seeing some strange behavior with lstrip operating on string representations of *nix-style file paths Example: >>> s = '/home/test/' >>> s1 = s.lstrip('/home') >>> s1 'test/' ## '/test/' was expected! '/' was unexpectedly removed Any comments or corrective measures are welcome thanks T

Re: [Tutor] PyQt segfault

2007-11-30 Thread Tiago Saboga
First, I just noticed I sent a non-working version of the code. The line print ("The same" if Aux.mystring==Aux.mystring2 else "Different") should be print ("The same" if Aux.mystring==Aux.compare else "Different") Sorry for that. On Fri, Nov 30, 2007 at 01:13:39PM -, Alan Gauld wrote: >

Re: [Tutor] PyQt segfault

2007-11-30 Thread Alan Gauld
"Tiago Saboga" <[EMAIL PROTECTED]> wrote > I am making a front-end to ffmpeg with pyqt and I am stuck in a > segmentation fault I can't understand. I have written a little > def main(args): >app = QtGui.QApplication(args) >win = Combobox() >win.show() >app.exec_() > >print typ

Re: [Tutor] parsing a continuous log file

2007-11-30 Thread bhaaluu
On Nov 29, 2007 3:28 PM, ray sa <[EMAIL PROTECTED]> wrote: > Hello > > I need some help. I am working with a program that dumps a continuous file > while the program is running. This file contains loads of information and I > am only looking for a small amount of the data. > > I have written the pr

[Tutor] PyQt segfault

2007-11-30 Thread Tiago Saboga
Hi! I am making a front-end to ffmpeg with pyqt and I am stuck in a segmentation fault I can't understand. I have written a little dialogbox just to show the problem. I have already found a workaround, commented out in the code, but I would like to know where is the problem. I am sending the pyui