other links | http://www.google.com/search?hl=en&source=hp&biw=1024&bih=514&q=ctypes+tutorial&aq=f&aqi=g2g-v1&aql=&oq= | http://python.net/crew/theller/ctypes/tutorial.html | http://donaldkenney.110mb.com/CTYPES.HTM | http://www.google.com/search?hl=en&q=ctypes+visual+studio+example&aq=f&aqi=&aql=&oq= | http://fsckd.com/2009/4/25/simple-python-ctypes-example | http://www.lejordet.com/2009/04/simple-python-ctypes-example-in-windows/ | http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=c+library+to+load+wave+file | http://www.gamedev.net/page/resources/_/reference/programming/sound-and-music-programming/audio-file-formats/loading-a-wave-file-r709
This can be useful when you need to wrap a C library, which is often needed with older libraries and interfaces to older hardware.
Simple Example: | http://fsckd.com/2009/4/25/simple-python-ctypes-example
Simple Example using Visual Studio: | http://www.lejordet.com/2009/04/simple-python-ctypes-example-in-windows/
This tutorial is very easy to read: | http://donaldkenney.110mb.com/CTYPES.HTM
This is a nice complete tutorial: | http://python.net/crew/theller/ctypes/tutorial.html
ctypes provide a native way for python to make calls to C libraries.
the pycon talks that look interesting:
https://www.google.com/voice/b/0#inbox | http://us.pycon.org/2011/home/ | http://us.pycon.org/2011/speaker/ | http://us.pycon.org/2011/schedule/lists/posters/ | http://us.pycon.org/2011/schedule/presentations/250/ | http://us.pycon.org/2011/schedule/ | http://us.pycon.org/2011/schedule/presentations/246/ | http://us.pycon.org/2011/schedule/presentations/208/ | http://us.pycon.org/2011/schedule/presentations/88/ | http://us.pycon.org/2011/schedule/presentations/82/ | http://us.pycon.org/2011/schedule/presentations/263/ | http://us.pycon.org/2011/schedule/presentations/58/ | http://us.pycon.org/2011/schedule/presentations/222/ | http://us.pycon.org/2011/schedule/presentations/54/ | http://us.pycon.org/2011/schedule/presentations/37/ | http://us.pycon.org/2011/schedule/presentations/248/ | http://us.pycon.org/2011/schedule/presentations/14/ | http://us.pycon.org/2011/schedule/presentations/60/ | http://us.pycon.org/2011/schedule/presentations/238/ | http://us.pycon.org/2011/schedule/presentations/267/ | http://us.pycon.org/2011/schedule/presentations/170/ | http://us.pycon.org/2011/schedule/presentations/121/ | http://us.pycon.org/2011/schedule/presentations/216/ | http://us.pycon.org/2011/schedule/presentations/21/ | http://us.pycon.org/2011/schedule/presentations/198/ | http://us.pycon.org/2011/schedule/presentations/33/ | http://us.pycon.org/2011/schedule/presentations/249/ | http://hookbox.org/docs/intro.html | http://us.pycon.org/2011/schedule/presentations/1/ | http://us.pycon.org/2011/schedule/presentations/41/
looking at how python packages will be handled in python 3 setuptools doesn't distribute packages for it looks like distribute is taking over
testing should be very helpful I like the approach of urllib tests for JSON requests and responses easy enough to create and verify that way
requested [2011.01.28 08:52:15] just use a basic urllib2 script for testing since we're not always getting full results (nor are the forms obvious)
requested [2011.01.26 19:38:37] look up test notes (merged with communicate?)
requested [2011.01.26 19:35:28] write a super simple jquery script callable from the web with test functions for scorelogger app that way those won't need to change so often and functionality can be tested.
could also use any form of other testing: windmill, other simplified python scripts that way will know if the app server is behaving correctly or if the client is behaving correctly
making items launchable had some trouble with 2.7.1 using 2.6.6 after uninstalling 2.7.1 needed to reinstall 2.6.6 to get double click to work | http://docs.python.org/faq/windows.html#how-do-i-make-python-scripts-executable
for web based testing, check various scrape notes... it's a very similar process these are currently part of the communicate module (in the works)
/c/communicate/code/communicate/scrape/scrape-notes.txt twill and windmill are two favorites for this task
requested [2011.01.18 11:43:13] look into status of Pyglet and Cocoa / Objective C also [2011.01.24 14:55:14] recent thread (today) on pyglet-users on updating... sounds like there are some issues with PyObjC bridge itself... not able to go full screen(!)
download the cocoa-port branch for pyglet investigate differences view approaches for opening a window context there.
also [2011.01.25 14:47:53] hg clone https://pyglet.googlecode.com/hg/ pyglet-cocoa cd pyglet-cocoa #to switch to cocoa-port: hg update cocoa-port
python /c/moments/moments/scripts/diff_directories.py /c/downloads/python-testing/pyglet-cocoa/ /c/downloads/python-testing/pyglet-hg/
Pylons is becoming Pyramid which is based on repoze.bfg framework. Good to know if one of the larger frameworks are needed in the future.
see also communicate/converse/web_request.py
how to load a script and then go in to interactive mode with python: python -i script_name_to_load.py
bespin for online code editing in the cloud by mozillalabs.
see /c/scripts/web_server.py
see also scrape notes scrape-webtest.txt
once you have some start in place, run it using: /c/downloads/python/google_appengine/dev_appserver.py [options] <application root directory> /c/downloads/python/google_appengine/dev_appserver.py .
#for a different port: /c/downloads/python/google_appengine/dev_appserver.py --port 8081 application/
once you have something kind of working, it is fine to go ahead and push it out. Google makes this easy: /c/downloads/python/google_appengine/appcfg.py update application/
(splitting entry)
can eventually think about adding an interface to each of the models you created
consider process used in pose, consider process used in subcircuit
frameworks also start you with a template.
see also: svg.txt
sudo easy_install sphinx
If you're using the SDK application on Windows or Mac, you can use that to create a new app and configuration file. Other wise just create the files manually or start from a template:
cp /c/downloads/python/google_appengine/demos/guestbook/* /path/to/new/application/ edit app.yaml, change application name, change handlers->script (server.py) rename guestbook.py to server.py mv guestbook.py server.py edit server.py
other demos available: | http://code.google.com/p/google-app-engine-samples/ | http://code.google.com/p/google-app-engine-samples/wiki/GoogleAppEngineSamples
or
find a very simple "hello world" application to use as a template | http://code.google.com/appengine/docs/python/gettingstarted/helloworld.html
With a simple app foundation in place, convert the model to use the db.Model supplied by Google App Engine, and the various db.Properties.
after converting the model to the best of your ability, add it in to a new google app engine application. Don't worry about a framework at this stage. Can always migrate to that later as the need dictates.
(this assumes you've created an account on google app engine, and have downloaded the SDK somewhere locally... see below for notes on these steps)
I find it easier to just start with pure python and define some models that way. See: /c/scripts/new-application.py
and also: /c/scripts/template_script.py /c/scripts/test_sample.py
/c/technical/python/google_app_engine/instances.txt /c/technical/python/google_app_engine/setup.txt
you may also need to download the SDK if you're on a new machine | http://code.google.com/appengine/downloads.html
otherwise:
have been looking into ways to easily run MATLAB code in python. I tried out OMPC, but it was to alpha (and beyond my level to be able to help out)
Raj mentioned Octave last weekend. Thanks Raj! Not sure why I never thought to look for an open source version of Matlab. Hopefully it will help out in seeing what available code does when working to port it.
if you already have an app engine account, these links should suffice:
good reference here: | http://www.advogato.org/article/981.html
general way to convert area ui to other ui libraries meta UI code generator
consider moving mako in to project too
based on: | http://code.google.com/appengine/docs/python/gettingstarted/uploading.html
/c/sites/google_app_engine/google_appengine/appcfg.py update /c/sites/moments-web/project/app
so far not able to get anything to run with 2.5
update the python path at the start of the dev_appserver.py script if you've installed python2.5 so that it is not the default python instance
sudo chmod 777 google_appengine/dev_appserver.py
#!/usr/bin/python2.5
also [2010.07.11 21:07:33] having trouble getting things to run with stock build of 2.5 it at least launched with 2.6
other GAE framework options | http://www.google.com/#hl=en&source=hp&q=google+app+engine+framework+python&aq=3m&aqi=g1g-m7&aql=&oq=app+engine+frame&gs_rfai=C4aozyko6TIDMN4-GNKHCgNoMAAAAqgQFT9CPsTk&gs_upl=5877%2C3119%2C11%2C4%2C295%2C991%2C0%2C6%2C1%2C0%2C1%2C1%2C1&fp=c401d881a5ff002f | google app engine framework python - Google Search | http://en.wikipedia.org/wiki/Google_App_Engine | Google App Engine - Wikipedia, the free encyclopedia | http://code.google.com/p/tipfy/wiki/AppEngineFrameworks | AppEngineFrameworks - tipfy - Project Hosting on Google Code | http://stackoverflow.com/questions/70913/which-python-framework-is-best-for-web-development-in-google-app-engine | Which python framework is best for web development in google app engine? - Stack Overflow | http://code.google.com/p/tipfy/ | tipfy - Project Hosting on Google Code | http://www.tipfy.org/ | tipfy.org | http://www.tipfy.org/docs/ | Welcome to Tipfy’s documentation! — Tipfy v0.5.4 documentation | http://www.tipfy.org/wiki/tutorials/hello-world/ | Hello, World! Tutorial - tipfy.org
tipfy mentions to make sure you have 2.5 installed on your system to avoid strange errors down the road
download and install zlib from source before compiling python source: | http://www.zlib.net/
sudo apt-get install libssl-dev
for ubuntu, this is a good reference for installing from source: | http://welcometoubuntu.blogspot.com/2010/05/howto-install-python-255-on-ubuntu-1004.html
which says:
sudo apt-get install build-essential gcc cd Downloads wget http://www.python.org/ftp/python/2.5.5/Python-2.5.5.tgz tar -xvzf Python-2.5.5.tgz cd Python-2.5.5 ./configure --prefix=/usr/local/python2.5 make make test sudo make install sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
setuptools: sudo bash setuptools-0.6c11-py2.5.egg /usr/local/python2.5/bin/easy_install-2.5
sudo /usr/local/python2.5/bin/easy_install-2.5 pyopenssl
also [2010.07.11 21:29:47] sudo /usr/local/python2.5/bin/easy_install-2.5 ssl needed to download this manually | http://pypi.python.org/pypi/ssl
tar zxvf ssl-1.15.tar.gz sudo python2.5 setup.py install
Go to ${PYTHON_HOME}/lib/python2.4/site-packages/ssl and delete the __init__.pyc file. Now fire up a Python shell and try "import ssl" again.
still getting AttributeError: 'module' object has no attribute 'HTTPSHandler'
consider using a python framework for GAE specifically
I'm trying out tipfy
tar zxvf tipfy.0.5.9.build.tar.gz
dev_appserver.py /
try to think about adapting the use case you created in your test to a simple web based form if that is too involved, start with just creating a single new entity of a simple model and show those results.
more links
download google SDK: | http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Python
#standarizing on location: /c/downloads/python
unzip google_appengine_1.3.5.zip #resulting in: /c/downloads/python/google_appengine
install Google App Engine SDK view documentation: /c/sites/google_app_engine/google_appengine/README
https://appengine.google.com/dashboard/nonedeployed?app_id=charlesbrandt | http://code.google.com/appengine/docs/appcfg.html
1.1. Your use of the Google App Engine service (the "Service") is governed by this agreement (the "Terms"). "Google" means Google Inc., located at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States, and its subsidiaries or affiliates involved in providing the Service.
1.2. In order to use the Service, you must first agree to the Terms. You can agree to the Terms by actually using the Service. You understand and agree that Google will treat your use of the Service as acceptance of the Terms from that point onwards.
1.3. You may not use the Service if you are a person barred from receiving the Service under the laws of the United States or other countries including the country in which you are resident or from which you use the Service. You affirm that you are over the age of 13, as the Service is not intended for children under 13. 2. Your Account and Use of the Service
2.1. You must provide accurate and complete registration information any time you register to use the Service. You are responsible for the security of your passwords and for any use of your account. If you become aware of any unauthorized use of your password or of your account, you agree to notify Google immediately.
2.2. Your use of the Service must comply with all applicable laws, regulations and ordinances, including any laws regarding the export of data or software. You agree not to use the Service in the design, development, production, or use of missiles or the design, development, production, stockpiling, or use of chemical or biological weapons. You agree not to use the XMPP API to operate or to enable any telecommunications service or in connection with any applications that allow users to place calls to or receive calls from any public switched telephone network.
2.3. You agree not to (a) access (or attempt to access) the administrative interface of the Service by any means other than through the interface that is provided by Google in connection with the Service, unless you have been specifically allowed to do so in a separate agreement with Google, or (b) engage in any activity that interferes with or disrupts the Service (or the servers and networks which are connected to the Service). 3. Service Policies and Privacy
3.1. You agree to comply with the Google App Engine Program Policies included available at http://code.google.com/appengine/program_policies.html (or such URL as Google may provide) (the "Program Policies") which is incorporated herein by this reference and which may be updated from time to time.
3.2. The Service shall be subject to the privacy policy for the Service available at http://code.google.com/appengine/privacy.html (or such URL as Google may provide), which references and incorporates Google's privacy policy available at http://www.google.com/privacy.html. You agree to the use of your data in accordance with Google's privacy policies.
3.3. You agree that you will protect the privacy and legal rights of the users of your application. You must provide legally adequate privacy notice and protection for those users. To do so, at a minimum, you must incorporate the privacy terms available at http://code.google.com/appengine/privacy.html into the privacy policy for your application. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application and to Google.
3.4. If the user provides you with Google Account information, you may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so. 4. Fees for Use of the Service
4.1. Subject to the Terms, the Service is provided to you without charge up to certain quotas. These quotas will be known as the "Fee Threshold" and can be found here.
4.2. A bill will be issued to your online account for all charges accrued in excess of the Fee Threshold. For use of the Service in excess of any portion of the Fee Threshold, you shall be responsible for all charges up to the amount set in your online account, and shall pay all charges in U.S. Dollars or in such other currency as agreed to in writing by the parties. Unless agreed to by the parties in writing, you shall pay all charges in accordance with the payment terms in the Service FAQ. Late payments may bear interest at the rate of 1.5% per month (or the highest rate permitted by law, if less). Charges are exclusive of taxes. You are responsible for paying all taxes and government charges, and all reasonable expenses and attorneys fees Google incurs collecting late amounts. To the fullest extent permitted by law, you waive all claims relating to charges unless claimed within 60 days after the charge (this does not affect your credit card issuer rights). Charges are solely based on Google's measurements of your use of the Service, unless otherwise agreed to in writing. To the fullest extent permitted by law, refunds (if any) are at the discretion of Google and only in the form of credit for the Service. Nothing in these Terms obligates Google to extend credit to any party. You acknowledge and agree that any credit card and related billing and payment information that you provide to Google may be shared by Google with companies who work on Google's behalf, such as payment processors and/or credit agencies, solely for the purposes of checking credit, effecting payment to Google and servicing your account. Google may also provide information in response to valid legal process, such as subpoenas, search warrants and court orders, or to establish or exercise its legal rights or defend against legal claims. Google shall not be liable for any use or disclosure of such information by such third parties. Google reserves the right to discontinue the provision of the Service to you for any late payments.
4.3. Google may change its fees and payment policies for the Service with ninety (90) days prior notice. However, Google may change the Fee Threshold limits at its discretion. Changes to the fees or payment policies will be posted in the Service FAQ or at http://code.google.com/appengine/terms.html (or such other URL Google may provide from time to time). Any outstanding balance becomes immediately due and payable upon termination of the Terms for any reason.
4.4. You may not develop multiple Applications to simulate or act as a single Application or otherwise access the Service in a manner intended to avoid incurring fees. 5. Content in the Service and Take Down Obligations
5.1. You understand that all information (such as data files, written text, computer software, music, audio files or other sounds, photographs, videos or other images) to which you may have access as part of, or through your use of, the Service are the sole responsibility of the person from which such content originated. All such information is referred to below as the "Content." The term Content shall specifically exclude the web application that you create using the Service and any source code written by you to be used with the Service (collectively, the "Application").
5.2. Google reserves the right (but shall have no obligation) to pre-screen, review, flag, filter, modify, refuse or remove any or all Content from the Service. You agree to immediately take down any Content that violates the Program Policies, including pursuant to a take down request from Google. In the event that you elect not to comply with a request from Google to take down certain Content, Google reserves the right to directly take down such Content or to disable the Application.
5.3. In the event that you become aware of any violation of the Program Policies by an end user of the Application, you shall immediately terminate such end user's account on your Application. Google reserves the right to terminate end user Google accounts or disable the Application in response to a violation or suspected violation of the Program Policies.
5.4. You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) the Application or any Content that you create, transmit or display while using the Service and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
5.5. You agree that Google has no responsibility or liability for the deletion or failure to store any Content and other communications maintained or transmitted through use of the Service. You further acknowledge that you are solely responsible for securing and backing up your Application and any Content. 6. Proprietary Rights
6.1. You acknowledge and agree that Google (or Google's licensors) own all legal right, title and interest in and to the Service, including any intellectual property rights which subsist in the Service (whether those rights happen to be registered or not, and wherever in the world those rights may exist).
6.2. Unless you have agreed otherwise in writing with Google, nothing in the Terms gives you a right to use any of Google's trade names, trade marks, service marks, logos, domain names, and other distinctive brand features.
6.3. Except as provided in Section 8, Google acknowledges and agrees that it obtains no right, title or interest from you (or your licensors) under these Terms in or to any Content or the Application that you create, submit, post, transmit or display on, or through, the Service, including any intellectual property rights which subsist in that Content and the Application (whether those rights happen to be registered or not, and wherever in the world those rights may exist). Unless you have agreed otherwise in writing with Google, you agree that you are responsible for protecting and enforcing those rights and that Google has no obligation to do so on your behalf. 7. License from Google and Restrictions
7.1. Google gives you a personal, worldwide, royalty-free, non-assignable and non-exclusive license to use the software provided to you by Google as part of the Service as provided to you by Google (referred to as the "Google App Engine Software" below). This license is for the sole purpose of enabling you to use and enjoy the benefit of the Service as provided by Google, in the manner permitted by the Terms.
7.2. You may not (and you may not permit anyone else to): (a) copy, modify, create a derivative work of, reverse engineer, decompile or otherwise attempt to extract the source code of the Google App Engine Software or any part thereof, unless this is expressly permitted or required by law, or unless you have been specifically told that you may do so by Google, in writing (e.g., through an open source software license); (b) attempt to disable or circumvent any security mechanisms used by the Service or any Application; (c) use the Service to create an Application that performs a malicious activity, including but not limited to spamming users, harvesting usernames and passwords, performing unauthorized scans of machines or ports or creating DoS attacks; or (d) upload or otherwise process any malicious content to or through the Service.
7.3. Unless Google has given you specific written permission to do so (e.g., through an open source software license), you may not assign (or grant a sub-license of) your rights to use the Google App Engine Software, grant a security interest in or over your rights to use the Google App Engine Software, or otherwise transfer any part of your rights to use the Software.
7.4. Open source software licenses for components of the Service released under an open source license constitute separate written agreements. To the limited extent that the open source software licenses expressly supersede these Terms, the open source licenses govern your agreement with Google for the use of the components of the Service released under an open source license. 8. License from You
8.1. Google claims no ownership or control over any Content or Application. You retain copyright and any other rights you already hold in the Content and/or Application, and you are responsible for protecting those rights, as appropriate. By submitting, posting or displaying the Content on or through the Service you give Google a worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute such Content for the sole purpose of enabling Google to provide you with the Service in accordance with its privacy policy. Furthermore, by creating an Application through use of the Service, you give Google a worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute such Application for the sole purpose of enabling Google to provide you with the Service in accordance with its privacy policy.
8.2. You agree that Google, in its sole discretion, may use your trade names, trademarks, service marks, logos, domain names and other distinctive brand features in presentations, marketing materials, customer lists, financial reports and Web site listings (including links to your website) for the purpose of advertising or publicizing your use of the Service. 9. Software Updates
9.1. The Software which you use may automatically download and install updates from time to time from Google. These updates are designed to improve, enhance and further develop the Service and may take the form of bug fixes, enhanced functions, new software modules and completely new versions. You agree to receive such updates (and permit Google to deliver these to you) as part of your use of the Service. 10. Modification and Termination of the Service
10.1. Google is constantly innovating in order to provide the best possible experience for its users. You acknowledge and agree that the form and nature of the Service which Google provides may change from time to time without prior notice to you, subject to the terms in Sections 4.3 and 10.2. Changes to the form and nature of the Service will be effective with respect to all versions of the Service (including the Deprecated Version of the Service); examples of changes to the form and nature of the Service include without limitation changes to fee and payment policies, security patches, added functionality, and other enhancements.
10.2. If Google in its discretion chooses to cease providing the current version of the Service whether through discontinuation of the Service or by upgrading the Service to a newer version, the current version of the Service will be deprecated and become the Deprecated Version of the Service. Google will issue an announcement if the current version of the Service will be deprecated. For a period of 3 years after an announcement (the “Deprecation Period”), Google will use commercially reasonable efforts to continue to operate the Deprecated Version of the Service and to respond to problems with the Deprecated Version of the Service deemed by Google in its discretion to be critical. During the Deprecation Period, no new features will be added to the Deprecated Version of the Service.
Google reserves the right in its discretion to cease providing all or any part of the Deprecated Version of the Service immediately without any notice if:
At any time prior to discontinuing the current version of the Service or upgrading to a new version of the Service, Google may, in its discretion as part of its continuing innovation to provide the best possible experience for its users, label certain features or functionality of the Service as "experimental." This Section 10.2 of the Terms will not apply to any features or functionality labeled as "experimental."
This Section 10.2 of the Terms also will not apply to the Google App Engine Software (as defined in Section 7.1).
10.3. You may discontinue your use of the Service at any time. Google may, at any time, terminate your use of the Service if (A) you have breached any provision of the Terms (or have acted in manner that clearly shows that you do not intend to, or are unable to comply with the provisions of the Terms); or (B) Google is required to do so by law (for example, due to a change to the law governing the provision of the Service); or (C) the Service relies on data or services provided by a third party partner and the relationship with such partner (i) has expired or been terminated or (ii) requires Google to change the way Google provides the data or services through the Service; or (D) providing the Service could create a substantial economic burden as determined by Google in its reasonable good faith judgment; or (E) providing the Service could create a security risk or material technical burden as determined by Google in its reasonable good faith judgment.
10.4. If Google suspends or terminates your use of the Service with cause (or you voluntarily discontinue your use of the Service), you will have access to, and the ability to export, your Content for a period of ninety (90) days following such suspension or termination. Fees will continue to be assessed for usage of the Service in excess of any portion of the Fee Threshold during the 90 day period. Notwithstanding the foregoing, the rights set forth in this Section 10.4 are subject to your payment of any outstanding fees due upon and after termination for your use of the Service.
10.5. Upon any termination of the Service under Sections 4 or 10 , these Terms will also terminate, but Sections 6.1, 11, 12, 13, and 17 shall continue to be effective after these Terms are terminated. 11. EXCLUSION OF WARRANTIES
11.1. NOTHING IN THESE TERMS, INCLUDING SECTIONS 11 AND 12, SHALL EXCLUDE OR LIMIT GOOGLE'S WARRANTY OR LIABILITY FOR LOSSES WHICH MAY NOT BE LAWFULLY EXCLUDED OR LIMITED BY APPLICABLE LAW.
11.2. YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SERVICE IS AT YOUR SOLE RISK AND THAT THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE."
11.3. GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS MAKE NO EXPRESS WARRANTIES AND DISCLAIM ALL IMPLIED WARRANTIES REGARDING THE SERVICE INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS DO NOT REPRESENT OR WARRANT TO YOU THAT: (A) YOUR USE OF THE SERVICE WILL MEET YOUR REQUIREMENTS, (B) YOUR USE OF THE SERVICE WILL BE UNINTERRUPTED, TIMELY, SECURE OR FREE FROM ERROR, AND (C) USAGE DATA PROVIDED THROUGH THE SERVICE WILL BE ACCURATE. 12. LIMITATION OF LIABILITY
12.1. SUBJECT TO SECTION 11.1 ABOVE, YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL CONSEQUENTIAL OR EXEMPLARY DAMAGES WHICH MAY BE INCURRED BY YOU, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY. THIS SHALL INCLUDE, BUT NOT BE LIMITED TO, ANY LOSS OF PROFIT (WHETHER INCURRED DIRECTLY OR INDIRECTLY), ANY LOSS OF GOODWILL OR BUSINESS REPUTATION, ANY LOSS OF DATA SUFFERED, COST OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR OTHER INTANGIBLE LOSS.
12.2. THE LIMITATIONS ON GOOGLE'S LIABILITY TO YOU IN PARAGRAPH 12.1 ABOVE SHALL APPLY WHETHER OR NOT GOOGLE HAS BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. 13. Indemnification
13.1. You agree to hold harmless and indemnify Google, and its subsidiaries, affiliates, officers, agents, employees, advertisers, licensors, suppliers or partners, (collectively "Google and Partners") from and against any third party claim arising from or in any way related to (a) your breach of the Terms, (b) your use of the Service, (c) your violation of applicable laws, rules or regulations in connection with the Service, or (d) your Content or your Application, including any liability or expense arising from all claims, losses, damages (actual and consequential), suits, judgments, litigation costs and attorneys' fees, of every kind and nature. In such a case, Google will provide you with written notice of such claim, suit or action. 14. Policies Regarding Copyright and Trademarks
14.1. You agree to set up a process to respond to notices of alleged infringement that comply with the United States' Digital Millennium Copyright Act ("DMCA notices"). It is Google's policy to respond to DMCA notices or other applicable copyright laws and to terminate the accounts of repeat infringers. We reserve the right to take down content in your Application or, if necessary, the Application itself upon receipt of a valid DMCA notice. For more information, please go to http://www.google.com/dmca.html.
14.2. For information regarding our trademark complaint procedure, please go to http://www.google.com/tm_complaint.html. Any use of Google's trade names, trademarks, service marks, logos, domain names, and other distinctive brand features must be in compliance with the Terms and in compliance with Google's then current Brand Feature use guidelines, and any content contained or reference therein, which may be found at the following URL: http://www.google.com/permissions/guidelines.html (or such other URL Google may provide from time to time). 15. Other Content
15.1. The Services may include hyperlinks to other web sites or content or resources or email content. Google may have no control over any web sites or resources which are provided by companies or persons other than Google.
15.2. You acknowledge and agree that Google is not responsible for the availability of any such external sites or resources, and does not endorse any advertising, products or other materials on or available from such web sites or resources.
15.3. You acknowledge and agree that Google is not liable for any loss or damage which may be incurred by you or users of your Application as a result of the availability of those external sites or resources, or as a result of any reliance placed by you on the completeness, accuracy or existence of any advertising, products or other materials on, or available from, such web sites or resources. 16. Changes to the Terms
16.1. Google may make changes to the Terms from time to time. When these changes are made, Google will make a new copy of the Terms available at http://code.google.com/appengine/terms.html.
16.2. You understand and agree that if you use the Service after the date on which the Terms have changed, Google will treat your use as acceptance of the updated Terms. 17. General Legal Terms
17.1. The Terms constitute the whole legal agreement between you and Google and govern your use of the Service (but excluding any services which Google may provide to you under a separate written agreement), and completely replace any prior agreements between you and Google in relation to the Service.
17.2. There are no third party beneficiaries to these Terms. The parties are independent contractors, and nothing in these Terms creates an agency, partnership or joint venture.
17.3. If Google provides you with a translation of the English language version of these Terms, the English language version of these Terms will control if there is any conflict.
17.4. You agree that Google may provide you with notices, including those regarding changes to the Terms, by email, regular mail, or postings on the Service.
17.5. You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the Terms (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
17.6. Google shall not be liable for failing or delaying performance of its obligations resulting from any condition beyond its reasonable control, including but not limited to, governmental action, acts of terrorism, earthquake, fire, flood or other acts of God, labor conditions, power failures, and Internet disturbances.
17.7. The Terms, and your relationship with Google under the Terms, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the Terms. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
open a browser and start here: | http://code.google.com/appengine/
There are links to follow for setting up a new account.
Will need to verify the account with a mobile number.
Note that there can be only one account setup per mobile number. choose the account you associate with wisely!
After you have verified, choose an application name. (seems that many options have been chosen already)
agree to the terms.
Will get a page as follows: The application will use charlesbrandt as an identifier. This identifier belongs in your application's configuration as well. Note that this identifier cannot be changed. Learn more
If you use Google authentication for your application, Moments will be displayed on Sign In pages when users access your application.
Choose an option below:
- View the dashboard for Moments.
- Use appcfg to upload and deploy your application code.
- Add administrators to collaborate on this application.
bookmark the links there
venkman javascript debugger added to firefox
new context created.
/c/sites/pyjamas/instances.txt /c/sites/pyjamas/launch.sh /c/sites/pyjamas/journal.txt /c/sites/pyjamas/todo.txt
new directory for keeping notes on pyjamas development might be some other notes in technical
easy_install paste sudo easy_install PasteDeploy sudo easy_install PasteScript
you can download the google app engine development toolkit to develop python web apps locally
once downloaded and installed, launch it: GoogleAppEngineLauncher
load links for reference
can use the AppEngineLauncher to create a new project (remember no underscores ("_") in app name!) storing in /c/sites/google_app_engine directory for now can launch and view hello world from there.
do this after libjpeg install | http://biomunky.wordpress.com/2010/04/19/pil-10-6-using-pip/
sudo easy_install pip
then
sudo pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz
can test and verify installation with: cd /c/scripts python image_resize.py notice_world.jpg 100
generate html/jquiery interface from AreaUI
mercurial is usually installed earlier in the process... it is needed before other python libraries make sure you have it, and if not, install it now
also [2009.06.22 09:08:16] notes for this are elsewhere but this is also a good time to install mercurial easy_install mercurial
on Mac OS X this does require Xcode to be up to date (can still download an executable for mac)
cd /c/downloads/python/ hg clone https://pyglet.googlecode.com/hg/ pyglet cd pyglet hg update cocoa-port sudo python setup.py develop (or install)
get any packages that are not included for Python: /c/technical/system/python-install.txt
always looking for the library to sleep
from time import sleep; sleep(delay)
easy_install virtaulenv #virtualenv temp virtualenv --no-site-packages temp cd temp source bin/activate
not sure how to make pip download packages for later installation
from docutils import core
def rst2html(rst):
overrides = {'input_encoding': 'unicode',
'doctitle_xform': 1,
'initial_header_level': 1}
parts = core.publish_parts(
source=rst,
writer_name='html', settings_overrides=overrides)
fragment = parts['html_body']
return fragment
summarized from earlier entries easy to just include when and where needed see also: | http://code.activestate.com/recipes/193890/
fairly exhaustive search of the options available for recording audio with python.
To run your script from the Finder you have two options:
- Drag it to PythonLauncher
- Select PythonLauncher as the default application to open your script (or any .py script) through the finder Info window and double-click it. PythonLauncher has various preferences to control how your script is launched. Option-dragging allows you to change these for one invocation, or use its Preferences menu to change things globally.
for other operating systems, it should be reasonably easy to make an icon that launches the script
this also looked like a good solution for making executables: | http://cx-freeze.sourceforge.net/
Pyglet is available at: pyglet.org
I download the latest distribution and put it: /c/downloads/python/pyglet-1.1.3/
the documentation included with pyglet is fantastic
the html docs start at: file:///c/downloads/python/pyglet-1.1.3/doc/html/index.html
( CopyAllUrls will not load local (file:///) links )
Docs are also available online: | http://www.pyglet.org/doc/ | pyglet Documentation Index | http://www.pyglet.org/doc/programming_guide/index.html | Programming Guide | http://www.pyglet.org/doc/api/index.html | pyglet API reference
also [2009.12.04 17:31:26] other related files for notes: /c/technical/python/pyglet.txt /c/technical/python/gui.txt
examples are a great place to start. they are located at: cd /c/downloads/python/pyglet-1.1.3/examples
#other sample files:
#this is a good file for getting a window to show up using only pyglet: /c/charles/code/python/pyglet/sample.py #try running it via command line! should see a white window
#this demo is based off of simplui: /c/charles/code/python/pyglet/browser/demo.py
see also: graphs-trees-hierarchies.txt
math-science.txt
windmill firefox
looks like they're getting better. stabilizing.
cd /c/moments/docs/ sphinx-build -b html . ./_build
cp ../charles/.hgignore .
these notes are formalized in: startup-python.sh
see also: /c/external/sites/charlesbrandt.com/python/pylons/mako.txt
see also python/templates.txt
no generalized notes for using pyglet granted the documentation included with pyglet is fantastic should still be some reference to where to look first which parts are best and where those docs live if downloaded locally.
notes are also scattered about in various scripts and libraries. need to distill lessons learned
also [2011.01.25 15:23:09] #this has general introduction, instructions, etc /c/technical/python/pyglet-general.txt originally: [2009.12.04 17:33:08]
inserts code from a file: .. literalinclude:: example.py
written with python | http://mail.python.org/pipermail/python-list/2006-December/589700.html | Python Operating System | http://www.google.com/search?q=Uuu+python&btnG=Search&hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=f14&sa=2 | Uuu python - Google Search | http://jtauber.com/cleese/ | James Tauber : Cleese | http://code.google.com/p/cleese/ | cleese - Project Hosting on Google Code | http://code.google.com/p/cleese/wiki/CleeseProject | CleeseProject - cleese - Project Hosting on Google Code | http://code.google.com/p/cleese/wiki/ExperimentalSubProjects | ExperimentalSubProjects - cleese - Project Hosting on Google Code | http://www.daniweb.com/forums/thread64256.html# | Operating System in Python - Python | http://en.wikipedia.org/wiki/Unununium_(operating_system | Unununium (operating system - Wikipedia, the free encyclopedia | http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=unununium | unununium - Google Search | http://unununium.org/?page_id=2 | About « Unununium Operating Engine | http://unununium.org/ | Unununium Operating Engine | http://www.google.com/search?q=real+time+operating+system+python&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a | real time operating system python - Google Search | http://www.faqts.com/knowledge_base/view.phtml/aid/1388/fid/268 | FAQTs - Knowledge Base - View Entry - Does Python run on any RTOS? (ie Phar Lap ETS)? | http://mail.python.org/pipermail/python-list/2001-September/106513.html | Realtime capabilities? | http://www.google.com/search?q=embedded+python&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a | embedded python - Google Search | http://stackoverflow.com/questions/1402933/python-on-an-real-time-operation-system-rtos | Python on an Real-Time Operation System (RTOS) - Stack Overflow
if using the site templates frequently (and once they stabalize) would be nice to have a paster
paster serve --reload development.ini
view in firefox: | http://localhost:5000/
if no controller has been created, will get a 404
remove public index.html (otherwise it will be default) cd (package)/public #rm index.html bg.png pylons-logo.gif hg rm personnel/public/bg.png hg rm personnel/public/pylons-logo.gif hg rm personnel/public/index.html
#make images and css directories in public: cp -R /c/external/sites/charlesbrandt.com/templates/pylons/public/css public/ #import other default template files: cp -R /c/external/sites/charlesbrandt.com/templates/pylons/templates/* templates/ cp -R /c/external/sites/charlesbrandt.com/templates/pylons/controllers/* controllers/
#be sure to choose if you want the sqlalchemy version (model-sa) or non-sa: cp /c/external/sites/charlesbrandt.com/templates/pylons/model/* model/
update the imports in the controllers you plan to use
update lib/helpers.py to import webhelpers cp /c/external/sites/charlesbrandt.com/templates/pylons/lib/* lib/
sudo easy_install virtualenv
how to find the name of the current operating system best way seems to be to use:
sys.platform if sys.platform == "darwin": ...
deployment is about running your application on a system for someone to use. Usually in the sense of a hosted solution delivered via a network.
see package_code for notes on publishing and releasing packages
sphinx-build -b html . ./_build
sphinx-build -b html . ./.build or make html
notes on installing Sphinx from source:
#2009.09.04 09:57:32 charles@context:/media/C/downloads/python/sphinx tar zxvf docutils-0.5.tar.gz
python setup.py install sudo python setup.py install
cd ../pygments/ sudo python setup.py install
cd ../jinja2/ sudo python setup.py install
cd ../sphinx sudo python setup.py install
adapted from: | http://pylonsbook.com/en/1.0/documentation.html
once sphinx is installed initialize a new project with:
cd [project]/docs mv index.txt index.txt.orig sphinx-quickstart
.txt for extension yes to autodoc
looks like pyglet api docs used epydoc
this is a good one | http://pylonsbook.com/en/1.0/documentation.html
make sure /Library/Frameworks/Python.framework/Versions/2.5/bin is in the shell path
cd /c/clients/srl/
notes for downloading and installing python packages offline have been scattered. creating a new file in topics for these notes:
from /c/system/startup.txt
cd /directory/for/sources sudo easy_install -zmaxd . pylons #sudo easy_install -zmaxd . simplejson
then on offline machine, use: sudo easy_install -f . Pylons
cd /downloads/python/ mkdir sphinx cd /downloads/python/sphinx/ sudo easy_install -zmaxd . sphinx sudo easy_install -f . Sphinx
note that pyroom is a linux only application that uses GTK for its UI layer from: | http://pyroom.org/download.html | Requirements
PyRoom doesn't need much to operate. All you need is a fairly recent version of Python (2.4 2.5 and 2.6 have been tested), GTK bindings for python and XDG bindings. Gconf-Bindings for Python (python-gconf) are recommended. Those dependencies are available in most major Linux distributions.
for full screen terminal on mac os x see iTerm
see also new_module.txt
package-new.txt redirects here.
requested [2009.08.07 12:06:30] multi-line text entry is there one in simplui? generalize all pyglet gui notes extract to new topic.
/c/python/topics/gui.txt /c/python/pyglet/gui.txt /c/media/design/gui.txt
gui notes are spread out: /c/python/topics/gui.txt /c/python/pyglet/gui.txt /c/media/design/gui.txt
import sys, os print sys.path[0]
will print the directory where this script resides. additionally you can use
sys.argv[0]
to get the filename of the script. to join the two do
os.path.join(sys.path[0], sys.argv[0])
if module should be installed on new systems, be sure to add it to: /c/system/startup.sh (/c/system/startup-python.sh is for non-locally developed modules)
then run install commands on your system so it is available for development:
remember that colors are (usually) specified as floating point numbers with values between 0 and 1.0
started [2009.07.06 09:55:50] | http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=sage+notebook&btnG=Google+Search | sage notebook - Google Search | http://www.sagemath.org/tour.html | Sage - Tour | http://www.sagemath.org/links-components.html | Sage - Components | http://en.wikipedia.org/wiki/Sage_(mathematics_software) | Sage (mathematics software) - Wikipedia, the free encyclopedia | http://en.wikipedia.org/wiki/SymPy | SymPy - Wikipedia, the free encyclopedia
have seen other solutions see notes in SRL repo links
local files do not work with copyAllUrls file:///c/python/pyglet/pyglet.txt file:///c/python/pyglet/doc/html/index.html file:///c/python/pyglet/doc/html/programming_guide/index.html file:///c/python/pyglet/doc/html/api/index.html
be sure to set up easy_install for the new python instance this can be done by running ez_setup.py available at: | http://peak.telecommunity.com/dist/ez_setup.py
curl http://peak.telecommunity.com/dist/ez_setup.py > ez_setup.py
for sprites in pyglet, just calling .delete() works
when playing back media on mac, make sure you are using a terminal associated with the currently logged in user!! using a different user will allow the video to show up
tessa was investigating different ways to plot graphs... thought I would at least mention matplotlib. :)
pygame developers strongly discourage using QT, wxWindows mixed with pygame... might be able to get away with it in pyglet, but still have the two event loop issues.
seems like multitouch may need it's own category... not sure where it should live yet.
be sure to add in a way to exit the program if you enable fullscreen mode! will lock out everything else if you don't!! hehe... oops reboot
https://panel.dreamhost.com/index.cgi? DreamHost Web Panel > Goodies : One-Click Installs | http://wiki.dreamhost.com/Special:Search?search=pybloxsom&go=Go | Search results - DreamHost | http://www.google.com/search?q=pybloxsom&hl=en&client=firefox-a&rls=org.mozilla:en-US:official&hs=ZFV&start=10&sa=N | pybloxsom - Google Search | http://pyblosxom.sourceforge.net/ | PyBlosxom - main site | http://mikewatkins.ca/2007/10/12/pybloxsom-out-qp-journal-in/index.html | Pybloxsom out, QP Journal in - mike watkins dot ca | http://localhost:5000/dir/media/code/python | : python | http://localhost:5000/dir/media/code/python/topics | : topics | http://localhost:5000/journal/log/media/code/python/topics/blog_and_cms.txt | : blog_and_cms.txt | http://www.google.com/search?q=python+blog&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a | python blog - Google Search | http://wiki.python.org/moin/PythonBlogSoftware | PythonBlogSoftware - PythonInfo Wiki | http://broadcast.oreilly.com/2009/01/zine-python-blogging-software.html | Zine: Python Blogging Software by Armin Ronacher - O'Reilly Broadcast | http://zine.pocoo.org/ | Welcome › Zine | http://zine.pocoo.org/about/requirements | About › Zine | http://byteflow.su/ | Byteflow - a Python/Django Blog Engine
investigating the "Observer Pattern" used in the event framework for pyglet very similar to asynchronous
/c/media/code/python/topics/presentations.txt /c/downloads/python/pyglet/bruce-3.2.1/bruce/rst_parser.py /c/downloads/python/pyglet/bruce-3.2.1/bruce/presentation.py /c/downloads/python/pyglet/bruce-3.2.1/bruce/run.py /c/virtuals/pyglet/pyglet-1.1.3/examples/image_display.py /c/virtuals/pyglet/pyglet-1.1.3/pyglet/app/__init__.py
some issues with images in pyglet if they are too big, they seem to cause problems... maybe bigger than display?
theory supported by: | http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=pyglet+images+bigger+than+window&btnG=Google+Search | pyglet images bigger than window - Google Search | http://groups.google.com/group/pyglet-users/browse_thread/thread/fca05d1f8feed7a1 | direct drawing into a texture - pyglet-users | Google Groups
files for pyglet that handle vsync:
/c/virtuals/pyglet/pyglet-1.1.3/pyglet/window/carbon/__init__.py /c/virtuals/pyglet/pyglet-1.1.3/pyglet/gl/agl.py /c/virtuals/pyglet/pyglet-1.1.3/pyglet/window/__init__.py /c/virtuals/pyglet/pyglet-1.1.3/pyglet/app/carbon.py
By default pyglet window buffer swaps are synchronised to the display refresh rate, so you may also want to disable set_vsync.
attempted an install from source... ended up going with a binary distribution
#curl http://www.ijg.org/files/jpegsrc.v6b.tar.gz > /tmp/libjpeg.tar.gz curl http://www.ijg.org/files/jpegsrc.v8a.tar.gz > /tmp/libjpeg.tar.gz
tar -xzvf /tmp/libjpeg.tar.gz cd jpeg-8a ./configure
sudo make install
cd ../ sudo rm -rf jpeg-8a
download and move prebuilt binary for osx to /usr/local/bin sudo mv ~/Desktop/jhead /usr/local/bin sudo chmod +x /usr/local/bin/jhead
spent a few hours last night running through the examples included with pyglet. very cool stuff!
should be other links mentioned elsewhere should pool them here
/c/downloads/python/pyglet-1.1.3/examples python media_player.py /media/CHARLES/outgoing/MVI_8486.AVI
that is a good first test to make sure AVBin is installed locally (have added to media/system/startup-live.sh)
pyglet.media.riff.RIFFFormatException: Unsupported RIFF form "AVI "
make sure avbin has been installed on the system
#2009.04.06 11:45:36 work@140-182-132-176:/c/virtuals/pyglet/pyglet-1.1.3/examples pythonw image_display.py /c/media/projects/IMG_8116_l.JPG
to:ianb@colorstudy.org? I just ran across this issue when trying to use pyglet in a virtual environment on Mac OS X. The message from pyglet was: pyglet.window.carbon.CarbonException: Window manager is not available. Ensure you run "pythonw", not "python"
which lead me to a more recent thread: | http://groups.google.com/group/python-virtualenv/browse_thread/thread/83fa4a12d22a30c8/744e19c194f1618a
which has a fix at: | http://github.com/gldnspud/virtualenv-pythonw-osx/tree/master
I haven't tried the fix yet, but I thought I might send it on to see if it is something that should be included with virtualenv. It's not so much about supporting older versions of python, just being able to use pythonw from a virtualenv.
-Charles
On May 16 2008, 3:12 pm, Ian Bicking <i...@colorstudy.com> wrote: > dmp wrote: > > > On Wed, Apr 16, 2008 at 2:27 PM, Ian Bicking <i...@colorstudy.com > > <mailto:i...@colorstudy.com>> wrote: > > > dmp wrote: > > > Using virtualenv 1.0 I created a virtual environment, installed > > an app > > > that tries to open a GUI dialog, and keep getting the following > > message: > > > > This program needs access to the screen. Please run with 'pythonw', > > > not 'python', and only when you are logged in on the main display of > > > your Mac. > > > > Is there a fix for this yet? I (naively) tried copying the pythonw > > > executable to the virtualenv bin directory but that didn't work. A > > > google search turned up only one useful hit -- from a couple > > months ago > > > where Robert Kern indicated he had a patch that would fix this. Is > > > there a plan to get that into virtualenv at all? > > > I don't see that patch, do you know where it is? > > > I can't believe I didn't at least provide the link to the archived > > message from Robert. Here it is: > > http://www.mail-archive.com/distutils-...@python.org/msg04223.html > > > I'm not sure he ever finished / submitted it. I can ask him tomorrow > > about it though. > > Was there a followup for this? The email describes a fairly complicated > solution, so I'm not sure what to do about it. Supporting older > versions of Python isn't a huge concern in every situation, I think, > because the idea of virtualenv is isolation so that everything doesn't > have to be run on the same set of libraries or Python version. So if > things work okay on Python 2.4 that would be good enough for me. A > warning for users would be nice, but I'm not really sure what's going on > here. > > -- > Ian Bicking : i...@colorstudy.com :http://blog.ianbicking.org
avbin is used by default in pyglet some discussion about the use of gstreamer in pyglet | http://code.google.com/p/pyglet/wiki/MediaOnLinux | http://www.mechanicalcat.net/richard/log/Python/Say_hello_to_pyglet
gstreamer interface reported to be complex.
downloaded source, docs and avbin to USB attempting install for linux
/media/CHARLES/downloads/python/avbin-linux-x86-32-7 sudo bash install.sh
/media/CHARLES/downloads/python/pyglet-1.1.3 sudo python setup.py install
bruce uses pyglet to display slides via open gl... this works full screen
make sure model files have been created cp ../personnel-try1/personnel/model/__init__.py personnel/model/
paster setup-app development.ini
#make sure development.ini is using an open port: vi development.ini
update routes
python setup.py develop
have done this essentially with the main page for contextiskey.com any other modifications should be requested [2008.03.15 10:40] put "hello world" in the middle of the cloud
maybe use inkskape to clean it up a bit? (raster can look cool though)
file:///media/Charles/personal/projects/journal/browser/interface/slice.html
virtualenv --no-site-packages personnel-virtual
cd personnel-virtual
source bin/activate
easy_install pylons easy_install formalchemy
paster create -t pylons_fa
cd personnel
hg init cp ../.hgignore .
hg add hg ci -m "new repo for new project"
pymedia has still not had any new activity better off looking for other media libraries in python
most notably recently is either | http://code.google.com/p/avbin/ | avbin - Google Code
or gstreamer... see notes in gstreamer.txt: | http://localhost:5000/journal/log/media/code/python/gstreamer.txt
was looking at twisted for xmpp today (also wanted to test making a new moment link from a journal view in pose :) )
not sure why this file was empty
reinteract is written using pygtk which does not look native on OS X
would be cool to integrate some of the features of reinteract with PsychoPyIDE
installing gstreamer is not python specific there are many applications that use gstreamer gstreamer requires a native build for a given operating system
https://launchpad.net/elisa/+download Elisa project files | http://groups.google.com/group/comp.lang.python.announce/browse_thread/thread/b355a76c7bb08184 | Elisa Media Center 0.5.31 Release - comp.lang.python.announce | Google Groups | http://elisa.fluendo.com/participate/ | Elisa, the free media player - Participate | http://www.fluendo.com/shop/product/complete-set-of-playback-plugins/ | Fluendo Shop
https://code.fluendo.com/pigment/trac Pigment - Trac | http://www.jokosher.org/ | Jokosher | http://www.jokosher.org/screenshots | Jokosher » Screenshots
(not sure if you can use the libraries bundled with songbird somehow?)
(looks like gstreamer has ffmpeg plugins, so that should allow utilization of both sets of plugins... seems better than locking in to one only) | http://code.google.com/p/pyffmpeg/ | pyffmpeg - Google Code | http://code.google.com/p/wffmpeg/ | wffmpeg - Google Code | http://www.google.com/search?q=gstreamer+ffmpeg&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a | gstreamer ffmpeg - Google Search | http://gstreamer.freedesktop.org/modules/gst-ffmpeg.html | http://gstreamer.freedesktop.org/modules/gst-ffmpeg.html
https://www.ogre3d.org/ OGRE - Open Source 3D Graphics Engine | http://mail.python.org/pipermail/python-list/2006-June/559736.html | Python Video processing. | http://www.pygame.org/wiki/gsoc2009ideas | pygame - python game development
- $ paster create --list-templates
- Available templates: basic_namespace: A project with a namespace package
- basic_package: A basic setuptools-enabled package nested_namespace: A project with two nested namespaces. paste_deploy: A web application deployed through paste.deploy
paster create
Enter project name: converter Variables:
egg: converter package: converter project: converter
Enter version (Version (like 0.1)) ['']: Enter description (One-line description of the package) ['']: A collection of scripts to assist in converting playlists found in one format to another. Also see the medialist module. Enter long_description (Multi-line description (in reST)) ['']: Enter keywords (Space-separated keywords/tags) ['']: playlists medialists conversion converter playlist medialist Enter author (Author name) ['']: Charles Brandt Enter author_email (Author email) ['']: code@contextiskey.com Enter url (URL of homepage) ['']: http://contextiskey.com Enter license_name (License name) ['']: MIT Enter zip_safe (True/False: if the package can be distributed as a .zip file) [False]:
best bet: | http://lincolnloop.com/blog/2008/dec/7/simple-easy-deployment-fabric-and-virtualenv/ | http://github.com/lincolnloop/lincoln-loop-deploy/tree/master | http://www.nongnu.org/fab/
deployment tools seem to boil down to fabric paver vellum buildout
using virtualenv on Mac OS X server edition requires downloading and installing Xcode Developer tools in order to gain access to install_name_tool once that is there, everything works just fine.
https://www.myopenid.com/ Welcome to myOpenID https://rpxnow.com/ RPX: Instant OpenID and Data Portability https://www.myopenid.com/new_domain myOpenID for Domains | http://www.martinaspeli.net/articles/this-site-now-uses-openid
one of the links below hammers CPU usage
https://launchpad.net/vellum/ Vellum: Simple Python Can Build Many Things in Launchpad | http://www.blueskyonmars.com/projects/paver/ | Paver: Easy Scripting for Software Projects — Paver v0.8 documentation
1.0/CRUDTemplate - TurboGears Documentation | http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=wzJ&q=turbogears2+catwalk&btnG=Search | turbogears2 catwalk - Google Search | http://docs.turbogears.org/1.0/Catwalk | 1.0/Catwalk - TurboGears Documentation | http://turbogears.org/ | TurboGears: Front-to-Back Web Development | http://www.turbogears.org/2.0/docs/ | TurboGears Documentation: â TG2 v2.0b6 documentation | http://www.turbogears.org/2.0/docs/toc.html#validation-form-handling-and-form-widgets | Getting Started with TurboGears â TG2 v2.0b6 documentation | http://docs.turbogears.org/1.0/Toolbox | 1.0/Toolbox - TurboGears Documentation | http://www.turbogears.org/2.0/docs/index.html | TurboGears Documentation: â TG2 v2.0b6 documentation | http://www.turbogears.org/2.0/docs/main/DownloadInstall.html#installing-the-development-version-of-turbogears-2-from-source | How to install TurboGears 2 â TG2 v2.0b6 documentation | http://www.google.com/search?q=turbogears+2+tg-admin+toolbox&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a | turbogears 2 tg-admin toolbox - Google Search | http://turbogears.org/2.0/docs/main/WhatsNew.html | WhatâÂÂs new in TurboGears 2 â TG2 v2.0b6 documentation | http://turbogears.org/cogbin/ | TurboGears CogBin | http://www.turbogears.org/2.0/docs/main/QuickStart.html | Quickstarting a TurboGears 2 project â TG2 v2.0b6 documentation | http://www.turbogears.org/2.0/docs/main/Wiki20/wiki20.html | The TurboGears 2 Wiki Tutorial â TG2 v2.0b6 documentation | http://docs.turbogears.org/1.0 | 1.0 - TurboGears Documentation | http://www.turbogears.org/2.0/docs/toc.html#session-tracking | Getting Started with TurboGears â TG2 v2.0b6 documentation | http://www.turbogears.org/2.0/docs/toc.html#development-tools | Getting Started with TurboGears â TG2 v2.0b6 documentation | http://www.turbogears.org/2.0/docs/main/Profile.html#installing-repoze-profile | Profiling your app â TG2 v2.0b6 documentation
spent a while today looking into tosca widgets, dbmechanics and db sprockets doesn't quite seem to be in the same place that form alchemy is
hg clone http://toscawidgets.org/hg/tw.forms/
#2009.02.20 13:29:59 admin@one:/c/downloads/python hg clone http://toscawidgets.org/hg/ToscaWidgets/
downloading and trying out: sudo easy_install -zmaxd . ToscaWidgets sudo easy_install -zmaxd . tw.forms
was reading about pyjamas web UI framework for python based on WebKit still reading up on that
paster setup-app development.ini
- The MetaData object Pylons uses is defined in model/meta.py so is accessed here as meta.metadata whereas in the previous chapter it was defined in the same file so the examples just used metadata.
- Pylons generated the init_model() function when the project was created. It gets called after the engine has been created each time your application starts from config/environment.py to connect the model to the database.
Caution!
Pylons generates a project to use SQLAlchemy 0.4 but many users will want to use the newer SQLAlchemy 0.5 described in Chapter 7. They are very similar but the transactional=True argument to orm.sessionmaker() in init_model() is deprecated. Instead you should specify autocommit=False. This has exaclty the same behaviour but will not generate a deprecation warning.
change: model/meta.py # SQLAlchemy session manager. Updated by model.init_model() Session = scoped_session(sessionmaker(autoflush=True, autocommit=False))
#then offline in /c/downloads/python sudo easy_install -f . SQLAlchemy
cd /c/downloads/python/pylons-eggs sudo easy_install -zmaxd . easy_install -zmaxd . "SQLAlchemy >= 0.5, <=0.5.99"
nosetests | http://somethingaboutorange.com/mrl/projects/nose/ | sudo easy_install nose
Unit testing is a good habit to get into. There are many unit testing frameworks for Python. Pylons uses one called nosetests and I have been very pleased with it. Here are a few notes I've collected on the topic:
If you are on a shared system, Virtual Env may help isolate your Python instance from other Python instances on the system.
The other component that you will need to install is the Python Imaging Library (often abbreviated as PIL).
Binaries for windows are available at the main site. Binary packages are much easier to install than from source.
For Mac OS X you can use ports, or find a binary package like the following: | http://pythonmac.org/packages/py25-fat/index.html | This also requires the 2.5 version of Python from python.org. (The one distributed with Leopard won't work)
also [2009.06.26 13:19:06] after installing the python from python.org, make sure that the python in the default path is using the latest python which python python -V should be 2.5.4
sudo rm /usr/bin/python sudo ln -s /usr/local/bin/python /usr/bin/python
sudo rm /usr/bin/pythonw sudo ln -s /usr/local/bin/pythonw /usr/bin/pythonw
See also: | http://code.google.com/appengine/docs/python/images/installingPIL.html
Python is included with many operating systems.
An easy way to check if your system already has Python is to open up a terminal / command prompt and type:
python -V
for example: python -V Python 2.5.2
If your operating system does not have Python installed, please visit: | http://www.python.org | For more information on downloading and installing Python for your system.
if there is already an instance that you want to start from, go ahead and grab a copy using whatever version control system you like.
hg clone [source] [destination]
hg init
could use a little cleanup, but is available somewhat manually at this point via:
also downloaded to (see also) /charles/downloads/reference/mako-documentation.html
see also /charles/downloads/reference/Regular Expression HOWTO.html
in pylons project directory, should just be able to run nosetests
if tests are not being run, be sure that the test_* files do not have the executable permission flag set on the filesystem
nose will IGNORE those!
#2008.12.09 08:38:33 sudo chmod -R 664 pose/tests/functional/*
make sure not to chmod the directory itself to 664... that will prevent the system from being able to browse dir!
currently reading pylons_book here may want to point pylons-book.txt here
when creating a new template for a module, consider using: paster create
unicode is going away in py3k should steer clear of that | http://www.google.com/search?q=unicode+to+ascii+python&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a | unicode to ascii python - Google Search | http://www.diveintopython.org/xml_processing/unicode.html | 9.4.Unicode | http://www.reportlab.com/i18n/python_unicode_tutorial.html | Python Unicode Tutorial | http://www.google.com/search?q=mako+unicode&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a | mako unicode - Google Search | http://www.makotemplates.org/docs/unicode.html | Mako Documentation - The Unicode Chapter | http://www.google.com/search?q=python+path+unicode&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a | python path unicode - Google Search | http://www.python.org/doc/2.5.2/lib/module-os.path.html | 11.1 os.path -- Common pathname manipulations
going to try out google code should be good for version control
this is the most up to date version of S5 that I found | http://www.netzgesta.de/S5/references.php | S5 Reloaded • References
s5 presentations are now generated in pose | http://www.google.com/search?q=slide+show&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a | slide show - Google Search | http://www.slide.com/ | Slide - slideshows, slide shows, photo sharing, image hosting, widgets, MySpace codes, web publishing, music - Slide | http://www.codeplex.com/SlideShow | Slide.Show - Home | http://bighugelabs.com/flickr/slideshow.php | Slideshow: Create an online slideshow | http://www.vertigo.com/SlideShow.aspx | Vertigo: Slide.Show | http://en.wikipedia.org/wiki/Slideshow | Slideshow - Wikipedia, the free encyclopedia | http://en.wikipedia.org/wiki/Photo_slideshow_software | Photo slideshow software - Wikipedia, the free encyclopedia | http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=Vxv&q=s5+full+screen&btnG=Search | s5 full screen - Google Search | http://meyerweb.com/eric/tools/s5/ | S5: A Simple Standards-Based Slide Show System | http://meyerweb.com/eric/tools/s5/primer.html | A Basic Primer in Using S5 | http://meyerweb.com/eric/tools/s5/structure-ref.html | S5 1.1 Reference | http://meyerweb.com/eric/tools/s5/structure-min.html | Minimal S5 Structure | http://meyerweb.com/eric/tools/s5/filemap.html | S5 File Map | http://meyerweb.com/eric/tools/s5/faq.html | S5 FAQ | http://dsandler.org/wp/archives/2006/03/08/s5-fullscreen-on-os-x | S5 fullscreen on OS X? | http://docutils.sourceforge.net/docs/user/slide-shows.html | Easy Slide Shows With reST & S5 | http://www.google.com/search?q=s5+autoplay&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a | s5 autoplay - Google Search | http://www.netzgesta.de/S5/references.php | S5 Reloaded • References | http://s5project.org/ | S5 Project | http://en.wikipedia.org/wiki/S5_(file_format) | S5 (file format) - Wikipedia, the free encyclopedia
shoes is one for ruby
seems like I saw another one of these recently, can't remember where though
see also wxpython
both of these have been completed at some point #2008.08.19 15:36 should be able to install everything offline via USB since ubuntu systems won't always have access
will also need good reference material available offline
#2008.07.07 09:11 virtualenv configure a virtualenv (and in this case install pylons)
even better: | http://www.varal.org/media/niftyplayer/
Jonathan Vanasco Wed, 24 Sep 2008 08:20:09 -0700
I've had to do this before...
you'll want to rename the appropriate files / directories , and then replace all the module name instances in your project
ie: if your project is named ASDFGHJK , then you'll need to rename: /ASDFGHJK /ASDFGHJK/asdfhjk /ASDFGHJK/asdfhjk.egg-info
then do a s/ASDFGHJK/? on the files
if you're using a mac, TextWrangler has a great find/replace function that works on directories
if you're using subversion for version control, i generaly like to do it like this: 1- rename files 2- commit 3- find/replace text 4- commit
if you're using git or mercurial, i think you can do the commits in one step. svn needs them in two though.
seems like the best way to do lossless image (jpeg) rotation in python is to use the commands jpegtrans and jhead, both open source, but command line. easy enough to wrap in a system call of sorts (subprocess.Popen)
see simple browser gallery for examples.
see also dreamhost pylons-deploy.txt
forms are closely related to models
you'll need a way to persist the data.
if it's not tied to a specific directory of content, then it should probably be stored in a database of sorts to allow data lookup.
with pylons that probably means using sqlalchemy
if you didn't enable it in your project to begin with, you'll need to do so now following: | http://wiki.pylonshq.com/display/pylonsdocs/Using+SQLAlchemy+with+Pylons
set up meta.py set up model
init_model in __init
configure database string in config (development.ini) sqlalchemy.url = sqlite:///%(here)s/jb-dev.sqlite
environment.py websetup.py
don't forget! paster setup-app development.ini
forms are closely related to models
you'll need a way to persist the data.
if it's not tied to a specific directory of content, then it should probably be stored in a database of sorts to allow data lookup.
with pylons that probably means using sqlalchemy
if you didn't enable it in your project to begin with, you'll need to do so now following: | http://wiki.pylonshq.com/display/pylonsdocs/Using+SQLAlchemy+with+Pylons
set up meta.py set up model
init_model in __init
configure database string in config (development.ini) sqlalchemy.url = sqlite:///%(here)s/jb-dev.sqlite
environment.py websetup.py
don't forget! paster setup-app development.ini
to start working with forms, you will new to methods to a class... one to show the form, one to handle the form.
you will also need to import the validate code. (formencode)
layouts and other form validation can be stored with other model code (I'm torn if that is more UI or model validation... pylons seems to go with model validation).
Pylons comes with an easy to use validate decorator, imported by default in your lib/base.py. Using it in your controller is pretty straight-forward:
#this gets the validate decorator. from pylons.decorators import *
to start working with forms, you will new to add methods to a class... one to show the form, one to handle the form.
you will also need to import the validate code. (formencode)
layouts and other form validation can be stored with other model code (I'm torn if that is more UI or model validation... pylons seems to go with model validation).
Pylons comes with an easy to use validate decorator, imported by default in your lib/base.py. Using it in your controller is pretty straight-forward:
#this gets the validate decorator. from pylons.decorators import *
once you have a basic pylons instance created, there are a few things that need to be configured for most sites to get started.
This seems beyond the scope of a basic installation document, but nonetheless should be documented.
from root of project:
paster controller name-of-new-controller
start with a main controller:
for simple sites this may be enough. (i.e. sites with only one level deep) for these sites it seems like over kill to make a separate controller for each page if there is really only an index page for each one.
some might argue to just stick with a templating system for a simple site, but just incase needs grow in the future, it is nice to have a framework in place. Pylons doesn't add a lot of bloat to even a simple site... so why not. Also keeps things consistent across projects.
make images and css directories in public:
remove public index.html (otherwise it will be default)
add standard templates
update routes
paster controller name-of-new-controller
start with a main controller:
for simple sites this may be enough. (i.e. sites with only one level deep) for these sites it seems like over kill to make a separate controller for each page if there is really only an index page for each one.
It may be adequate to stick with a template system (i.e. manual static, sphynx, webby) for a simple site. On the other hand, if you're comfortable with python and needs grow in the future, it is nice to have a framework in place. Pylons doesn't add a lot of bloat to even a simple site. A framework keeps things consistent across projects.
python tree - Google Search | http://www.velocityreviews.com/forums/t355467-tree-and-graph-structures-in-python.html | Tree and Graph structures in Python. | http://mail.python.org/pipermail/python-list/2007-November/464998.html | What about a Python Tree container? | http://www.google.com/search?q=boost+graph+python&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a | boost graph python - Google Search | http://www.osl.iu.edu/~dgregor/bgl-python/ | Boost Graph Library - Python Bindings | http://mail.python.org/pipermail/python-list/2007-November/465011.html | What about a Python Tree container? | https://networkx.lanl.gov/wiki | NetworkX | https://networkx.lanl.gov/wiki/Tutorial | Tutorial - NetworkX | https://networkx.lanl.gov/wiki/gallery | gallery - NetworkX
instructions for using virtualenv.py in cur directory
C:>C:Python25python.exe "C:Documents and SettingsAdministratorDesktopvirt ualenv-1.0virtualenv.py" sandbox New python executable in sandboxScriptspython.exe Installing setuptools...............................done.
virtualenv.py [virtualenv-name] virtualenv.py tiny
cd [virtualenv-name] cd tiny source bin/activate
ultimately, for media playback, probably just want to focus on generating playlists that can be used in any player (m3u) and the mechanisms to send/synchronize data.
this way it shouldn't matter what the user has installed.
after doing some exhaustive searches looks like the tools used in subcircuit are still some of the best available as far as mp3 decoding is concerned pymad
other options include: pymedia pygame
pymad instead:
download unpack make sure libmad and libmad-dev are installed
./config_unix.py
sudo python setup.py install
giving this a try since pygame sounded so bad for audio
downloaded source file:
extracted
tried: sudo python setup.py build
Using UNIX configuration...
OGG : not found VORBIS : not found FAAD : not found MP3LAME : not found VORBISENC : not found ALSA : not found
libogg-dev - Ogg Bitstream Library Development libogg0 - Ogg Bitstream Library libvorbis-dev - The Vorbis General Audio Compression Codec (development files) libvorbis0a - The Vorbis General Audio Compression Codec libvorbisenc2 - The Vorbis General Audio Compression Codec liblame-dev - LAME Ain't an MP3 Encoder liblame0 - LAME Ain't an MP3 Encoder libfaad2-0 - freeware Advanced Audio Decoder - runtime files libfaad2-dev - freeware Advanced Audio Decoder - development files libalsaplayer-dev - PCM player designed for ALSA (interface library, development files) libalsaplayer0 - PCM player designed for ALSA (interface library)
libvorbisfile3 - The Vorbis General Audio Compression Codec
libogg-dev - Ogg Bitstream Library Development libogg0 - Ogg Bitstream Library libvorbis-dev - The Vorbis General Audio Compression Codec (development files) libvorbis0a - The Vorbis General Audio Compression Codec libvorbisenc2 - The Vorbis General Audio Compression Codec liblame-dev - LAME Ain't an MP3 Encoder liblame0 - LAME Ain't an MP3 Encoder libfaad2-0 - freeware Advanced Audio Decoder - runtime files libfaad2-dev - freeware Advanced Audio Decoder - development files libalsaplayer-dev - PCM player designed for ALSA (interface library, development files) libalsaplayer0 - PCM player designed for ALSA (interface library)
cd charles_b/external/python/ cd ipython-0.9.beta3 sudo python setup.py install ipython
downloaded last weekend
pygame, custom interface write language to enable tests
interface should show different USBs... can see last known state of them
#http://docutils.sourceforge.net/docutils/examples.py def html_parts(input_string, source_path=None, destination_path=None,
input_encoding='unicode', doctitle=1, initial_header_level=1):""" Given an input string, returns a dictionary of HTML document parts.
Dictionary keys are the names of parts, and values are Unicode strings; encoding is up to the client.
Parameters:
- input_string: A multi-line text string; required.
- source_path: Path to the source file or object. Optional, but useful for diagnostic output (system messages).
- destination_path: Path to the file or object which will receive the output; optional. Used for determining relative paths (stylesheets, source links, etc.).
- input_encoding: The encoding of input_string. If it is an encoded 8-bit string, provide the correct encoding. If it is a Unicode string, use "unicode", the default.
- doctitle: Disable the promotion of a lone top-level section title to document title (and subsequent section title to document subtitle promotion); enabled by default.
- initial_header_level: The initial level for header elements (e.g. 1 for "<h1>").
""" overrides = {'input_encoding': input_encoding,
'doctitle_xform': doctitle, 'initial_header_level': initial_header_level}
- parts = core.publish_parts(
- source=input_string, source_path=source_path, destination_path=destination_path, writer_name='html', settings_overrides=overrides)
return parts
input_encoding='unicode', output_encoding='unicode', doctitle=1, initial_header_level=1):
""" Given an input string, returns an HTML fragment as a string.
The return value is the contents of the <body> element.
Parameters (see html_parts() for the remainder):
""" parts = html_parts(
input_string=input_string, source_path=source_path, destination_path=destination_path, input_encoding=input_encoding, doctitle=doctitle, initial_header_level=initial_header_level)
fragment = parts['html_body'] if output_encoding != 'unicode':
fragment = fragment.encode(output_encoding)
return fragment
""" not sure if there is a way to do this with docutils, but just want to have html line breaks where there are new lines (n -> <br />n) """ #http://docutils.sourceforge.net/docs/user/rst/quickref.html new = '' for line in content.split('n'):
#s matches whitespace #S matches alphanumeric # #if it has characters, make it a 'line block' #http://docutils.sourceforge.net/docs/user/rst/quickref.html if re.search('S', line):
new += "| " + line + 'n'
html = html_body(new) return literal(html)
paster serve --stop-daemon
this picks up where installation leaves off
overlap is in starting server:
paster serve --reload development.ini
figure out how to run server as a daemon pass --deamon to paster serve: paster serve --daemon --reload development.ini paster serve --daemon --reload production.ini
import pdb; pdb.set_trace()
in pylons import nose; nose.tools.set_trace() or nosetests --nocapture --with-pylons=test.ini from comments in: http://wiki.pylonshq.com/display/pylonsdocs/Unit+Testing or python setup.py nosetests
adding in helpers to memory/web/browser/lib/helper.py
restructured text is part of the docutils library
in that library, there are scripts to do conversions in examples:
#2008.07.06 11:43:02 ubuntu@ubuntu:~ sudo easy_install docutils
edit: /usr/bin/rst2html.py # EASY-INSTALL-SCRIPT: 'docutils==0.4','rst2html.py' __requires__ = 'docutils==0.4' import pkg_resources pkg_resources.run_script('docutils==0.4', 'rst2html.py')
/usr/lib/python2.5/site-packages/ cd /usr/lib/python2.5/site-packages/docutils-0.4-py2.5.egg/docutils/
from docutils.core import publish_cmdline, default_description
publish_cmdline(writer_name='html', description=description)
vi core.py
creating an egg from a local module: easy_install -U ZopeSkel
easy_install -U PasteScript paster create -t basic_package
after editing all of the files: python setup.py bdist_egg
pylons informational links | http://www.google.com/search?hl=en&q=pylons+based+blog&start=20&sa=N | pylons based blog - Google Search | http://blog.micampe.it/articles/2006/11/26/a-tale-of-pylons-python-and-fastcgi-on-dreamhost | A tale of Pylons, Python and FastCGI on Dreamhost | http://blog.micampe.it/ | Michele Campeotto | http://diffle-history.blogspot.com/2007/12/pylons-and-django.html | Diary of a Failed Startup: Pylons and Django | http://my.opera.com/WebApplications/blog/index.dml/tag/Pylons | Pylons - Web Applications Blog | http://truefalsemaybe.com/2008/06/authorization-in-pylons-with-repozewho-part-1-htaccess/ | Authorization in Pylons with Repoze.who (Part 1 - HTAccess) | http://mgratzer.topmind.at/2007/07/04/pylons-framework-as-ruby-on-rails-opponend/ | mgratzerâs Blog » Blog Archive » Pylons Framework as Ruby on Rails opponend | http://www.rexx.com/~dkuhlman/pylons_quick_site.html#creating-an-application | Pylons Quick Site Development | http://www.pylonscasts.com/ | Welcome :: Pylons Screencasts | http://swik.net/pylons | pylons - SWiK | http://www.devchix.com/2007/08/16/restful-thoughts-on-a-web-20-python-project/ | » RESTful Thoughts on a Web 2.0 Python Project - DevChix - Blog Archive | http://wiki.pylonshq.com/display/pylonscookbook/A+Pylons+Controller+with+Trac+as+WSGI+Callable | A Pylons Controller with Trac as WSGI Callable - Pylons Cookbook - PythonWeb | http://wiki.pylonshq.com/display/pylonsdocs/Form+Handling | Form Handling - Pylons Official Docs - PythonWeb
looking in to a CRUD like scaffolding generation script for pylons. didn't see much out there. maybe it's best just to create manually, so you don't have to weed out unnecessary code.
presentation
learn to give presentations better
<A HREF="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=mac+screen+capture&btnG=Google+Search" ADD_DATE="1210649097013"> mac screen capture - Google Search</A> <A HREF="http://www.dummies.com/WileyCDA/DummiesArticle/id-2485.html" ADD_DATE="1210649097014"> Taking Screenshots with Screen Capture in Mac OS X Panther - For Dummies</A> <A HREF="http://www.google.com/search?q=python+slideshow&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a" ADD_DATE="1210649097014"> python slideshow - Google Search</A> <A HREF="http://groups.google.com/group/showmedo/browse_thread/thread/e1bb106ca9b18f93" ADD_DATE="1210649097014"> How Do You Make A Python Slideshow? - ShowMeDo | Google Groups</A> <A HREF="http://www.python.org/doc/slideshows/" ADD_DATE="1210649097014"> Slideshow Collections for Instructional Use</A> <A HREF="http://www.python.org/doc/slideshows/preparing-for-screencasting.txt" ADD_DATE="1210649097015"> | http://www.python.org/doc/slideshows/preparing-for-screencasting.txt</A> | <A HREF="http://www.python.org/doc/slideshows/5min-reST-demo.txt" ADD_DATE="1210649097015"> | http://www.python.org/doc/slideshows/5min-reST-demo.txt</A> | <A HREF="http://www.python.org/doc/slideshows/5min-imaging.txt" ADD_DATE="1210649097016"> | http://www.python.org/doc/slideshows/5min-imaging.txt</A> | <A HREF="http://www.showmedo.com/videos/video?name=970000;fromSeriesID=97" ADD_DATE="1210649097016"> | Preparing for Screencasting tutorial video - Casting Your Knowledge, With Style - Learn: beginners, screencasting, office_skills, planning, capture, process, make, system, aims, recording, screencasts, studio, virtual, tools, linux, talks, talk, tips, producing, types, postprocessing</A>
Okay, you probably already know the ol’ Command-Shift-3 shortcut for taking a screen capture of your entire screen, and you may even know about Command-Shift-4, which gives you a crosshair cursor so you can choose which area of the screen you want to capture. But perhaps the coolest, most-secret hidden capture shortcut is Control-Command-Shift-3 (or 4), which, instead of creating a file on your desktop, copies the capture into your Clipboard memory, so you can paste it where you want. (I use this to paste screen captures right into Photoshop.)
Also don't forget Ctl + 2 finger scroll to zoom in!!
figure out keynote or other presentation software... plone?? google python slide show presentation
just installed pylons on ubuntu
need to migrate any zope settings over to auralex so it can be worked on there too.
from journal_parser import * [l, j] = main()
need to update interpreter, a lot seems to have changed since then <A HREF="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=python+mac+osx&btnG=Google+Search" ADD_DATE="1194639595666"> python mac osx - Google Search</A> <A HREF="http://wiki.python.org/moin/MacPython" ADD_DATE="1194639595666"> MacPython - PythonInfo Wiki</A> <A HREF="http://www.python.org/download/mac/" ADD_DATE="1194639595666"> Python on the Macintosh</A> <A HREF="http://www.pythonmac.org/packages/py25-fat/index.html" ADD_DATE="1194639595666"> Mac OS X Python Packages for Universal Python 2.4 on Mac OS X 10.3.9 and later (Intel and PPC)</A>
Please read the sections 'Initial Configuration' and 'Quick Tips' in the IPython manual
looks like ipython requires readline library too... grrr. To build/install readline 5.1:
gnutar xfvzp readline-5.1.tar.gz cd readline-5.1 ./configure --disable-shared --enable-static sudo make install cd ../readline-0.0.0 sudo python setup.py install
that got it!
installing iPython for better interactive shell.
python setup.py build sudo python setup.py install
found references to iPython and installed that
<A HREF="http://www.friday.com/bbum/2006/03/06/python-mac-os-x-and-readline/" ADD_DATE="1194625594444"> bbum’s weblog-o-mat » Blog Archive » Python, Mac OS X, and Readline.</A> <A HREF="http://ipython.scipy.org/moin/Donload" ADD_DATE="1194625594444"> Download - IPython</A> <A HREF="http://ipython.scipy.org/dist/" ADD_DATE="1194625594445"> Index of /dist</A> <A HREF="http://ipython.scipy.org/dist/ipython.el" ADD_DATE="1194625594445"> | http://ipython.scipy.org/dist/ipython.el</A>
wanted interpreter history in python.
after looking, it didn't look like there was a simple way to get command history on the mac using built in interpreter.
<A HREF="http://www.google.com/search?hl=en&client=firefox-a&channel=s&rls=org.mozilla%3Aen-US%3Aofficial&hs=NfB&q=python+interpreter+history+mac+osx&btnG=Search" ADD_DATE="1194625594442"> python interpreter history mac osx - Google Search</A> <A HREF="http://kdl.cs.umass.edu/proximity/" ADD_DATE="1194625594442"> Proximity Software</A> <A HREF="http://my.opera.com/alecmg/blog/2007/03/30/add-history-and-completion-to-python-in" ADD_DATE="1194625594442"> Add history and completion to python interpreter - Alec's page - by Alec</A> <A HREF="http://my.opera.com/alecmg/blog/2006/10/25/adjust-your-monitor-brightness" ADD_DATE="1194625594442"> Adjust your monitor brightness - Alec's page - by Alec</A> <A HREF="http://www.google.com/search?q=python+readline&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a" ADD_DATE="1194625594443"> python readline - Google Search</A> <A HREF="http://www.peterbe.com/To-readline-or-readlines" ADD_DATE="1194625594443"> To readline() or readlines() - Peterbe.com (Peter Bengtsson on Python, Zope, Kung Fu, London and photos)</A> <A HREF="http://docs.python.org/lib/module-rlcompleter.html" ADD_DATE="1194625594443"> 15.8 rlcompleter -- Completion function for GNU readline</A>
this specific entry is now on the subcircuit profile, but it should be noted that this is actually a todo list for the python profile now... ah... maybe there should be a python todo
not emacs... mac laptop it is currently named subcircuit, need to rename it to python switched into this mode... see todo's there for further detail [link in]