Re: [google-appengine] Re: Get file size with Python

2012-10-01 Thread Geoffrey Spear
What does does not work mean? Where's the code you're running? Where's the output, or the traceback? On Monday, October 1, 2012 1:41:41 AM UTC-4, Phát Trần wrote: I tried but it's not work. Vào 12:02:56 UTC+7 Thứ hai, ngày 01 tháng mười năm 2012, Takashi Matsuo (Google) đã viết: import

[google-appengine] Re: Get file size with Python

2012-10-01 Thread Phát Trần
I use import os print(os.path.getsize(abc.txt)) Ane I got the log: WARNING 2012-10-01 12:16:13,943 dev_appserver_import_hook.py:595] Blocking access to static file .\abc.txt ERROR2012-10-01 12:16:13,944 wsgi.py:203] Traceback (most recent call last): File C:\Program

[google-appengine] Re: Get file size with Python

2012-10-01 Thread Geoffrey Spear
Your file is specified in app.yaml as a static file; these files are not accessible by the application; they're uploaded to a completely different place from your application code, and are meant to only be served directly to your users' browsers, not accessed in your code. dev_appserver blocks

[google-appengine] Re: Get file size with Python

2012-09-30 Thread GregF
Appengine does not give you access to the filesystem. You will need to use either the datastore or the blobstore to store local information. Cheers! Greg. On Saturday, 29 September 2012 22:05:42 UTC+12, Phát Trần wrote: I try to get file size with os.path(asd.txt) But I cann't. Don't know

Re: [google-appengine] Re: Get file size with Python

2012-09-30 Thread Gopal Patel
It prohibits writing. It allows reading anyway you want. On Mon, Oct 1, 2012 at 9:02 AM, GregF g...@vig.co.nz wrote: Appengine does not give you access to the filesystem. You will need to use either the datastore or the blobstore to store local information. Cheers! Greg. On Saturday, 29

Re: [google-appengine] Re: Get file size with Python

2012-09-30 Thread Phát Trần
So use we use read file. And how can we know its size Vào 10:58:48 UTC+7 Thứ hai, ngày 01 tháng mười năm 2012, gops đã viết: It prohibits writing. It allows reading anyway you want. On Mon, Oct 1, 2012 at 9:02 AM, GregF gr...@vig.co.nz javascript:wrote: Appengine does not give you access to

Re: [google-appengine] Re: Get file size with Python

2012-09-30 Thread Takashi Matsuo
import os size = os.stat(filename).st_size # or size = os.path.getsize(filename) Does one of these work for you? On Mon, Oct 1, 2012 at 1:39 PM, Phát Trần phat2...@gmail.com wrote: So use we use read file. And how can we know its size Vào 10:58:48 UTC+7 Thứ hai, ngày 01 tháng mười năm 2012,

Re: [google-appengine] Re: Get file size with Python

2012-09-30 Thread Phát Trần
I tried but it's not work. Vào 12:02:56 UTC+7 Thứ hai, ngày 01 tháng mười năm 2012, Takashi Matsuo (Google) đã viết: import os size = os.stat(filename).st_size # or size = os.path.getsize(filename) Does one of these work for you? On Mon, Oct 1, 2012 at 1:39 PM, Phát Trần