Re: [google-appengine] Should developers pay for the useless instances? Can we set max instances to 1?

2012-07-11 Thread Sun Jing
I'm using M/S datastore. I think HR may be better, but I don't want to
migrate now.

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



Re: [google-appengine] Re: Attacked by appid: s~ccdict1 to s~ccdict99

2012-07-01 Thread Sun Jing
Thank you, Stuart. I blocked all the requests from app engine, but I hope
there would be a better way.

On Sun, Jul 1, 2012 at 7:21 PM, Stuart Langley  wrote:

> I've forwarded this internally.
>
>
> On Sunday, 1 July 2012 17:12:59 UTC+10, keakon wrote:
>>
>> Can anyone help me?
>>
>> They keep attacking my site for more than 1 day.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/GosvnOBbGyAJ.
> 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.
>

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



Re: [google-appengine] TransientError on Text Search API ?

2012-05-14 Thread Sun Jing
I also got this error sometime if I mixed ascii char and Chinese char (in
UTF-8 encode).

On Mon, May 14, 2012 at 4:58 PM, Amy Unruh  wrote:

> Steve,
>
> Can you provide more info (e.g. example code) showing how you built the
> query object that you used for the search?
>
>  -Amy
>
> On 12 May 2012 20:05, Steve Qian  wrote:
>
>>
>> I keep getting the following TransientError when doing a search query.
>>
>> Anyone experience the same error? Is there a problem with the service?
>>
>>
>>>
>>>results = search.Index(name=cls._INDEX_NAME).search(query=query_obj)
>>>   File 
>>> "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/search/search.py",
>>>  line 2487, in search
>>> _CheckStatus(response.status())
>>>
>>>
>>>   File 
>>> "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/search/search.py",
>>>  line 443, in _CheckStatus
>>> raise _ERROR_MAP[status.code()](status.error_detail())
>>> TransientError
>>
>>
>>
>> Steve
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/google-appengine/-/7Yt0VM1sBdAJ.
>> 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.
>>
>
>  --
> 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.
>

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



Re: [google-appengine] Re: scheduling backups with cron (in Py2.7)

2012-04-24 Thread Sun Jing
There is an article:
https://developers.google.com/appengine/articles/scheduled_backups

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



Re: [google-appengine] App Engine 1.6.5 Released

2012-04-24 Thread Sun Jing
Thank you, it works. I think the document should be updated:
https://developers.google.com/appengine/docs/python/datastore/queryclass#Query_get

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



Re: [google-appengine] App Engine 1.6.5 Released

2012-04-24 Thread Sun Jing
Thank you, Alfred.
Can I change projection if I use Model.all() to create a Query object?

On Wed, Apr 25, 2012 at 12:53 PM, Alfred Fuller  wrote:

> Oh, also db.Query takes a class not a string, should be:
> db.Query(Article, projection=('title',)).get()
>
> On Tue, Apr 24, 2012 at 9:09 PM, Alfred Fuller wrote:
>
>> ('title') is not a tuple, you need to use ('title',) or ['title'] instead
>>
>> >>> print ('title')
>> title
>> >>> print ('title',)
>> ('title',)
>> >>>
>>
>>  On Tue, Apr 24, 2012 at 8:58 PM, Sun Jing  wrote:
>>
>>> I tried to use projection queries:
>>>
>>> class Article(db.Model):
>>> title = db.StringProperty(required=True)
>>>  # others...
>>>
>>> print db.Query('Article', projection=('title')).get()
>>>
>>>> Traceback (most recent call last):
>>>>   File
>>>> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/admin/__init__.py",
>>>> line 331, in post
>>>> exec(compiled_code, globals())
>>>>   File "", line 3, in 
>>>>   File
>>>> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
>>>> line 2098, in get
>>>> results = self.run(limit=1, **kwargs)
>>>>   File
>>>> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
>>>> line 2061, in run
>>>> raw_query = self._get_query()
>>>>   File
>>>> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
>>>> line 2446, in _get_query
>>>> kind = self._model_class.kind()
>>>> AttributeError: 'str' object has no attribute 'kind'
>>>
>>>
>>> print db.GqlQuery("SELECT title FROM Article").get().title
>>> # this one works
>>>
>>> --
>>> 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.
>>>
>>
>>
>  --
> 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.
>

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



