On Fri, Jul 31, 2009 at 4:06 AM, shanmukh wrote:
> Hi team,
> You may find this query quite basic, as i am a tyro in developing
> google app engine applications.
> The problem is i am unable to read a file from the local machine. but
> i can read the file when it is uploaded to the google server.Could you
> please suggest me how i can achieve this?
> Thanks in advance,
> Shanmukh.

supposing you have a file 'my_file.txt' in your root app dir, you just do:

f = file('my_file.txt')
contents = f.read()
f.close()

for files inside directories, prepend it with the directory name:

f = file('dir_name/my_file.txt')
...

that's all.
-- rodrigo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to