I used to be able to double click .py file and it would proivde me CMD prompt to run the script.
At the moment I have to go into Spyder each time to run the file.
What do I need to do to be able to run outside of Spyder?
Thanks
open a terminal/cmd in the directory the file is in and then write python pythonFile.py
EDIT
alternative option, open Powershell in the directory the file is in or open powershell and navigate to the directory the file is in and use this command to source a document in the current directory ./test.py
Related
I need to use CMD to open a zip file found on URL.
The default application to open zip file is WinZip.
I tried the below command with a local file on my PC and it runs correctly as expected:
"C:\Program Files (x86)\Winzip\WINZIP32.EXE" "C:\Users\xxxx\Desktop\Test.zip"
But, when I tried to use the command with an URL , I got a dialog window (Add to Archive):
"C:\Program Files (x86)\Winzip\WINZIP32.EXE" "http://xxxxxx/insp\Test.zip"
And this is expected window:
And this is a sample zip file (URL) https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-zip-file.zip
In advance, thanks for all your help.
The idea here is to make 2 .exe files run when I open only 1 of them.
I have 2 files:
F:\Gry\Riot Games\League of Legends\LeagueClient.exe
C:\Program Files (x86)\Overwolf\OverwolfLauncher.exe
When I launch LeagueClient.exe I'd like OverwolfLauncher.exe to run alongside it. Is there a way to do it?
I don't think you'll be able to modify the LeagueClient without running with any issues with the anticheat, I believe creating a bat file would be what you want.
#ECHO off
start F:\Gry\Riot Games\League of Legends\LeagueClient.exe
start C:\Program Files (x86)\Overwolf\OverwolfLauncher.exe
I cloned a laravel-8 sail project via gitlab but everywhere in every folder which containing files there is a file which ends in .Identifier
I don't know where they come from. There may be 1000 files like this in the project.
My question is:
How can I get rid of those files which endr with .Identifier?
Is there some kind of Ubuntu or docker command that searches the entire project for such file which ends in .Identifier and then deletes them?
Maybe phpStorm has such a function?
If you are on Linux machine, then open terminal in you project folder and run rm *.Identifier. And if you are on Windows machine then open command prompt in your project folder and run del *.Identifier. This will do the trick for you.
In both Hydrogen and using a plug-in terminal platform, the default directory is one folder up from where my code file resides.
E.g., I’ll be working on a file with path, say, parent/code/file.py. When I run pwd in the plug-in's terminal or the equivalent via Hydrogen in the python script I get parent/, but I need it to be parent/code/ to import files etc.
Perhaps the default directory for Atom is the project that is folder of the project that is open?
Any ideas how to change the default current directory for Atom (or is it package specific) to the file i’m working on/executing in Hydrogen?
In the hydrogen settings you can choose the location where the kernel should be started.
The default is the 'First started project's directory'. You can choose 'Current directory of the file' there, which should give you what you want.
I would like to be able to access the current working directory in my vimrc.
For example, I can access the current file by using %.
Specifically,
I have the following line in my vimrc:
map ,l :!latex %
When it runs everything works fine, except the resulting dvi and other files are stored in my home directory instead of my current working directory.
Any suggestions?
See :help autochdir. Vim can automatically change the current working directory to the directory where the file you are editing lives.
Otherwise, if you want to do this manually, see :help cd and :help lcd.
see :he filename-modifiers
:!latex % -output-directory %:h
Most likely, you're running vim from your home directory, so it is the current for him. The latex command, being invoked from vim, also therefore has the home directory as current.
You probably know this, and want just to extract path from the filename and supply it as an argument to -o option of the latex command. Just use the shell capabilities:
:!latex % -output-directory `dirname "%"`
I am not sure that it's -output-directory option, but you get what you asked for--a directory name of the file you're editing.