Python How do I run a downloaded python script in github?

  • Thread starter Thread starter ElliotSmith
  • Start date Start date
  • Tags Tags
    Python
AI Thread Summary
To run a Python script, access the Windows Command Prompt by pressing the Windows button + R, typing "cmd," and hitting enter. Navigate to the directory containing the script using the command "cd /path/to/file" and ensure Python is installed and added to your PATH environment variable. If the script is on a different drive, switch to that drive by typing the drive letter (e.g., D:) before using the "cd" command. To execute the script, type "python script.py" followed by any necessary options. To check your PATH settings, type "set" in the command prompt. For running a cloned GitHub repository, clarification is needed on whether you mean cloning or executing the code. Refer to GitHub's help page for guidance on working with repositories.
ElliotSmith
Messages
167
Reaction score
104
I downloaded a script for python and have no idea how to run it.

Do I go into the python GUI or the windows command prompt? Is there any way I can use this in github?

Someone told me on another forum said the following.

1. cd /path/to/file
2. python script.py <options here>

Which commands do I type in and where? Please help me out!
 
Technology news on Phys.org
That instruction should work if the path to the python.exe file is added to the PATH environmental variable.(Which I think is done automatically when installing python on windows).
Just press windows button+r or go to start->run and type cmd. The command prompt window(a black window with white texts on it) opens. Then you should go into the partition containing the file, so you should type D: (if the file is in the D partition). Then you cd to the path of the file and then type python "filename".py.
 
To check your settings in the command prompt window, type the word 'set' and hit return. That will display all of your settings, including your PATH settings.
 
Also, could someone please explain to me how to run a cloned repository in github?
 
ElliotSmith said:
Also, could someone please explain to me how to run a cloned repository in github?
I'm not sure what you mean by running a cloned repository. Do you mean cloning a repository? Have you looked at the https://help.github.com/articles/working-with-repositories help page?
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top