this is my error code:
text = open('/media/a.txt', 'rb').read()
and my perplexed is:
when i use this :
text = open('a.txt', 'rb').read()
it can be running
but when i put the 'a.txt' to the 'media' folder, i can't running ,
why ?
thanks
IOError at /
[Errno 13] file not accessible: '/media/a.txt'
...
Hello.
I'm building a VS package, and I'm trying to send a command from the package to Visual Studio to open up a user selected file in a new tab (just like a user would do it by going to File -> Open...).
I remember seeing at some point how to do this. Can anybody refresh my memory?
Thanks!
...
Hi ,
I have doubt in the following scenario
Scenario:
A process or program starts with opening a file in a write mode and entering a infinite loop say example: while(1) whose body has logic to write to the opened file.
Problem: What if i delete the opened or created file soon after the process enters the infinite loop
Thanks in adva...
I was told that the application:openFile: delegate method for NSApp would allow my application to open files by dropping them into the dock, but does this also apply to NSStatusItems in the menu bar? I would like to know before trying to implement.
...
This question have been answered. I recommend sumit_programmers solution below. For now, I've removed my code, thinking it's more confusing than helpful. When I've developed it a bit further, perhaps I'll post my code here, with some comments.
You may also be interested in the answer to the question Save text from rich text box with C#....
I am trying to configure vim's 'path' and 'suffixesadd' so when I use gf over FILE_NAME, and pwd is /some/dir/, it opens /some/dir/FILE_NAME/File_Name.xml
In vimrc I put:
set suffixesadd=.xml
set path=.,dir/**
But, instead of opening File_Name.xml it opens the directory FILE_NAME
What should I do to configure vim so it looks for fil...
I have a deceivingly (at least for me) simple problem. I want to open a file in eclipse FROM Mac's finder. Whenever I try, I get the alert that Eclipse cannot open that file. Yet, from within Eclipse I can open the file, either by double clicking it in the Explorer/Navigator window or going file/Open File ...
At the end of the day, I wa...