bash - Creating an alias for a python script -


I am new to Python programming. I want to make a nickname for my script, so that I can use it in the terminal.

I have a .pi file whose name is r.py and I am trying to create a nickname for it. I made it using the following commons:

  $ alias new = "python / Python_scripts / radians.py"  

Now when I type the word new I am giving an error in the terminal - 'such a file exists'

Can anyone tell me how to do this?

The path is probably not correct:

  alias new = "python / Python_scripts / radians.py " 

Try to find the Python_scripts directory at the root level, when I try to convert it to your home directory, with a relative path

  alias new = "python python_scripts / radians.py"  

or, better,

  alias new = " Python ~ / Python_scripts / radians.py " 

So that you can run aliases commands from anywhere.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -