| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Quick starter guide

Page history last edited by anrienord 17 years ago

Quick starter guide

 

Note: If something goes wrong, feel free to contact us via pycoon-users group. You can also use the issue tracker to report about a bug or request a feature.

 

The quickest way

 

If you are familiar with setuptools and Python eggs then you can install Pycoon and run it's default webapp by typing:

 

 $ easy_install -U pycoon

$ pycoon -s cherrypy localhost 8080 rawegg:pycoon:/pycoon.xconf

 

Now open your browser and go to http://localhost:8080/. You should see the welcome page of Pycoon's default webapp.

 

Note: rawegg: URI scheme allows you to locate a file (/pycoon.xconf) in the installed egg (pycoon).

 

What's next?

 

As Pycoon is only in late alpha/early beta testing, you actually can't use it just as a user, i. e. without some Python programming skills and a little bit of experience with Apache Cocoon. If you want to find out how Pycoon works (all that XML pipeline, WSGI, block, component, etc. thing) you should be familiar with both Apache Cocoon and Python.

 

So, take a look at the samples, http://localhost:8080/samples/, located within the Pycoon egg and try to find out how they work. The Pycoon directory is usually something like C:\Program Files\Python\Lib\site-packages\pycoon-0.2a5-py2.4.egg\ on Windows. Samples are in pycoon\webapp\samples\ relative to it.

 

See also the UML diagrams in the Developer's guide.

 

Feel free to send all your questions to pycoon-users group. We would like to get any comments and suggestions from you!

 

Quick steps (outdated a little)

 

Note: This is another guide to setting up Pycoon. Some of these steps are outdated a little. Some things have changed since 0.2a3, so the whole process is more straightforward that it was earlier.

 

1. Choose a deployment scenario. Please consult with the dependencies and deployment notes. Let's suppose you have chosen the following software features:

 

  • Pycoon framework and core components
  • CherryPy standalone WSGI Server

 

Note: Read carefully the dependencies and deployment notes mentioned above to ensure that you have got all the software components (and the right versions) a particular software feature consists of.

 

2. There are two options of getting the project trunk working. Anyway, you need setuptools Python package installed on your system.

 

  • Option 1. Checkout the source code and install it in a development environment:

 

 $ svn checkout http://pycoon.googlecode.com/svn/trunk/ pycoon

$ cd pycoon

$ python setup.py develop

 

  • Option 2. Use setuptools to get the latest release from Python Cheese Shop. An utility named easy_install will automatically download the package and it's dependencies from Cheese Shop website:

 

$ easy_install -U pycoon==0.2a5

 

Note: On Windows you need to install the required lxml package and libxml2/libxslt libraries by hand, because the latest version of lxml, 1.1.2, is not shipped as Windows binary. That's why you need to do this stuff before installing Pycoon:

 

 

$ easy_install lxml==1.1.1

 

3. Run a test webapp using the full path to pycoon.xconf in the file URI, e. g.:

 

$ pycoon --serve cherrypy localhost 8080

 

4. Try to open http://localhost:8080/ in your web browser. You should see the welcome page.

 

5. Look through the webapp directory. Try to create a webapp on your own. There is a list of implemented features for those who are familiar with Apache Cocoon. Actually you can create rather sophisticated webapp with the current version (0.2a4) of Pycoon. Samples of typical webapps will be provided after a time.

 

(5a.) Try to write your own sitemap components. Take a closer look at source files of pycoon.components module and implement some of pycoon.components interfaces.

 

6. Please send some feedback to Andrey Nordin personally or post a comment to this Pycoon Wiki page.

 

Configuring Apache HTTP Server and mod_python

 

This is an example of httpd.conf configuration:

 

 LoadModule python_module modules/mod_python.so

...

<VirtualHost *:8080>

<Location "/">

SetHandler python-program

PythonHandler pycoon.wsgi.frontend.pastemodpythonserver::handler

#PythonDebug On

PythonOption config "file:///var/www/py/devel/pycoon.xconf"

</Location>

</VirtualHost>

Comments (0)

You don't have permission to comment on this page.