Re: [google-appengine] App Engine 1.6.5 Released

2012-04-24 Thread Sun Jing
I tried to use projection queries:

class Article(db.Model):
title = db.StringProperty(required=True)
# others...

print db.Query('Article', projection=('title')).get()

> Traceback (most recent call last):
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/admin/__init__.py",
> line 331, in post
> exec(compiled_code, globals())
>   File "", line 3, in 
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
> line 2098, in get
> results = self.run(limit=1, **kwargs)
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
> line 2061, in run
> raw_query = self._get_query()
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
> line 2446, in _get_query
> kind = self._model_class.kind()
> AttributeError: 'str' object has no attribute 'kind'


print db.GqlQuery("SELECT title FROM Article").get().title
# this one works

-- 
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] Can't reuse app after HRD Migration?

2011-11-11 Thread Sun Jing
I just tried to migrate one of my app to anther. After that I find my app
become 404 Not Found, how can I use it again?

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



Re: [google-appengine] Re: I have to leave App Engine platform, feeling really bad and sad

2011-11-03 Thread Sun Jing
I think there must be a way to optimize, but I agree with you that it's not
worth redesigning and rewriting your site.

In my case, I spent dozens of hours to reduce about 50% datastore reads of
my blog.
I could fetch entities with just one line of code before, and it's
automatically memcached.
But now, I have to query keys first, then check memcache to find missing
entities, batch get the rest, set them into memcache, merge all the
entities in the proper order. Since I have several memcache keys for each
entity (like id, name, title, url, etc.), the reality is even worse.

It seems you can't reduce the cost as acceptable as before without dropping
many features or implementing in a extremely strange way.
With the rework time, it's almost enough to move to other platform and
scale better.
Well, GAE may be easy to scale, but money isn't. I seldom see other
platforms raise price, but GAE keeps raising price and reducing the free
quotas, at least 3 times I known.

--
keakon

My blog(Chinese): www.keakon.net
Blog source code: https://bitbucket.org/keakon/doodle/



On Fri, Nov 4, 2011 at 4:39 AM, Paul  wrote:

> 1000+ entities on one page? How did you manage that? It really sounds
> like architectural flaw. I am writing an app with huge amount of
> constantly changing data (that needs to be persisted) and I don't have
> that problem.
>
> On Nov 3, 8:21 pm, Xin Liu  wrote:
> > My site's typical page is like this:
> >
> > http://www.v2ex.com/t/7577
> >
> > As you have seen, a topic with dozens replies, each reply carry 3
> entities:
> > reply, member and avatar. And there are other supporting dynamic elements
> > on the page (most of them can be cached).
> >
> > But when someone replied to the topic, then it will trigger a lot
> memcached
> > objects to be removed. For hot topics, memcached objects can just survive
> > minutes or even seconds.
> >
> > And there could be 100+ or even 1000+ entities on one page.
> >
> > If I knew they're going to charge datastore reads/writes, I may think
> > another way to write the code. But now, it's too painful to rewrite the
> > whole site.
>
> --
> 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.
>
>

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



Re: [google-appengine] Best way to disable settings from appengine_config during tests

2011-10-30 Thread Sun Jing
You can try:

def webapp_add_wsgi_middleware(app):
  if not appos.environ['APPLICATION_ID'].startswith('dev~'):
app = recording.appstats_wsgi_middleware(app)
  return app

--
keakon

My blog(Chinese): www.keakon.net
Blog source code: https://bitbucket.org/keakon/doodle/



On Sun, Oct 30, 2011 at 2:18 PM, Andi Albrecht  wrote:

