Dec-06-2017, 09:13 PM
(This post was last modified: Dec-06-2017, 09:25 PM by python1980.)
I created a .py file, the code is a function that simply calculates v*p
and did this
python calc_val.py, i got back the dos prompt, question is, is this function "saved" somewhere ? like how functions are saved in oracle ? and if so how can i see it ?
and, from dos prompt, can i pass in the arguments to a python function ? if not, then does that mean the only way i can create a python function with arguments is to get into python using ide and can't use a .py file ?
how can i call above function from dos prompt ,
I got it, i learnt how to import the .py file, and then call the function by using the file_name.function_name(arguments)
however, the question still is, is this function saved somewhere ? if not, i have to import the file name everytime i use it ?
def amount(v,p): amt=v*p return amtnow i saved it as calc_val.py , i am using windows 7, so from dos prompt i go to the path where i saved the file
and did this
python calc_val.py, i got back the dos prompt, question is, is this function "saved" somewhere ? like how functions are saved in oracle ? and if so how can i see it ?
and, from dos prompt, can i pass in the arguments to a python function ? if not, then does that mean the only way i can create a python function with arguments is to get into python using ide and can't use a .py file ?
how can i call above function from dos prompt ,
I got it, i learnt how to import the .py file, and then call the function by using the file_name.function_name(arguments)
however, the question still is, is this function saved somewhere ? if not, i have to import the file name everytime i use it ?