[google-appengine] Re: How to access normal files in google App engine

2009-04-10 Thread Konrad Martin

Hi Vaswani,

to my knowledge file IO isn't provided in appEngine cause file IO
doesn't work on a distributed database with high scalability.

So probalby you have to use Google datastore instead of your text
file. It's not that difficult.

Konrad

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: How to access normal files in google App engine

2009-04-10 Thread Tim Hoffman

Hi

You can read files but they must be in you appengine application
directory or a subdirectory.
of it and then uploaded when you deploy

You can't chmod and there is no need to.

Also these files shouldn't be accessible through the static files
directive in app.yaml (I believe)

T



On Apr 10, 12:49 pm, Vaswani  wrote:
> Hi,
>
> I am a developing a web application which has no database but instead
> uses some text files(.txt) as a data store. While running on my local
> machine, I am able to access the folder which has these files (the
> folder is in my application directory). However, when I upload my
> application to the app engine server, I am denied permission to access
> this folder and files.
>
> I have tried using os.chmod to change permissions but still nothing
> works.
> What could be the problem?
>
> -Vaswani
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: How to access normal files in google App engine

2009-04-10 Thread Gopal Vaswani
Hi TIm and Konrad,

Thanks for your reply.

Ok, Here is the problem in a bit more detail.
When I have a single (or more) text file/s in my application directory,
appcfg.py uploads the files but if I have a folder inside my application
directory it ignores that folder while updating unless I have specified it
at static_dir in app.yaml.

So my question is How can we upload a directory without specifying it in the
app.yaml.

Regards
Vaswani

On Fri, Apr 10, 2009 at 10:09 AM, Tim Hoffman  wrote:

>
> Hi
>
> You can read files but they must be in you appengine application
> directory or a subdirectory.
> of it and then uploaded when you deploy
>
> You can't chmod and there is no need to.
>
> Also these files shouldn't be accessible through the static files
> directive in app.yaml (I believe)
>
> T
>
>
>
> On Apr 10, 12:49 pm, Vaswani  wrote:
> > Hi,
> >
> > I am a developing a web application which has no database but instead
> > uses some text files(.txt) as a data store. While running on my local
> > machine, I am able to access the folder which has these files (the
> > folder is in my application directory). However, when I upload my
> > application to the app engine server, I am denied permission to access
> > this folder and files.
> >
> > I have tried using os.chmod to change permissions but still nothing
> > works.
> > What could be the problem?
> >
> > -Vaswani
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: How to access normal files in google App engine

2009-04-10 Thread Tim Hoffman

Hi

In my apps I have heaps of templates in a folder, and don't need to
specify anything
to get them uploaded.  (You will note the same with any django based
app - mines not)

How do you know it is being ignored ?

How do you plan to access them (as templates ?) once they are uploaded
>

Do these text files have strange extensions on them ?

As long as they are in the app folder or subfolder they will get
uploaded (sames as any python code, zcml, etc,..)

T

On Apr 11, 6:22 am, Gopal Vaswani  wrote:
> Hi TIm and Konrad,
>
> Thanks for your reply.
>
> Ok, Here is the problem in a bit more detail.
> When I have a single (or more) text file/s in my application directory,
> appcfg.py uploads the files but if I have a folder inside my application
> directory it ignores that folder while updating unless I have specified it
> at static_dir in app.yaml.
>
> So my question is How can we upload a directory without specifying it in the
> app.yaml.
>
> Regards
> Vaswani
>
> On Fri, Apr 10, 2009 at 10:09 AM, Tim Hoffman  wrote:
>
> > Hi
>
> > You can read files but they must be in you appengine application
> > directory or a subdirectory.
> > of it and then uploaded when you deploy
>
> > You can't chmod and there is no need to.
>
> > Also these files shouldn't be accessible through the static files
> > directive in app.yaml (I believe)
>
> > T
>
> > On Apr 10, 12:49 pm, Vaswani  wrote:
> > > Hi,
>
> > > I am a developing a web application which has no database but instead
> > > uses some text files(.txt) as a data store. While running on my local
> > > machine, I am able to access the folder which has these files (the
> > > folder is in my application directory). However, when I upload my
> > > application to the app engine server, I am denied permission to access
> > > this folder and files.
>
> > > I have tried using os.chmod to change permissions but still nothing
> > > works.
> > > What could be the problem?
>
> > > -Vaswani
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: How to access normal files in google App engine