> Hi all,
>
> I have set up local unit tests for a Python app according to the
> documentation on the App Engine site [1]. The app has appstats
> configured as a WSGI middleware through appengine_config.py by using
> the webapp_add_wsgi_middleware() directive:
>
> def webapp_add_wsgi_middleware(app):
>  app = recording.appstats_wsgi_middleware(app)
>  return app
>
> When running the tests I want to disable appstats. appstats needs
> REQUEST_ID_HASH environment variable which isn't set during tests, but
> recording data doesn't make much sense at all during tests.
>
> The current idea is to monkey-patch
> appengine_config.webapp_add_wsgi_middleware when it's first imported
> by the test runner - before any test is actually executed:
>
> import appengine_config
> appengine_config.webapp_add_wsgi_middleware = lambda app: app
>
> But I wonder if there are better (or more documented) alternatives to
> modify settings from appengine_config.py during tests.
>
> --Andi
>
> [1]
> http://code.google.com/appengine/docs/python/tools/localunittesting.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.
>
>

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



Re: [google-appengine] Inactive Instances

2011-10-27 Thread Sun Jing
Those idle instance won't be charged. You can check the Billed curve
of the Instances
chart in your app's Dashboard.

--
keakon

My blog(Chinese): www.keakon.net
Blog source code: https://bitbucket.org/keakon/doodle/



On Thu, Oct 27, 2011 at 2:37 PM, PanosJee  wrote:

> Hi everyone,
> My app is currently using 8 instances. 3 of them have 0 QPS and they live
> for over 8 hours. Has the scheduler any issues and is not killing old
> instances? I am afraid it will take a toll on my app once the new pricing in
> enabled.
>
> 1.933126.9 ms17600:01:2638.3 MBytes[image: Dynamic Icon]Dynamic1.050124.8
> ms6200:00:2829.9 MBytes[image: Dynamic Icon]Dynamic0.533226.1 ms3100:00:2733.1
> MBytes[image: Dynamic Icon]Dynamic3.55085.6 ms82200:04:2839.1 MBytes[image:
> Dynamic Icon]Dynamic0..0 ms2608:31:1921.0 MBytes[image: Dynamic Icon]
> Dynamic0..0 ms1407:16:5917.2 MBytes[image: Dynamic Icon]Dynamic0..0
> ms67
> 010:59:3129.6 MBytes[image: Dynamic Icon]Dynamic
>
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/wCKJRIX3cLQJ.
> 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.
>

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



Re: [google-appengine] How to store bytecode in Python 2.7?

2011-10-16 Thread Sun Jing
Hi Brian,

I got it, thank you.

--
keakon

My blog(Chinese): www.keakon.net
Blog source code: https://bitbucket.org/keakon/doodle/



On Sun, Oct 16, 2011 at 6:37 PM, Brian Quinlan  wrote:

> Hi Sun,
>
> You can't store anything in the local file system. You can store data
> in the datastore, memcache, blobstore, etc.
>
> With the App Engine Python 2.5 runtime it is *not* possible to execute
> arbitrary bytecode.
>
> Cheers,
> Brian
>
> On Sun, Oct 16, 2011 at 9:30 PM, Sun Jing  wrote:
> > Hi Brian,
> > So it means I can manipulate bytecode, but cannot store it to the file
> > system?
> > I can also generate bytecode in Python 2.5, what has been changed?
> > Thanks for your explain.
> >
> > --
> > keakon
> > My blog(Chinese): www.keakon.net
> > Blog source code: https://bitbucket.org/keakon/doodle/
> >
> >
> > On Sun, Oct 16, 2011 at 5:35 PM, Brian Quinlan 
> wrote:
> >>
> >> Hi Sun,
> >>
> >> You are seeing those exceptions because you are trying to write to a
> >> file and App Engine does not support writing to the local filesystem.
> >>
> >> By default, jinja2 uses a memory-backed LRU cache to cache the last 50
> >> accessed templates but you can customize this if you want. See:
> >> http://jinja.pocoo.org/docs/api/#bytecode-cache
> >>
> >> Cheers,
> >> Brian
> >>
> >> On Sun, Oct 16, 2011 at 6:02 PM, Sun Jing  wrote:
> >> > Hi all,
> >> > As the document says, in Python 2.7, no longer restricts access to
> >> > Python
> >> > bytecode.
> >> > But I tried to compile a source code file, it raised an IOError:
> [Errno
> >> > 13]
> >> > Permission denied:
> >> >>
> >> >> import os
> >> >> import os.path
> >> >> import py_compile
> >> >> path = os.path.join(os.getcwd(), 'model.py')
> >> >> py_compile.compile(path)
> >> >
> >> > marshal is not working either:
> >> >>
> >> >> import os
> >> >> import os.path
> >> >> import marshal
> >> >> code = compile('1+1', '', 'eval')
> >> >> file = open(os.path.join(os.getcwd(), 'test.pyc'), 'wb')
> >> >> marshal.dump(code, file)
> >> >> file.close()
> >> >
> >> > I'm not sure whether jinja2's template caching works fine, it seems it
> >> > just
> >> > opens a file and writes into it.
> >> > --
> >> > keakon
> >> > My blog(Chinese): www.keakon.net
> >> > Blog source code: https://bitbucket.org/keakon/doodle/
> >> >
> >> > --
> >> > 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.
> >> >
> >>
> >> --
> >> 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.
> >>
> >
> > --
> > 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.
> >
>
> --
> 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.
>
>

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



