The way to do it is to not upload them as static files, but as program
files.  If you really need to serve them as static to users as well,
include 2 copies in your project.  The overhead of using urlopen
instead of opening the file directly is going to be comparatively
enormous.

On Mar 20, 1:48 am, jeffkyjin <jeffky...@gmail.com> wrote:
> Ok.
> Now I found a method to do it.
>
> instead of reading a static file use os.file.
> We can use the urllib.urlopen or urllib2.urlopen to get the static
> file, then read it.
> url = 'http://xxx.appspot.com/myfile.txt'
> raw = urlopen(url).read()
>
> or how to change the url to a local address ? 'localhost' ? it seems
> not wok.
> anyway, it works!
>
> On Mar 20, 1:10 am, Matthew Page-Lieberman <mateus.just...@gmail.com>
> wrote:
>
> > :) I was kidding. You are using Gmail, so it should already be notifying you
> > of misspelled words (by underlining them in red - assuming you are using a
> > browser and sending in rich text/html form).
>
> > Good Luck with the app.
>
> > Peace Hugs
>
> > On Thu, Mar 19, 2009 at 11:34 AM, jeffkyjin <jeffky...@gmail.com> wrote:
>
> > > Can you show me how to do this?
> > > Thanks!
>
> > > On Mar 17, 2:14 am, Nash-t <timna...@gmail.com> wrote:
> > > > if all you really have to do is read the file you could just put it in
> > > > a .py file and import it.
> > > > Store it as a dictionary or an array or an object. Whatever works.
>
> > > > On Mar 16, 12:31 am, djidjadji <djidja...@gmail.com> wrote:
>
> > > > > Why don't you put the file in the datastore.
>
> > > > > You can put it on a word basis, one object for every word,
> > > db.StringProperty.
> > > > > Use the datastore index to find the word. Use bulk_upload to fill the
> > > datastore.
>
> > > > > Or split it up in parts, each part starting with a different
> > > > > character. Put it in db.TextProperty.
>
> > > > > 2009/3/16 prasy <prasanna2...@gmail.com>:
>
> > > > > > Hi..
>
> > > > > > Im abt to create a spell check application.. I have a text file
> > > called
> > > > > > "wordlist.txt' containing english words. I will be getting a wrd 
> > > > > > from
> > > > > > user and checks its spelling wit de help of the text file.
>
> > > > > > I simply need to read de file.. Is it possible for me to run tis app
> > > > > > in appengine.. Bcz i heard tat its not possible to read de contents
> > > of
> > > > > > a static file in app engine. Moreover de file is around 2 MB so i
> > > cant
> > > > > > simply make it as list or dict type and use..
>
> > > > > > Regards,
> > > > > > Prasy..
>
> > --
> > M. Page-Lieberman
> > mateus.just...@gmail.com
--~--~---------~--~----~------------~-------~--~----~
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