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
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
:) 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
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' ?
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
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
Also, Prasy, try running this spell check application on your outgoing
emails...
On Mon, Mar 16, 2009 at 2:14 PM, 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