Re: Temporary but named file with BSDDB

2010-06-13 Thread Tim Pinkawa
On Sun, Jun 13, 2010 at 11:01 PM, Jason wrote: > I'd like to use the BSDDB module in an app (intended only for GNU/ > Linux like OSes). > > I don't need the on-disk file to hang around after I've used it. So as > per the docs I gave it "None" for the filename. > > The problem is, it creates the te

Re: RE - Parsing ipconfig /all output - question

2010-06-06 Thread Tim Pinkawa
On Sun, Jun 6, 2010 at 10:47 PM, joblack wrote: > I'm trying to get the first MAC address from the ipconfig /all output. > Unfortunately you can't just search for Physical Address because the > name is only valid in the English Windows version. > Any ideas? (accidentally sent original to Johanne

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 2:31 PM, Tim Pinkawa wrote: > I am curious about it being slow, though. Is there a faster way to get > the contents of a directory than os.listdir() or is there a faster way > to see if an element is in a list other than "x in y"? I believe > 'wh

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 2:17 PM, Christian Heimes wrote: > "if file in os.list()" is slow and not correct. You have to check if the > file is either a real file or a symlink to a file and not a directory or > special. Then you have to verify that the file has the executable bit, too. I realize fou

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 12:54 PM, destroy wrote: > Hi, > I'm looking for a Python library function that provides the same > functionality as the `which' command--namely, search the $PATH > variable for a given string and see if it exists anywhere within. I > currently examine the output from `

Re: How to extract some text?

2009-03-08 Thread Tim Pinkawa
On Sun, Mar 8, 2009 at 5:18 PM, Oltmans wrote: > I'm at a loss to figure out how to extract some text from a string. > Here is a string: > > setTimeout("location.href='http://youtube.example.com/login.aspx'", > 5000); > > and I want to only retrieve the URL from above i.e I only want this > http:/