pipes

2007-09-10 Thread yagyala
Hi. I'm trying to communicate with a c++ executable via pipes. I prefer not to use forks because I want it to work on windows. In python the code looks roughly like: (r,w) = pipes() spawnl(P_WAIT, 'tool.exe', 'dummy', message, str(w)) close(w) print os.read(r, 1000) close r and in c++ int main (

pipes

2007-09-10 Thread yagyala
Hi. I'm rtying to use pipes to communicate between a python GUI and a spawned C++ program. I prefer not to use forking because the app may be run on windows, where forking isn't supported. Roughly what I'm doing is: (r,w) = os.pipe() spawnl(P_WAIT, 'tool.exe', ' ', message, str(w)) close(w) print

introspection and functions

2007-08-22 Thread yagyala
Hi. I would like to be able to tell, at run time, how many parameters a function requires. Ideally I would like to be able to tell which are optional as well. I've tried looking at the functions attributes, but haven't found one that helps in this. How can I do this? Thanks -- http://mail.python

desperately in need of a tool

2007-08-19 Thread yagyala
Hi. I recently started working for a company that has just implemented its first set of software standards. So far, so good. Here's the problem: one of those standards is that the comments for each routine must indicate every other routine that it calls. As I try to keep my routines small, and fac