Last change
on this file since eac9426 was
cb9edc8,
checked in by OpenGnSys Support Team <soporte-og@…>, 4 years ago
|
ogClient is AGPLv3+
Update license header in files.
|
-
Property mode set to
100644
|
File size:
779 bytes
|
Rev | Line | |
---|
[05b1088] | 1 | # |
---|
[cb9edc8] | 2 | # Copyright (C) 2020-2021 Soleta Networks <info@soleta.eu> |
---|
[05b1088] | 3 | # |
---|
| 4 | # This program is free software: you can redistribute it and/or modify it under |
---|
| 5 | # the terms of the GNU Affero General Public License as published by the |
---|
[cb9edc8] | 6 | # Free Software Foundation; either version 3 of the License, or |
---|
| 7 | # (at your option) any later version. |
---|
[05b1088] | 8 | |
---|
[bb65bd7] | 9 | import subprocess |
---|
| 10 | import os |
---|
| 11 | |
---|
| 12 | class Client(): |
---|
| 13 | |
---|
| 14 | def __init__(self): |
---|
| 15 | self.null = open(os.devnull, 'wb') |
---|
[0ada33c] | 16 | self.proc = subprocess.Popen(['python3', 'ogclient'], |
---|
[bb65bd7] | 17 | cwd='../', |
---|
| 18 | stdout=self.null, |
---|
| 19 | stderr=self.null) |
---|
| 20 | |
---|
| 21 | def stop(self): |
---|
| 22 | self.proc.terminate() |
---|
| 23 | self.proc.kill() |
---|
| 24 | self.proc.wait() |
---|
| 25 | self.null.close() |
---|
Note: See
TracBrowser
for help on using the repository browser.