subprocessmonkey


Namesubprocessmonkey JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/subprocessmonkey
SummaryMonkey patch for subprocess to use 8.3 filenames - Windows only (no dependencies)
upload_time2023-08-21 01:56:52
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords subprocess 8.3 subproc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Monkey patch for subprocess to use 8.3 filenames - Windows only (no dependencies)

## Tested against Windows 10 / Python 3.10 / Anaconda

## pip install subprocessmonkey

The module automatically converts long paths to their short 8.3 equivalents


```python
import subprocess
from subprocessmonkey import patch_subprocess,subprocconfig
subprocconfig.minlen = None # minimum path length - calculated automatically if None
subprocconfig.convert_to_abs_path = True # \Windows to c:\\Windows
patch_subprocess() # updates subprocess.list2cmdline and subprocess.Popen._execute_child 


# Works like a charm :)

subprocess.Popen(r"ffplay C:\Users\hansc\Videos\sdf dsf sdf .mkv")

subprocess.Popen(r'cat C:\Users\hansc\Downloads\hosts (1)')

subprocess.run('ls C:\\Program Files')
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/subprocessmonkey",
    "name": "subprocessmonkey",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "subprocess,8.3,subproc",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/51/30/937679d51b9832ae229363163b5fac773d194078651119c1e074d3f48fd1/subprocessmonkey-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# Monkey patch for subprocess to use 8.3 filenames - Windows only (no dependencies)\r\n\r\n## Tested against Windows 10 / Python 3.10 / Anaconda\r\n\r\n## pip install subprocessmonkey\r\n\r\nThe module automatically converts long paths to their short 8.3 equivalents\r\n\r\n\r\n```python\r\nimport subprocess\r\nfrom subprocessmonkey import patch_subprocess,subprocconfig\r\nsubprocconfig.minlen = None # minimum path length - calculated automatically if None\r\nsubprocconfig.convert_to_abs_path = True # \\Windows to c:\\\\Windows\r\npatch_subprocess() # updates subprocess.list2cmdline and subprocess.Popen._execute_child \r\n\r\n\r\n# Works like a charm :)\r\n\r\nsubprocess.Popen(r\"ffplay C:\\Users\\hansc\\Videos\\sdf dsf sdf .mkv\")\r\n\r\nsubprocess.Popen(r'cat C:\\Users\\hansc\\Downloads\\hosts (1)')\r\n\r\nsubprocess.run('ls C:\\\\Program Files')\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Monkey patch for subprocess to use 8.3 filenames - Windows only (no dependencies)",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/subprocessmonkey"
    },
    "split_keywords": [
        "subprocess",
        "8.3",
        "subproc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "91dcb81ce90ec162500f855d9c7265102f7bfdb56b39c7d53e8b75072d1f51f2",
                "md5": "cb204b48b25ad64401df32a07bffc107",
                "sha256": "1c5845ccd2cb930f5ed7183a513037e0cdeac42bb53de5371dd414ae5f5a8a0f"
            },
            "downloads": -1,
            "filename": "subprocessmonkey-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cb204b48b25ad64401df32a07bffc107",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7253,
            "upload_time": "2023-08-21T01:56:51",
            "upload_time_iso_8601": "2023-08-21T01:56:51.265556Z",
            "url": "https://files.pythonhosted.org/packages/91/dc/b81ce90ec162500f855d9c7265102f7bfdb56b39c7d53e8b75072d1f51f2/subprocessmonkey-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5130937679d51b9832ae229363163b5fac773d194078651119c1e074d3f48fd1",
                "md5": "7fd5342484720b8209cf78ec96b308b7",
                "sha256": "7670f4eb641017aebf8e824e3929a2294c5a1a2909d4a6e6f4fdad1359db7328"
            },
            "downloads": -1,
            "filename": "subprocessmonkey-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "7fd5342484720b8209cf78ec96b308b7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6495,
            "upload_time": "2023-08-21T01:56:52",
            "upload_time_iso_8601": "2023-08-21T01:56:52.605866Z",
            "url": "https://files.pythonhosted.org/packages/51/30/937679d51b9832ae229363163b5fac773d194078651119c1e074d3f48fd1/subprocessmonkey-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-21 01:56:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "subprocessmonkey",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "subprocessmonkey"
}
        
Elapsed time: 0.11860s