access __doc__ from within function without reference to function name

2007-10-02 Thread SanPy
The subject of this message might be a little cryptic, so here's an example of what I mean: def foo(): """doc string of foo""" print foo.__doc__ >>> foo() doc string of foo What I want to know is whether it is possible to call __doc__ against some builtin method, like __func__ or somethi

python command-line interface for GitHub Issues v2

2009-04-29 Thread SanPy
Hi, For those of you that are using GitHub, you might want to check out a package that I've written in Python. It is a command-line interface to the recently released GitHub Issues API v2. You can find it here: http://github.com/jsmits/github-cli Here are some examples of what you can do: ghi li

writing consecutive data to subprocess command 'more'

2009-05-02 Thread SanPy
I have this method that prints a given text via a subprocess command 'more' . It is like this: def print_by_page(text): if hasattr(sys.stdout, 'isatty') and sys.stdout.isatty(): viewer = 'more -EMR' proc = subprocess.Popen([viewer], shell=True, stdin=subprocess.PIPE,

Re: writing consecutive data to subprocess command 'more'

2009-05-02 Thread SanPy
Thanks, that works beautifully! Regards, Sander On 2 mei, 22:35, "Gabriel Genellina" wrote: > En Sat, 02 May 2009 15:53:17 -0300, SanPy escribió: > > > > > > > I have this method that prints a given text via a subprocess command > > 'more

Re: writing consecutive data to subprocess command 'more'

2009-05-03 Thread SanPy
e fallback sys.stdout does show output? --- Sander On 2 mei, 23:00, SanPy wrote: > Thanks, that works beautifully! > > Regards, > Sander > > On 2 mei, 22:35, "Gabriel Genellina" wrote: > > > communicate writes to the child's stdin and waits for it to finish. If y