Re: [Tutor] Invoking bash from within a python program

2005-08-14 Thread joe_schmoe
Danny Yoo wrote: > > On Sat, 13 Aug 2005, Vinay Reddy wrote: > > >>>Anyway, how do I call bash to run a program - e.g. slocate - from >>>within a python program. I believe that I have to import the OS first >>>(or do I?) and I was thinking something like: >>> >>>... >>>sh slocate file_name > pyt

[Tutor] Invoking bash from within a python program

2005-08-13 Thread joe_schmoe
Hi Pythoneers I'm sure that somewhere in the dim and distant past this was asked, but I'll be b***ered if I can find reference to it, and google searches haven't been too illuminating yet. Anyway, how do I call bash to run a program - e.g. slocate - from within a python program. I believe that

Re: [Tutor] TKinter and things over Linux

2005-04-16 Thread joe_schmoe
Alberto Troiano wrote: Hi everyone Sorry to bother you again but I don't know where else to go I recently switch to Linux Red Hat AS 3.0 because I have to make a daemon to run in this OS and I'm having a few problems I've struggle to replace Python 2.2(machine default) to 2.3.4 (tough but c

Re: [Tutor] New to programming question (Ben M.) (Joseph Q.)

2005-04-14 Thread joe_schmoe
Joseph Quigley wrote: if letter == 'O': >print letter + 'u' + suffix >elif 'Q': >print letter + 'u' + suffic >else: >print letter + suffix > >Do you see? The == "binds more tightly" than the or. And, in python, 'Q' is >considered True for the purposes of tests. > >So t

Re: how to run a programm after you have typed in the commands (was Re: [Tutor] help (fwd))

2005-04-13 Thread joe_schmoe
Ben Vinger wrote: It sounds like you've been using the Python interactive prompt such as IDLE. You can type the same Python statements you've used there into a text editor or Python IDE and save it. Let's say you have created a Python program/script called hello.py in a text editor and saved it.

Re: [Tutor] Python starting books

2005-04-12 Thread joe_schmoe
Alexis wrote: Hi, i would like to know if someone could recommend me some books to get started not only the first book to read but if possible a few to continue learning also. thnx in advance ___ Hi Alexis Books I found really helpful were/are: Magnus Lie

Re: [Tutor] re: IDLE

2005-04-09 Thread joe_schmoe
Kevin wrote: Is there a way to get line numbers to show in python IDLE? I looked at all the preferances but nothing? Thanks Kevin ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor Not that I am aware of, although when y

Re: [Tutor] Recursive list checking

2005-04-08 Thread joe_schmoe
Rick Muller wrote: On Apr 8, 2005, at 11:37 AM, [EMAIL PROTECTED] wrote: From: joe_schmoe <[EMAIL PROTECTED]> For example, this is what I am currently doing: =code block # generate unique numbers and append to list nmbr01 = random.randrange(

Re: [Tutor] comparison function/built-in needed

2005-04-08 Thread joe_schmoe
Kent Johnson wrote: joe_schmoe wrote: Greetings I am attempting to compare the items in two lists across two criteria - membership and position. For example: list_a = [ 0, 4, 3, 6, 8 ] list_b = [ 1, 8, 4, 6, 2 ] Membership = There are 3 items that are common to both lists, that is 3 items in

[Tutor] Recursive list checking

2005-04-08 Thread joe_schmoe
Dear Pythonites I am looking for a more elegant solution to a piece of code that is too unwieldy and reptitive. The purpose of the code is for a new addition to a list to check whether it is a duplicate of a list element already a member of that list, and if so to regenerate itself randomly and

Re: [Tutor] comparison function/built-in needed

2005-04-06 Thread joe_schmoe
Kent Johnson wrote: joe_schmoe wrote: Greetings I am attempting to compare the items in two lists across two criteria - membership and position. For example: list_a = [ 0, 4, 3, 6, 8 ] list_b = [ 1, 8, 4, 6, 2 ] Membership = There are 3 items that are common to both lists, that is 3 items in

[Tutor] comparison function/built-in needed

2005-04-06 Thread joe_schmoe
Greetings I am attempting to compare the items in two lists across two criteria - membership and position. For example: list_a = [ 0, 4, 3, 6, 8 ] list_b = [ 1, 8, 4, 6, 2 ] Membership = There are 3 items that are common to both lists, that is 3 items in list_a have membership in list_b (viz: 4,