How to compile the programm corectly? [on hold]












-2














f = open("C:\fileObject.txt", "w")
f.write("I love to code")
f.close()


Traceback (most recent call last):
File "c:Users�������DesktopBakhtiyarPythonpracticefileObjects.py", line 1, in <module>
f = open("C:\fileObject.txt", "w")
PermissionError: [Errno 13] Permission denied: 'C:\fileObject.txt'









share|improve this question









New contributor




Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by usr2564301, pault, trincot, SiKing, Dalija Prasnikar 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – pault, trincot, SiKing, Dalija Prasnikar

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 3




    The JVM can't open the file C:fileObject.txt for writing due to permissions (windows refuse to let you write to C: without elevated priviledges). Either change the file path to something like your user's home (preferred) or launch your jvm with elevated priviledges. BTW your code successfully compiled from what I can tell, the error happens at runtime when you execute it.
    – Aaron
    Dec 27 at 13:14








  • 2




    You don't have write permission to `C:`. This is not a python problem. Your operating system doesn't allow this.
    – Daniel
    Dec 27 at 13:23






  • 1




    @Aaron: Python, not Java.
    – Daniel
    Dec 27 at 13:24










  • @Daniel Woops, right ^^'
    – Aaron
    Dec 27 at 13:27
















-2














f = open("C:\fileObject.txt", "w")
f.write("I love to code")
f.close()


Traceback (most recent call last):
File "c:Users�������DesktopBakhtiyarPythonpracticefileObjects.py", line 1, in <module>
f = open("C:\fileObject.txt", "w")
PermissionError: [Errno 13] Permission denied: 'C:\fileObject.txt'









share|improve this question









New contributor




Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by usr2564301, pault, trincot, SiKing, Dalija Prasnikar 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – pault, trincot, SiKing, Dalija Prasnikar

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 3




    The JVM can't open the file C:fileObject.txt for writing due to permissions (windows refuse to let you write to C: without elevated priviledges). Either change the file path to something like your user's home (preferred) or launch your jvm with elevated priviledges. BTW your code successfully compiled from what I can tell, the error happens at runtime when you execute it.
    – Aaron
    Dec 27 at 13:14








  • 2




    You don't have write permission to `C:`. This is not a python problem. Your operating system doesn't allow this.
    – Daniel
    Dec 27 at 13:23






  • 1




    @Aaron: Python, not Java.
    – Daniel
    Dec 27 at 13:24










  • @Daniel Woops, right ^^'
    – Aaron
    Dec 27 at 13:27














-2












-2








-2







f = open("C:\fileObject.txt", "w")
f.write("I love to code")
f.close()


Traceback (most recent call last):
File "c:Users�������DesktopBakhtiyarPythonpracticefileObjects.py", line 1, in <module>
f = open("C:\fileObject.txt", "w")
PermissionError: [Errno 13] Permission denied: 'C:\fileObject.txt'









share|improve this question









New contributor




Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











f = open("C:\fileObject.txt", "w")
f.write("I love to code")
f.close()


Traceback (most recent call last):
File "c:Users�������DesktopBakhtiyarPythonpracticefileObjects.py", line 1, in <module>
f = open("C:\fileObject.txt", "w")
PermissionError: [Errno 13] Permission denied: 'C:\fileObject.txt'






python file






share|improve this question









New contributor




Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Dec 27 at 13:43









Gama11

10.8k21946




10.8k21946






New contributor




Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 27 at 13:12









Бахтияр Баглан

1




1




New contributor




Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Бахтияр Баглан is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by usr2564301, pault, trincot, SiKing, Dalija Prasnikar 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – pault, trincot, SiKing, Dalija Prasnikar

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by usr2564301, pault, trincot, SiKing, Dalija Prasnikar 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – pault, trincot, SiKing, Dalija Prasnikar

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 3




    The JVM can't open the file C:fileObject.txt for writing due to permissions (windows refuse to let you write to C: without elevated priviledges). Either change the file path to something like your user's home (preferred) or launch your jvm with elevated priviledges. BTW your code successfully compiled from what I can tell, the error happens at runtime when you execute it.
    – Aaron
    Dec 27 at 13:14








  • 2




    You don't have write permission to `C:`. This is not a python problem. Your operating system doesn't allow this.
    – Daniel
    Dec 27 at 13:23






  • 1




    @Aaron: Python, not Java.
    – Daniel
    Dec 27 at 13:24










  • @Daniel Woops, right ^^'
    – Aaron
    Dec 27 at 13:27














  • 3




    The JVM can't open the file C:fileObject.txt for writing due to permissions (windows refuse to let you write to C: without elevated priviledges). Either change the file path to something like your user's home (preferred) or launch your jvm with elevated priviledges. BTW your code successfully compiled from what I can tell, the error happens at runtime when you execute it.
    – Aaron
    Dec 27 at 13:14








  • 2




    You don't have write permission to `C:`. This is not a python problem. Your operating system doesn't allow this.
    – Daniel
    Dec 27 at 13:23






  • 1




    @Aaron: Python, not Java.
    – Daniel
    Dec 27 at 13:24










  • @Daniel Woops, right ^^'
    – Aaron
    Dec 27 at 13:27








3




3




The JVM can't open the file C:fileObject.txt for writing due to permissions (windows refuse to let you write to C: without elevated priviledges). Either change the file path to something like your user's home (preferred) or launch your jvm with elevated priviledges. BTW your code successfully compiled from what I can tell, the error happens at runtime when you execute it.
– Aaron
Dec 27 at 13:14






The JVM can't open the file C:fileObject.txt for writing due to permissions (windows refuse to let you write to C: without elevated priviledges). Either change the file path to something like your user's home (preferred) or launch your jvm with elevated priviledges. BTW your code successfully compiled from what I can tell, the error happens at runtime when you execute it.
– Aaron
Dec 27 at 13:14






2




2




You don't have write permission to `C:`. This is not a python problem. Your operating system doesn't allow this.
– Daniel
Dec 27 at 13:23




You don't have write permission to `C:`. This is not a python problem. Your operating system doesn't allow this.
– Daniel
Dec 27 at 13:23




1




1




@Aaron: Python, not Java.
– Daniel
Dec 27 at 13:24




@Aaron: Python, not Java.
– Daniel
Dec 27 at 13:24












@Daniel Woops, right ^^'
– Aaron
Dec 27 at 13:27




@Daniel Woops, right ^^'
– Aaron
Dec 27 at 13:27

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas