Skip to main content

All Questions

0 votes
2 answers
57 views

How can I have a colored Powershell prompt and still have conda env label?

When I add the code below to C:\Users\USERFOLDER\Documents\PowerShell\Microsoft.PowerShell_profile.ps1: function prompt { $ESC = [char]27 "$ESC[46mPS $($executionContext.SessionState....
Homero Esmeraldo's user avatar
6 votes
2 answers
772 views

Are there commands in PowerShell 7 to split the current window into four and request to run Python files in each of them?

Currently, I click + 3x while holding Alt to create four divided terminals within the same tab: In each of these, I need to run a different Python commnd: cd "C:\Users\Computador\Desktop\Test ...
Digital Farmer's user avatar
0 votes
1 answer
208 views

Python Can Run with Typing "python.exe" Rather Typing "python"

I have added python to env on PATH correctly C:\Users\username\AppData\Local\Programs\Python\Python38\ But now I need to type python.exe to start it rather than typing python like before And it will ...
Michael's user avatar
0 votes
3 answers
748 views

How can I monitor a specific directory in Windows 11 to see when a new file is added?

I have a shared folder within my company that often gets new builds added to it. It is my job to do QA on the builds in that folder but I am getting tired of just having to check the folder every day ...
Luke's user avatar
  • 101
0 votes
0 answers
180 views

Windows 11 on 16 core processor reduces CPU utilization when minimizing python processing console window - WHY?

I have a weird issue when doing long term image processing on my 16 core 24 thread i7 13700k processor, on windows 11 pro. My processing lasts for hours so I fire up several python scripts in ...
Erik Groen's user avatar
1 vote
1 answer
1k views

How to use `python` again in windows PowerShell?

As of yesterday I could run a python command like python code.py on a windows 10 powershell command line. After an update this does not work anymore and I get an error Python was not found; run ...
Alex's user avatar
  • 452
2 votes
2 answers
8k views

Looking to 'hide' a window by sending it to background or 'detatching' it from another window

I've compiled a little python program and it has this window open (cmd console) and I would like to make it a background task or just hide it from the user somehow. Yes I am aware that I can compile ...
NedNoodleHead's user avatar
1 vote
0 answers
436 views

How is miniconda getting added to my powershell $env:path?

When I check my user and system PATH variables, neither of them has the Miniconda path included. However, if I open up a powershell prompt and run echo $env:path I see that this includes the contents ...
user32882's user avatar
  • 207
0 votes
1 answer
1k views

Is it possible to control a PC through Python/Powershell using RDP or VNC?

I'm writing a script to perform some actions (e.g: execute scripts, copy/paste/rename etc) on a remote machine. The remote machine only has RDP, VNC and FTP activated. I can perform all the above ...
Farahi's user avatar
  • 1
0 votes
1 answer
326 views

PS2Exe to run Python Script Doesn't Print Color (Colorama)

I want some of my Python scripts on Windows to have a custom icon, have their filename text in the title bar, and I want them to be pinnable to the taskbar and start menu. The easiest way to do this, ...
EllipticalInitial's user avatar
1 vote
1 answer
617 views

Windows Powershell using python Ping instead of default

I am trying to run a ping using windows powershell, but this is the result: ping google.com Traceback (most recent call last): File "C:\Program Files\Python36\Scripts\ping.py", line 31, in ...
Ale1794's user avatar
  • 125
0 votes
2 answers
8k views

Cannot find pip on PowerShell

I am trying to install a package for python and I'm following the "installing packages" on the python documentation in order to do so. First it asks me to check that I have python on my computer. I'm ...
Espen Sales's user avatar
0 votes
2 answers
448 views

Windows PowerShell returns error for "python --version" even though I have it installed

For a very long time I've used python to code. I installed Anaconda and I use Visual Studio Code to write the code. I want to download a new package using pip, and following the "Installing packages" ...
Espen Sales's user avatar
0 votes
0 answers
879 views

How to capture python interactive session on command line in windows?

I'd like to "log" all of the text (python shell prompts, my commands, python shell output) that displays on my console window after I start the python shell. I read about powershell's Tee-Object but ...
Minh Tran's user avatar
  • 101
1 vote
2 answers
6k views

Run Python Script with Powershell by default instead of Cmd (Windows 10)

I'm on Windows 10 using Python 3.6, and I notice that whenever I double click on a Python file (for example, from File Explorer): It runs inside a command prompt window! I would prefer if it were to ...
EllipticalInitial's user avatar
1 vote
1 answer
1k views

Push-Location in Powershell not working the same as PUSHD in bat

EDIT: Alt title: New-PSDrive in Powershell not working the same as NET USE in bat I'm trying to load a python script in WinPython off a UNC Path, so I need to map it to a drive. I have all this ...
Geordie's user avatar
  • 474
-1 votes
1 answer
13k views

Python 3.6 does not run on Windows 10

Using Windows 10. First I uninstall any existing versions of Python 3 or Python 2.0 https://www.python.org/ftp/python/3.6.0/python-3.6.0-amd64.exe Then I run the above program, Windows seems to ...
Duke Dougal's user avatar
0 votes
1 answer
781 views

Is there a way to auto-run a script when entering a directory in powershell?

I have multiple folders containing different python projects. Each project has its own virtual environment that I activate before working on it. I activate the virtual environment by running in the ...
hazrmard's user avatar
  • 205
0 votes
0 answers
1k views

What is the difference in Windows CMD and PowerShell redirection and text Encoding?

Granted, this is not a great title, but to be honest I was unsure how to word the question without posting an essay as the question. This description should add some flesh. Problem: I have a Python ...
Swinster's user avatar
0 votes
1 answer
1k views

How can I rename all image files within a directory (and recursively within its subdirectories)?

I have a directory containing a large number of image files, some of which are in subdirectories. I need to rename all image files matching *.png, *.jpg, *.jpeg, *.bmp, *.gif using a simple pattern ...
enzom83's user avatar
  • 591
1 vote
1 answer
995 views

Split large text file according to record values

There are some questions alike in this site, but mine is a bit different. I have a 30 GB text file, and I need to split it into smaller files according to the different record values. For example; ...
Mehmet Balioglu's user avatar
2 votes
1 answer
29k views

pip is not recognized as an internal or external command

I have installed pip and distribute, and no errors came up. But when I enter pip into the cmd or windows powershell, it gives me an error. However, when I import pip into python, no errors come up. I ...
XXXBIGBOY's user avatar