All Questions
22
questions
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 ...
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 ...
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 ...
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 ...
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 ...
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;
...
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 ...
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 ...
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 ...
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 ...
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....
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 ...
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" ...
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 ...
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 ...