Python director / file access in TABLET | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Python director / file access in TABLET

I plan to store my Python codes in a server and through WIFI access this code in TABLET. can we write in such a way that, code look out for a File in Android path of TABLET though running at Server.. currently our POC shows , it always expect file to be ( or folder to be) available at server where we kept our executable code

26th Sep 2023, 11:15 AM
vibhava Technology
vibhava Technology - avatar
1 Answer
+ 1
Where your python code is stored is the “current working directory”, short for cwd. If you want to store your code in the server, and working with files OUTSIDE that directory (commonly known as folder), you need a way to tell your code to “change” the cwd. I suggest you search for “pathlib.Path” and “os” modules. They have methods to change the cwd.
26th Sep 2023, 12:57 PM
Wong Hei Ming
Wong Hei Ming - avatar