Use case: There is a certain file located on a remote server. Instead of hard coding the path to that file in my program I would like to be prompted by the program to let me specify the path to that directory on the remote server. This will help in program portability. I am able to connect to remote server in pyCharm 4.5 professional edition. Using SFTP to connect to remote server in pyCharm. Password or keyfile is not an issue to be concerned with at least for now.
Question: the function raw_input() works for local interpreter. But what method do I use to prompt the user to enter the directory path to a file located in a remote server?
For now I am hard-coding the file path in the program like
input_file="/home/ashish/PyCharm_proj/raw_data/all_user_and_tweets_only_raw.csv"
I also tried the following code which off course does not work when executed on the remote server
import os,sys
user_input = raw_input("Enter the path of your file (use \: ")
assert os.path.exists(user_input), "I did not find the file at, "+str(user_input)
input_file = open(user_input,'r+')
print("Hooray we found your file!")
Similar questions are 1,2,3,4 but I could not find anything relevant that satisfies my use case. Any suggestions to solve this?