Print directory where file is saved with Python
<p>how could do print the path directory of my file saved with python.
For ad example, i start with idle3 (Fedora 24), i save the IDLE code on: /home/jetson/Desktop/Python/Programs and in the code is written:</p>

<pre><code>f = open("Hello.txt","w")
f.write("This is a test","\n")
f.close()
</code></pre>

<p>My question is: after f.close i would print the directory grabbed with </p>

<pre><code>import sys.os 

print("The file is saved in ",direcotrysaved)
</code></pre>

<p>It's possible?</p>

<p>If no path is given then the file is opened in the current working directory. This is returned by <code>os.getcwd()</code>.</p>

python python-3.x