pylons

Paster cannot stop daemon

会有一股神秘感。 提交于 2020-01-02 08:48:33
问题 I'm using the following command in my pylons app in an attempt to stop the daemon on the server: paster serve --daemon dev.ini stop This is the error I get: No PID file exists in paster.pid Could not stop daemon; aborting Wondering how I can stop this daemon so I can reload dev.ini. Thanks! 回答1: kill the process. 来源: https://stackoverflow.com/questions/1502568/paster-cannot-stop-daemon

A simple Python deployment problem - a whole world of pain

匆匆过客 提交于 2019-12-29 10:06:14
问题 We have several Python 2.6 applications running on Linux. Some of them are Pylons web applications, others are simply long-running processes that we run from the command line using nohup . We're also using virtualenv , both in development and in production. What is the best way to deploy these applications to a production server? In development we simply get the source tree into any directory, set up a virtualenv and run - easy enough. We could do the same in production and perhaps that

Pyramid Chameleon I18N not finding template files

删除回忆录丶 提交于 2019-12-25 03:32:34
问题 I'm following this recipe, with a small test project called i18n Chameleon I18N I've set up the message_extractors as follows: message_extractors = { '.': [ ( '**.py', 'lingua_python', None ), ( '**.pt', 'lingua_xml', None ), ]}; When I run the extract_messages code, I don't get any templates processed: ../bin/python setup.py extract_messages -o locale/test.pot running extract_messages extracting messages from i18n/__init__.py extracting messages from i18n/models.py extracting messages from

Pyramid Chameleon I18N not finding template files

限于喜欢 提交于 2019-12-25 03:32:03
问题 I'm following this recipe, with a small test project called i18n Chameleon I18N I've set up the message_extractors as follows: message_extractors = { '.': [ ( '**.py', 'lingua_python', None ), ( '**.pt', 'lingua_xml', None ), ]}; When I run the extract_messages code, I don't get any templates processed: ../bin/python setup.py extract_messages -o locale/test.pot running extract_messages extracting messages from i18n/__init__.py extracting messages from i18n/models.py extracting messages from

How do I create a jinja2 filter and use it within pylons?

时间秒杀一切 提交于 2019-12-24 11:11:45
问题 Am going around the houses trying to find a way to implement a simple filter. I want to create the equivalent of some Smarty "tags" to make porting easier, notably {mail_to} http://www.smarty.net/manual/en/language.function.mailto.php I seem to be going around in circles between the jinga2 docs http://jinja.pocoo.org/2/documentation/extensions#module-jinja2.ext and the webhelpers http://pylonshq.com/docs/en/0.9.7/modules/templating/ What I'm expecting to write is something like {% mail_to

Has anyone succeeded in using celery with pylons

為{幸葍}努か 提交于 2019-12-23 13:25:52
问题 I have a pylons based webapp and i'd love to use celery + rabbitmq for some time taking tasks. I've taken a look at the celery-pylons project but I haven't succeeded in using it. My main problem with celery is: where do i put the celeryconfig.py file or is there any other way to specify the celery options eg. BROKER_HOST and the like, from within a pylons app (In the same way one can put the options in the django settings.py file when using django-celery). Basically, i investigated 2 options:

TurboGears 2 quickstart shows error immediately

末鹿安然 提交于 2019-12-23 12:44:20
问题 I am new to TurboGears and have just installed TG2 development in a virtual environment. I'm following along in the quickstart guide, and have successfully built a helloworld via paster quickstart I started the server and navigated a web-browser to localhost:8080 Wouldn't you know it, I immediately get an error, and not the welcome message the documentation suggests I should be seeing. The error reads: AttributeError: 'AcceptLanguage' object has no attribute 'best_matches' Here's the trace:

“Win32 exception occurred releasing IUnknown at…” error using Pylons and WMI

落花浮王杯 提交于 2019-12-22 14:54:43
问题 Im using Pylons in combination with WMI module to do some basic system monitoring of a couple of machines, for POSIX based systems everything is simple - for Windows - not so much. Doing a request to the Pylons server to get current CPU, however it's not working well, or atleast with the WMI module. First i simply did (something) this: c = wmi.WMI() for cpu in c.Win32_Processor(): value = cpu.LoadPercentage However, that gave me an error when accessing this module via Pylons ( GET http://ip

Why does Pylons use StackedObjectProxies instead of threading.local?

人走茶凉 提交于 2019-12-22 14:00:16
问题 It seems like threading.local is more straightforward and more robust. 回答1: StackedObjectProxy uses a threading.local underneath it. Pylons doesn't use plain threading.locals for 2 reasons: 1) it'd be a more intrusive API than a proxy. E.g. request().POST.get('file') vs request.POST.get('file') 2) StackedObjectProxys are not only thread safe, but also "request safe" -- meaning it's safe for a Pylons application to be embedded in another and reference the same proxy objects. The need for this

Why do I get an error on the last line of installing Pylons 1.0 with easy_install and Python 2.7 in Windows Vista 64?

情到浓时终转凉″ 提交于 2019-12-22 10:54:34
问题 I tried to install Pylons 1.0 with Python 2.7 using the easy_install command in Windows Vista 64 but got the error: raise ValueError(str(list(result.keys()))) ValueError: [u'path'] Here is the link to the whole installation process from command prompt http://pastie.org/1190341 Why do I get this error? How do I solve it? Will Pylons work even though I got this error? 回答1: From the error: File "C:\Python27\Lib\distutils\msvc9compiler.py", line 295, in q uery_vcvarsall raise ValueError(str(list