Re: [google-appengine] How to store bytecode in Python 2.7?

2011-10-16 Thread Sun Jing
Hi Brian,

So it means I can manipulate bytecode, but cannot store it to the file
system?
I can also generate bytecode in Python 2.5, what has been changed?

Thanks for your explain.

--
keakon

My blog(Chinese): www.keakon.net
Blog source code: https://bitbucket.org/keakon/doodle/



On Sun, Oct 16, 2011 at 5:35 PM, Brian Quinlan  wrote:

> Hi Sun,
>
> You are seeing those exceptions because you are trying to write to a
> file and App Engine does not support writing to the local filesystem.
>
> By default, jinja2 uses a memory-backed LRU cache to cache the last 50
> accessed templates but you can customize this if you want. See:
> http://jinja.pocoo.org/docs/api/#bytecode-cache
>
> Cheers,
> Brian
>
> On Sun, Oct 16, 2011 at 6:02 PM, Sun Jing  wrote:
> > Hi all,
> > As the document says, in Python 2.7, no longer restricts access to Python
> > bytecode.
> > But I tried to compile a source code file, it raised an IOError: [Errno
> 13]
> > Permission denied:
> >>
> >> import os
> >> import os.path
> >> import py_compile
> >> path = os.path.join(os.getcwd(), 'model.py')
> >> py_compile.compile(path)
> >
> > marshal is not working either:
> >>
> >> import os
> >> import os.path
> >> import marshal
> >> code = compile('1+1', '', 'eval')
> >> file = open(os.path.join(os.getcwd(), 'test.pyc'), 'wb')
> >> marshal.dump(code, file)
> >> file.close()
> >
> > I'm not sure whether jinja2's template caching works fine, it seems it
> just
> > opens a file and writes into it.
> > --
> > keakon
> > My blog(Chinese): www.keakon.net
> > Blog source code: https://bitbucket.org/keakon/doodle/
> >
> > --
> > 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.
> >
>
> --
> 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.
>
>

-- 
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] How to store bytecode in Python 2.7?

2011-10-16 Thread Sun Jing
Hi all,

As the 
documentsays,
in Python 2.7, no
longer restricts access to Python bytecode.
But I tried to compile a source code file, it raised an IOError: [Errno 13]
Permission denied:

> import os
> import os.path
> import py_compile
> path = os.path.join(os.getcwd(), 'model.py')
> py_compile.compile(path)


marshal is not working either:

> import os
> import os.path
> import marshal
> code = compile('1+1', '', 'eval')
> file = open(os.path.join(os.getcwd(), 'test.pyc'), 'wb')
> marshal.dump(code, file)
> file.close()


I'm not sure whether jinja2's template caching works fine, it seems it just
opens a file and writes into it.

--
keakon

My blog(Chinese): www.keakon.net
Blog source code: https://bitbucket.org/keakon/doodle/

-- 
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] How can I use SetupTools in Python 2.7 runtime?

2011-10-11 Thread Sun Jing
I find the Python 2.7 runtime provides SetupTools, but the
document
dosen't
tell me how to use it.
Can I use it to install any Python packages?

--
keakon

My blog(Chinese): www.keakon.net
Blog source code: https://bitbucket.org/keakon/doodle/

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