RE: Xml File Error

2019-07-30 Thread David Raymond
e You can check if your path is ok using either os.path.exists() or os.path.isfile() before trying to actually open it to see if it is already there. -Original Message- From: Python-list On Behalf Of Dipangi Shah Sent: Tuesday, July 30, 2019 3:20 AM To: python-list@python.org Subject

Xml File Error

2019-07-30 Thread Dipangi Shah
Hi, import os from xml.etree import ElementTree file_name = 'Users.xml' full_file = os.path.abspath(os.path.join('data', file_name)) print(full_file) with above code, path is successfully printed as "C:\Users\Evosys\PycharmProjects\Python Level1\data\Users.xml" but when I add below 2 lines, there