|
@@ -27,6 +27,7 @@ import python.lib.io.TextIOBase;
|
|
import python.lib.Subprocess.StartupInfo;
|
|
import python.lib.Subprocess.StartupInfo;
|
|
import python.Tuple;
|
|
import python.Tuple;
|
|
import python.Dict;
|
|
import python.Dict;
|
|
|
|
+import haxe.extern.EitherType;
|
|
|
|
|
|
typedef PopenOptions = {
|
|
typedef PopenOptions = {
|
|
?bufsize : Int,
|
|
?bufsize : Int,
|
|
@@ -47,7 +48,7 @@ typedef PopenOptions = {
|
|
@:pythonImport("subprocess", "Popen")
|
|
@:pythonImport("subprocess", "Popen")
|
|
extern class Popen {
|
|
extern class Popen {
|
|
|
|
|
|
- public static inline function create (args:Array<String>, o:PopenOptions):Popen {
|
|
|
|
|
|
+ public static inline function create (args:EitherType<String, Array<String>>, o:PopenOptions):Popen {
|
|
|
|
|
|
o.bufsize = if (Reflect.hasField(o, "bufsize")) o.bufsize else 0;
|
|
o.bufsize = if (Reflect.hasField(o, "bufsize")) o.bufsize else 0;
|
|
o.executable = if (Reflect.hasField(o, "executable")) o.executable else null;
|
|
o.executable = if (Reflect.hasField(o, "executable")) o.executable else null;
|