@@ -516,8 +516,20 @@ functions.
516
516
517
517
If given, *startupinfo * will be a :class: `STARTUPINFO ` object, which is
518
518
passed to the underlying ``CreateProcess `` function.
519
- *creationflags *, if given, can be :data: `CREATE_NEW_CONSOLE ` or
520
- :data: `CREATE_NEW_PROCESS_GROUP `. (Windows only)
519
+ *creationflags *, if given, can be one or more of the following flags:
520
+
521
+ * :data: `CREATE_NEW_CONSOLE `
522
+ * :data: `CREATE_NEW_PROCESS_GROUP `
523
+ * :data: `ABOVE_NORMAL_PRIORITY_CLASS `
524
+ * :data: `BELOW_NORMAL_PRIORITY_CLASS `
525
+ * :data: `HIGH_PRIORITY_CLASS `
526
+ * :data: `IDLE_PRIORITY_CLASS `
527
+ * :data: `NORMAL_PRIORITY_CLASS `
528
+ * :data: `REALTIME_PRIORITY_CLASS `
529
+ * :data: `CREATE_NO_WINDOW `
530
+ * :data: `DETACHED_PROCESS `
531
+ * :data: `CREATE_DEFAULT_ERROR_MODE `
532
+ * :data: `CREATE_BREAKAWAY_FROM_JOB `
521
533
522
534
Popen objects are supported as context managers via the :keyword: `with ` statement:
523
535
on exit, standard file descriptors are closed, and the process is waited for.
@@ -803,8 +815,8 @@ on Windows.
803
815
:class: `Popen ` is called with ``shell=True ``.
804
816
805
817
806
- Constants
807
- ^^^^^^^^^
818
+ Windows Constants
819
+ ^^^^^^^^^^^^^^^^^
808
820
809
821
The :mod: `subprocess ` module exposes the following constants.
810
822
@@ -851,6 +863,84 @@ The :mod:`subprocess` module exposes the following constants.
851
863
852
864
This flag is ignored if :data: `CREATE_NEW_CONSOLE ` is specified.
853
865
866
+ .. data :: ABOVE_NORMAL_PRIORITY_CLASS
867
+
868
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
869
+ will have an above average priority.
870
+
871
+ .. versionadded :: 3.7
872
+
873
+ .. data :: BELOW_NORMAL_PRIORITY_CLASS
874
+
875
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
876
+ will have a below average priority.
877
+
878
+ .. versionadded :: 3.7
879
+
880
+ .. data :: HIGH_PRIORITY_CLASS
881
+
882
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
883
+ will have a high priority.
884
+
885
+ .. versionadded :: 3.7
886
+
887
+ .. data :: IDLE_PRIORITY_CLASS
888
+
889
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
890
+ will have an idle (lowest) priority.
891
+
892
+ .. versionadded :: 3.7
893
+
894
+ .. data :: NORMAL_PRIORITY_CLASS
895
+
896
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
897
+ will have an normal priority. (default)
898
+
899
+ .. versionadded :: 3.7
900
+
901
+ .. data :: REALTIME_PRIORITY_CLASS
902
+
903
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
904
+ will have realtime priority.
905
+ You should almost never use REALTIME_PRIORITY_CLASS, because this interrupts
906
+ system threads that manage mouse input, keyboard input, and background disk
907
+ flushing. This class can be appropriate for applications that "talk" directly
908
+ to hardware or that perform brief tasks that should have limited interruptions.
909
+
910
+ .. versionadded :: 3.7
911
+
912
+ .. data :: CREATE_NO_WINDOW
913
+
914
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
915
+ will not create a window
916
+
917
+ .. versionadded :: 3.7
918
+
919
+ .. data :: DETACHED_PROCESS
920
+
921
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
922
+ will not inherit its parent's console.
923
+ This value cannot be used with CREATE_NEW_CONSOLE.
924
+
925
+ .. versionadded :: 3.7
926
+
927
+ .. data :: CREATE_DEFAULT_ERROR_MODE
928
+
929
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
930
+ does not inherit the error mode of the calling process. Instead, the new
931
+ process gets the default error mode.
932
+ This feature is particularly useful for multithreaded shell applications
933
+ that run with hard errors disabled.
934
+
935
+ .. versionadded :: 3.7
936
+
937
+ .. data :: CREATE_BREAKAWAY_FROM_JOB
938
+
939
+ A :class: `Popen ` ``creationflags `` parameter to specify that a new process
940
+ is not associated with the job.
941
+
942
+ .. versionadded :: 3.7
943
+
854
944
.. _call-function-trio :
855
945
856
946
Older high-level API
0 commit comments