Ticket #3096: testcase.py
| File testcase.py, 364 bytes (added by niemeyer, 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | from twisted.internet.glib2reactor import install |
| 2 | install() |
| 3 | from twisted.internet.utils import getProcessOutput |
| 4 | from twisted.internet import reactor |
| 5 | |
| 6 | |
| 7 | def main(): |
| 8 | def print_output(output): |
| 9 | print output |
| 10 | result = getProcessOutput("/bin/ls", args=["/"]) |
| 11 | result.addCallback(print_output) |
| 12 | reactor.run() |
| 13 | |
| 14 | |
| 15 | if __name__ == "__main__": |
| 16 | main() |
| 17 |
