My desktop computer is running Linux Mint 19.1. Another computer is running Linux Mint 18.3. Both computers are running Samba. I am trying to have my desktop python code check for a file on the other computer. In the Caja file manager it shows the path as "smb://lenovo2/kwpvr/". I can copy, delete or rename the file in Caja.
This question was previously asked but the answer only addressed that other operating system (Windows). os.path.isfile() returns false for file on network drive
#!/usr/bin/python3
import os
print(os.path.isfile("smb://lenovo2/kwpvr/kwpvr3.db")) # False
print (os.path.isfile("//lenovo2/kwpvr/kwpvr3.db")) # False
print (os.path.isfile("smb:\\lenovo2\kwpvr\kwpvr3.db")) # False
print (os.path.isfile("\\lenovo2\kwpvr\kwpvr3.db")) # False
print (os.path.exists("smb://lenovo2/kwpvr/kwpvr3.db")) # False
print (os.path.exists("//lenovo2/kwpvr/kwpvr3.db")) # False
print (os.path.exists("smb:\\lenovo2\kwpvr\kwpvr3.db")) # False
print (os.path.exists("\\lenovo2\kwpvr\kwpvr3.db")) # False
os.path.exists() always returns False for any permutation of the file name I can come up with.