2009-04-10 Thread Konrad Martin

Hi Vaswani ant Tim

On 11 Apr., 01:56, Tim Hoffman  wrote:
> How do you know it is being ignored ?

How could you know, that's my key question too, as to my knowledge
there is no way to `see` what's uploaded.

When uploading my experience is you either get an error message or
everything in the root and its subfolders is uploaded, at least `not
uploaded data' never happened to me.


Programmig for a high scalable distributed network is just diffrerent.
Some simple tasks, taken for granted on a single machine, just don't
work there. It`s impossible to have a look on all your uploaded
folders for example.

So working with appEngine you better try not to transfer existing
concepts but to build on small steps. Break up your program into small
steps and try each step on its own. If it's working on appEngine OK,
if not read appEngine docs and google for a working solution to reach
your target.

To be more specific you need to copy code and error messages related
to your problem.

Konrad

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: How to access normal files in google App engine

2009-04-11 Thread Gopal Vaswani
Hi Tim and Konrad,
I understand that the ideal way to work with data is to use google data
storage. But given some data constraints on my side for now, I have
postponed the usage of data storage by a month.

I retract my earlier statement that 'appcfg.py update' ignores some files. I
probably didn't see the entire noisy messages. The files were getting
uploaded but I was not allowed to access them through my script. Its
actually strange if I had a small file in the application directory, I was
able to access it but if I had folder (with my data files) in the
application directory, the permission was denied.

Anyway, I need to understand the idiosyncrasies of distributed data network
in more detail. But for now I have found a not so sweet solution. I have
converted each of my data files into python objects and put in individual
small size files (.py) and importing them on demand. It works sweetly now
but definitely not a scalable solution.

But is there a ways to delete the stuff you uploaded before which you don't
need anymore.

Regards
Gopal







On Fri, Apr 10, 2009 at 5:51 PM, Konrad Martin  wrote:

>
> Hi Vaswani ant Tim
>
> On 11 Apr., 01:56, Tim Hoffman  wrote:
> > How do you know it is being ignored ?
>
> How could you know, that's my key question too, as to my knowledge
> there is no way to `see` what's uploaded.
>
> When uploading my experience is you either get an error message or
> everything in the root and its subfolders is uploaded, at least `not
> uploaded data' never happened to me.
>
>
> Programmig for a high scalable distributed network is just diffrerent.
> Some simple tasks, taken for granted on a single machine, just don't
> work there. It`s impossible to have a look on all your uploaded
> folders for example.
>
> So working with appEngine you better try not to transfer existing
> concepts but to build on small steps. Break up your program into small
> steps and try each step on its own. If it's working on appEngine OK,
> if not read appEngine docs and google for a working solution to reach
> your target.
>
> To be more specific you need to copy code and error messages related
> to your problem.
>
> Konrad
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: How to access normal files in google App engine

2009-04-11 Thread Konrad Martin

Hi Gopal,

you ask
> is there a way to delete the stuff you uploaded before

The answer is, it's done automatically during upload, as each
successfull upload creates an exact mirror of your project folder and
its subfolders.

Any new content will be uploaded and any content you deleted on your
computer will be deletet on the web too.

So you can leave the task of deleting web content fully to Google. You
only have to care not to delete a file on your computer which is still
needed on the web.

Konrad
_
http://benchstat.appspot.com/html/index.html



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---