Accessing file from Remote location

subhabrata.banerji at subhabrata.banerji at
Wed Apr 29 11:45:13 CEST 2015

Dear Group,

I have a good amount of data in a remote location. 
It is in MySql Database. I am trying to access it as,
>>> import pymysql
>>> import pymysql.cursors
with connection.cursor() as cursor:
		# Read a single record
                sql = "SELECT candidateid,cnd.FirstName, cnd.LastName,Concat('\\\files\Cand_Res/',orgguid,'/',DATE_FORMAT(cnd.createddate,'%Y%m'),'/',candidateguid,'/',File) as filePath  from candidate cnd join mstorganization org on cnd.orgid = org.OrgId order by cnd.modifieddate limit 1"
		result = cursor.fetchone()

Now I am getting the file path.

I am trying to open this file in Python.

I tried options as, 
f=open("//remote_machine/folder1/file1.doc", "r"),
f=open("\\\\remote_machine\\folder1\\file1.doc", "r")
given in
and in

but I am not being able to open it. 

Am I doing any error? 

If I run the path I am getting the document.

My document path is:

I am using Python 2.7.6 | 64-bit | (default, Sep 15 2014, 17:36:35) [MSC v.1500 64 bit (AMD64)] on win32 Enthought
Canopy. This is not my default Python location. 
My current directory is:
>>> os.getcwd()

I am using Windows 7 Professional 64 bit. 

If any body may kindly suggest. 

Subhabrata Banerjee. 

More information about the Python-list mailing list