Re: formatted input

2010-09-07 Thread Kenny Meyer
ords1") match_2 = re.compile("^words2") # Return a match object each re.match(match_1, "word11") re.match(match_2, "word21") I'm sure there are might be other ways to do the same thing. -- - Kenny Meyer To understand recursion, we must first understand recursion. -- -- http://mail.python.org/mailman/listinfo/python-list

Re: cscope like source code navigation for python code

2010-08-08 Thread Kenny Meyer
an option. > Unfortunately it is from 2006 and reported (and aborted) on a syntax > error of one of my files. > > My file is running and passes pylint / pychecker. > > So I'm afraid, that the code might be outdated. > I'll investigte perhaps a little more. I wonder

Re: Check if a command is valid

2010-07-14 Thread Kenny Meyer
On Jul 13, 4:14 pm, Hans Mulder wrote: > Chris Rebert wrote: > > `where` seems to be a zsh built-in: > > $ # I'm in UR bash > > $ nonexistent > > -bash: nonexistent: command not found > > $ where bash > > -bash: where: command not found > > > And not everyone has zsh installed, so... > > I don't s

Re: Check if a command is valid

2010-07-13 Thread Kenny Meyer
Chris Rebert (c...@rebertia.com) wrote: > On Mon, Jul 12, 2010 at 6:29 PM, Kenny Meyer wrote: > > Hello, > > > > I have to figure out if a string is callable on a Linux system. I'm > > "callable" seems vague. Is a command string with invalid arguments

Check if a command is valid

2010-07-12 Thread Kenny Meyer
Hello, I have to figure out if a string is callable on a Linux system. I'm actually doing this: def is_valid_command(command): retcode = 100 # initialize if command: retcode = subprocess.call(command, shell=True) if retcode is 0: print "Valid co

Re: plac, the easiest command line arguments parser in the world

2010-06-04 Thread Kenny Meyer
On Jun 2, 12:37 am, Michele Simionato wrote: > I would like to announce to the world the first public release of > plac: > >  http://pypi.python.org/pypi/plac > > Plac is a wrapper over argparse and works in all versions of > Python starting from Python 2.3 up to Python 3.1. > > With blatant immod