pythonw.exe or python.exe?

Long story short: pythonw.exe does nothing, python.exe accepts nothing (which one should I use?) test.py: print “a” CMD window: C:\path>pythonw.exe test.py <BLANK LINE> C:\path> C:\path>python.exe test.py File “C:\path\test.py”, line 7 print “a” ^ SyntaxError: invalid syntax C:\path> Please tell me what I’m doing terrible wrong. 6 Answers 6

What is the meaning of “Failed building wheel for X” in pip install?

This is a truly popular question here at SO, but none of the many answers I have looked at, clearly explain what this error really mean, and why it occurs. One source of confusion, is that when (for example) you do pip install pycparser, you first get the error: Failed building wheel for pycparser which … Read more

What is `1..__truediv__` ? Does Python have a .. (“dot dot”) notation syntax?

I recently came across a syntax I never seen before when I learned python nor in most tutorials, the .. notation, it looks something like this: f = 1..__truediv__ # or 1..__div__ for python 2 print(f(8)) # prints 0.125 I figured it was exactly the same as (except it’s longer, of course): f = lambda … Read more

“Permission Denied” trying to run Python on Windows 10

Seems as though an update on Windows 10 overnight broke Python. Just trying to run python –version returned a “Permission Denied” error. None of the three updates; KB4507453, KB4506991, or KB4509096 look like they’d be the culprit but the timing of the issue is suspicious. Rather than messing with rolling back, I’m hoping there’s a … Read more

Pipenv: Command Not Found

I’m new to Python development and attempting to use pipenv. I ran the command pip install pipenv, which ran successfully: … Successfully built pipenv pathlib shutilwhich pythonz-bd virtualenv-clone Installing collected packages: virtualenv, pathlib, shutilwhich, backports.shutil-get-terminal-size, pythonz-bd, virtualenv-clone, pew, first, six, click, pip-tools, certifi, chardet, idna, urllib3, requests, pipenv … However, when I run the command … Read more

DeprecationWarning: invalid escape sequence – what to use instead of \d?

I’ve met a problem with re module in Python 3.6.5. I have this pattern in my regular expression: ‘\\nRevision: (\d+)\\n’ But when I run it, I’m getting a DeprecationWarning. I searched for the problem on SO, and haven’t found the answer, actually – what should I use instead of \d+? Just [0-9]+ or maybe something … Read more