Re: [Tutor] More Pythonesque or a more efficient method

2008-10-07 Thread W W
On Tue, Oct 7, 2008 at 5:58 PM, Emile van Sebille <[EMAIL PROTECTED]> wrote: > Robert Berman wrote: > >> Hi, >> >> The below script which prints anagrams available for any word available >> within a given database. It does work, but it is not very fast. I am >> relatively certain there are more P

Re: [Tutor] Batch searches on Googlescholar

2008-10-07 Thread W W
On Tue, Oct 7, 2008 at 5:42 PM, Srinivas Iyyer <[EMAIL PROTECTED]>wrote: > Dear Tutors, > This might ben off track question, but I am asking to seek help from > experts here. > > I have a list of (n = 240) research publications (Biology and medicine). I > have title, journal name and PubMedID. > >

Re: [Tutor] More Pythonesque or a more efficient method

2008-10-07 Thread Emile van Sebille
Robert Berman wrote: Hi, The below script which prints anagrams available for any word available within a given database. It does work, but it is not very fast. I am relatively certain there are more Python friendly coding techniques but I am more concerned with a faster algorithm. You mig

[Tutor] Batch searches on Googlescholar

2008-10-07 Thread Srinivas Iyyer
Dear Tutors, This might ben off track question, but I am asking to seek help from experts here. I have a list of (n = 240) research publications (Biology and medicine). I have title, journal name and PubMedID. my aim is to identify how many times each publication got cited on google Scholar

Re: [Tutor] cx_oracle module problems

2008-10-07 Thread Hansen, Mike
>>Got it. Thanks. >> >>When i try 'python setup.py build' i get the following error. >> >>$ sudo python setup.py build >> >>Traceback (most recent call last): >> >> File "setup.py", line 72, in >> raise DistutilsSetupError, "cannot locate an Oracle software >>installation" >>distutils

Re: [Tutor] cx_oracle module problems

2008-10-07 Thread jeremiah
I'm working on a shared box and was told it was installed. How can i verify installation? 'which oracle' does not return any results. Also, nothing in /etc/init.d or /usr/bin JJ On Tue, 2008-10-07 at 14:32 -0700, W W wrote: > On Tue, Oct 7, 2008 at 4:30 PM, jeremiah > <[EMAIL PROTECTED]> wrote:

Re: [Tutor] cx_oracle module problems

2008-10-07 Thread W W
On Tue, Oct 7, 2008 at 4:30 PM, jeremiah <[EMAIL PROTECTED]>wrote: > Got it. Thanks. > > When i try 'python setup.py build' i get the following error. > > $ sudo python setup.py build > Traceback (most recent call last): > File "setup.py", line 72, in >raise DistutilsSetupError, "cannot loc

Re: [Tutor] cx_oracle module problems

2008-10-07 Thread jeremiah
Got it. Thanks. When i try 'python setup.py build' i get the following error. $ sudo python setup.py build Traceback (most recent call last): File "setup.py", line 72, in raise DistutilsSetupError, "cannot locate an Oracle software installation" distutils.errors.DistutilsSetupError: cannot

Re: [Tutor] cx_oracle module problems

2008-10-07 Thread Alan Gauld
"jeremiah" <[EMAIL PROTECTED]> wrote port for Ubuntu. Is there one? Anyone know how to get this properly installed? # sudo python setup.py install File "/usr/lib/python2.5/UserDict.py", line 22, in __getitem__ raise KeyError(key) KeyError: 'ORACLE_HOME' Given the error message, do you ha

Re: [Tutor] Monitoring HTTP connections?

2008-10-07 Thread Kent Johnson
On Tue, Oct 7, 2008 at 3:06 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > on proxy programs: > i want to sniff the http requests that are being made internally from a > program I have no control over, so a proxy server won't work, because I > can't make the program access the internet through a proxy,

Re: [Tutor] More Pythonesque or a more efficient method

2008-10-07 Thread Robert Berman
Yet another approach to experiment with. Thank you all very much, Robert Kent Johnson wrote: On Tue, Oct 7, 2008 at 1:15 PM, Richard Lovely <[EMAIL PROTECTED]> wrote: In a slightly related matter, Is is possible to use all() with a list comprehension to check if a word contains a

Re: [Tutor] cx_oracle module problems

2008-10-07 Thread Jerry Hill
On Tue, Oct 7, 2008 at 2:46 PM, jeremiah <[EMAIL PROTECTED]> wrote: > I've downloaded the cx_oracle source module for python, howerver every > time i try to build it, it keeps on failing. I've been unable to find a > port for Ubuntu. Is there one? Anyone know how to get this properly > installed? >

Re: [Tutor] cx_oracle module problems

2008-10-07 Thread Hansen, Mike
> Subject: [Tutor] cx_oracle module problems > > I've downloaded the cx_oracle source module for python, howerver every > time i try to build it, it keeps on failing. I've been unable > to find a > port for Ubuntu. Is there one? Anyone know how to get this properly > installed? > > # sudo pyt

Re: [Tutor] Monitoring HTTP connections?

