windows-console

python can't find file when running script from command promt; it works when ran in pycharm

python can't find file when running script from command promt; it works when ran in pycharm Question: This is my code: import os print(list(os.listdir(‘test’))) When I run the code in Pycharm it outputs the following: [‘test.txt’] However, when I run the same file with windows command prompt I get this output: (MLspraak) C:Usersphili>python C:UsersphiliPycharmProjectsMLspraaktest.py Traceback …

Total answers: 1

The 'typing' package is an obsolete backport of a standard library package and is incompatible with PyInstaller

The 'typing' package is an obsolete backport of a standard library package and is incompatible with PyInstaller Question: When I try to convert my python file to exe using pyinstaller. Input: PS C:UsersUserDesktopНовая папка (5)> pyinstaller -F send.py I got this error. Output: The ‘typing’ package is an obsolete backport of a standard library package …

Total answers: 3

Is there a way to change the console code page from within Python?

Is there a way to change the console code page from within Python? Question: When I type chcp 65001 in the command prompt it changes the active code page. How do I accomplish the same thing from within Python itself? For example, every time I run my .py program, it should automatically change the code …

Total answers: 2

How to get both REPL/arrow key functionality and Unicode characters working with Python3 under Git Bash/WinPTY

How to get both REPL/arrow key functionality and Unicode characters working with Python3 under Git Bash/WinPTY Question: Windows 7, restricted user account running Git git version 2.14.1.windows.1 MINGW/MSYS MINGW64_NT-6.1 REDACTED 2.8.2(0.313/5/3) 2017-07-12 15:35 x86_64 Msys Python Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32 locale has been set: $ …

Total answers: 1

How to use the new support for ANSI escape sequences in the Windows 10 console?

How to use the new support for ANSI escape sequences in the Windows 10 console? Question: The latest Windows 10 updates include support for ANSI escape sequences in conhost.exe. I have been able to confirm that the escape sequences are properly picked up in cmd.exe, so I have the necessary updates. In particular, I tried …

Total answers: 4