I want to create (or open if existed) a file with python with path /etc/yate/input.txt. Here is my code:
try:
     file = open("input.txt", "wb")
except IOError:
     print "Error"
with file:
     doSomething()
and I get "Error" message
How can I fix it?
 
     
     
    