2008-10-07 Thread xbmuncher
on proxy programs: i want to sniff the http requests that are being made internally from a program I have no control over, so a proxy server won't work, because I can't make the program access the internet through a proxy, its not a browser that is making the requests Perhaps, you can tell me the

[Tutor] cx_oracle module problems

2008-10-07 Thread jeremiah
I've downloaded the cx_oracle source module for python, howerver every time i try to build it, it keeps on failing. I've been unable to find a port for Ubuntu. Is there one? Anyone know how to get this properly installed? # sudo python setup.py install Traceback (most recent call last): File "se

Re: [Tutor] Default parameter in class method

2008-10-07 Thread Daniele
2008/10/7 Kent Johnson <[EMAIL PROTECTED]>: > On Tue, Oct 7, 2008 at 10:08 AM, Daniele <[EMAIL PROTECTED]> wrote: > def myMethod(self, parameter=_marker): > if parameter==_marker: >parameter = self.field Thanks Kent and Alan, I've understood the point and I think I'll use Kent's solution :) _

Re: [Tutor] More Pythonesque or a more efficient method

2008-10-07 Thread Kent Johnson
On Tue, Oct 7, 2008 at 1:15 PM, Richard Lovely <[EMAIL PROTECTED]> wrote: > In a slightly related matter, Is is possible to use all() with a list > comprehension to check if a word contains all of the letters of > another? Sure. In [1]: all(letter in 'abcde' for letter in 'cde') Out[1]: True In

[Tutor] pexpect/pxssh

2008-10-07 Thread Vinay Reddy
Hi, I wish to automate some of my network related tasks, which involves sshing into a remote box and executing some commands. I looked at pxssh for that purpose but it seems to throw an exception when I have ssh keys setup so that logins can happen without explicit password authentication. Is ther

Re: [Tutor] More Pythonesque or a more efficient method

2008-10-07 Thread Richard Lovely
In a slightly related matter, Is is possible to use all() with a list comprehension to check if a word contains all of the letters of another? -- Richard "Roadie Rich" Lovely, part of the JNP|UK Famile www.theJNP.com ___ Tutor maillist - Tutor@python.

Re: [Tutor] first call - newcomer

2008-10-07 Thread Steve Willoughby
On Tue, Oct 07, 2008 at 04:23:50AM -0400, Pierre Dagenais wrote: > Anthony Smith wrote: > >1. A brief (but complete) description regarding the use of script > >editor (I will be using Place the files wherever you like, just use a .py extension on the filenames. Use any text editor you like whic

Re: [Tutor] Default parameter in class method

2008-10-07 Thread Alan Gauld
"Daniele" <[EMAIL PROTECTED]> wrote I want to create a method of a class with a default value. The problem is that this default value should be an instance field of that same class. For example: class Test(): def __init__(self): self.field='Default' def myMethod(self, parameter=self.fiel

Re: [Tutor] Default parameter in class method

2008-10-07 Thread Kent Johnson
On Tue, Oct 7, 2008 at 10:08 AM, Daniele <[EMAIL PROTECTED]> wrote: > Hi all, > I know very little about OOP in Python, I'm working on it but, for the > time being, here's my problem: > I want to create a method of a class with a default value. The problem > is that this default value should be an

[Tutor] Default parameter in class method

2008-10-07 Thread Daniele
Hi all, I know very little about OOP in Python, I'm working on it but, for the time being, here's my problem: I want to create a method of a class with a default value. The problem is that this default value should be an instance field of that same class. For example: class Test(): def __init__(

Re: [Tutor] IF statment 2

2008-10-07 Thread Kent Johnson
On Mon, Oct 6, 2008 at 10:06 PM, WM <[EMAIL PROTECTED]> wrote: > Hey, guys, forgive me; I can't help being a fool. Just now I READ the > program and it worked perfectly! 42 is more than 1 so it printed "More". > My error was that I imagined there was a loop where no loop could be. Oh, > me; oh,

Re: [Tutor] Using the curses module (or a better solution)

2008-10-07 Thread W W
On Tue, Oct 7, 2008 at 3:27 AM, Alan Gauld <[EMAIL PROTECTED]>wrote: > There are some wrappers around curses to make the learning > curve a little bit less steep. Although, personally I don't think > raw curses is all that hard... :-) > Especially not for such a simple program. Less than 100 line

Re: [Tutor] Using the curses module (or a better solution)

2008-10-07 Thread Alan Gauld
"Tony Cappellini" <[EMAIL PROTECTED]> wrote I'd like to add a 1-2 line no-scroll-area at the top of the screen, so as to print a message which indicates the progress of the current test. I'm not sure if the curses module has this non-scroll area capability. Yes, curses works by definin

[Tutor] first call - newcomer

2008-10-07 Thread Pierre Dagenais
Anthony Smith wrote: This is my first post - I will be brief... One: I have programmed before - but it has been DECADES...so just a few simple queries: 1. A brief (but complete) description regarding the use of script editor (I will be using command prompt in Windows), as: