pyallel 0.12.0__tar.gz → 0.12.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyallel
3
- Version: 0.12.0
3
+ Version: 0.12.2
4
4
  Summary: Run and handle the output of multiple executables in pyallel (as in parallel)
5
5
  Home-page: https://github.com/Danthewaann/pyallel
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyallel"
3
- version = "0.12.0"
3
+ version = "0.12.2"
4
4
  description = "Run and handle the output of multiple executables in pyallel (as in parallel)"
5
5
  authors = ["Daniel Black <danielcrblack@gmail.com>"]
6
6
  license = "MIT"
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import sys
3
3
 
4
- IN_TTY = sys.__stdin__.isatty()
4
+ IN_TTY = sys.stdout.isatty()
5
5
 
6
6
 
7
7
  if IN_TTY:
@@ -16,15 +16,6 @@ from dataclasses import dataclass, field
16
16
  from pyallel.errors import InvalidExecutableErrors, InvalidExecutableError
17
17
 
18
18
 
19
- def get_num_lines(output: str, columns: int | None = None) -> int:
20
- lines = 0
21
- columns = columns or constants.COLUMNS()
22
- for line in output.splitlines():
23
- length = len(line)
24
- lines += 1 * (length % columns + 1 if length > columns else 1)
25
- return lines
26
-
27
-
28
19
  def prefix(output: str, keepend: bool = True) -> str:
29
20
  prefixed_output = "\n".join(
30
21
  f"{constants.DIM_ON}=>{constants.DIM_OFF} {line}{constants.RESET_COLOUR}"
@@ -367,10 +358,10 @@ class Process:
367
358
  self._fd = open(fd_name, "rb")
368
359
  self._process = subprocess.Popen(
369
360
  [self.name, *self.args],
361
+ stdin=subprocess.DEVNULL,
370
362
  stdout=fd,
371
363
  stderr=subprocess.STDOUT,
372
364
  env=self.env,
373
- # shell=True,
374
365
  )
375
366
 
376
367
  def __del__(self) -> None:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes