Modify ↓
Opened 16 years ago
Closed 15 years ago
#3728 closed enhancement (wontfix)
os.popen3 usage cause lags in launch() function
Reported by: | franck34 | Owned by: | Peter Kropf |
---|---|---|---|
Priority: | high | Component: | GraphvizPlugin |
Severity: | normal | Keywords: | mod_python, popen, subprocess |
Cc: | Trac Release: | 0.10 |
Description
Commands launched by launch() function are working, but a lag of 20/30 sec occur after when using apache2+mod_python
Here is my fix, don't know if it's good or not, but it's working for me :
def launch(self, cmd, input): """Launch a process (cmd), and returns exitcode, stdout + stderr""" p = subprocess.Popen(cmd, shell=True,stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (p_in, p_out, p_err) = (p.stdin, p.stdout, p.stderr) if input: p_in.write(input) p_in.close() out = p_out.read() err = p_err.read() p.wait() p_err.close() p_out.close() return out, err
Attachments (0)
Change History (3)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Not until change adopted, as you said about subprocess, or this patch applied.
Should be great to have the feedback of pkropf too .
Regards
comment:3 Changed 15 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Works fine in the 0.11 version.
The maintenance of the 0.10 version of the plugin is up for adoption...
Note: See
TracTickets for help on using
tickets.
subprocess
is now used for the 0.11 version of the plugin. I don't know really, but it seems unlikely that the 0.10 version will adopt this change.Closing as worksforme?