Agendaless Blog: python3

PyCon 2014 Recap

PyCon 2014 in Montréal was a great conference! Check out the Agendaless PyCon 2014 talks:

Paul Everitt presented a half-day tutorial, "Python 3/2 Web Development with Pyramid ":

Tres Seaver gave a talk, "By Your Bootstraps: Porting Your Application to Python3":

We had lots of good conversations with folks, both in the "hallway track" and at the Pyramid booth. Great job by the Montréal Pythoneers organizing and running such a terrific conference! And for those who didn't get one there, the "Hacker" T-shirt is available online:

posted: 2014-04-21 15:26  by Tres Seaver   |   permalink

PyTennessee 2014 Talks

Chris and I have given our talks at PyTennesse 2014. Mine was a two-hour tutorial, "Pyramid Development in a Nutshell", which I cut down from Paul's Quick Pyramid Tutorial. (See my slides here; examples are on github)

Chris' talk was his "Substance D: Build Civilized Web Applications" talk. See a video of the same talk from the RuPy 2013 conference).

posted: 2014-02-23 20:41  by Tres Seaver   |   permalink

SubstanceD Screencast #6: Adding Editing Objects inside a Folder

This screencast is the sixth in a series of short tutorials on installing SubstanceD and using it to build a simple intranet application. It starts from where Episode 5 leaves off.

This episode covers adding objects to a folder, and editing those objects' properties.

posted: 2013-12-20 22:30  by Tres Seaver   |   permalink

SubstanceD Screencast #5: Editing Object Properties / Undo

This screencast is the fifth in a series of short tutorials on installing SubstanceD and using it to build a simple intranet application. It starts from where Episode 4 leaves off.

This episode covers updating object properties, and undoing those changes..

posted: 2013-12-20 22:00  by Tres Seaver   |   permalink

SubstanceD Screencast #4: SubstanceD Managment Interface Overview

This screencast is the fourth in a series of short tutorials on installing SubstanceD and using it to build a simple intranet application. It starts from where Episode 3 leaves off.

This episode provides a quick tour of the SubstanceD management interface (SDI), including navigating through the "tree" of objects in the database.

posted: 2013-12-20 21:30  by Tres Seaver   |   permalink

SubstanceD Screencast #3: Starting the Server, Viewing the Admin Interface

This screencast is the third in a series of short tutorials on installing SubstanceD and using it to build a simple intranet application. It starts from where Episode 2 leaves off.

This episode demonstrates starting the WSGI server in development mode, viewing the default splash page in the browser, and logging into the the SubstanceD admin interface.

Annotated Commands

For those who'd like to read rather than listen, this is the set of commands outlined:

  1. Start the server using the development configuration:
    $ ../../bin/pserve development.ini
    
  2. Grep the generated, random password from the config file:
    $ cd src/myintranet
    $ grep passwword development.ini
    
  3. View the default splash page at http://localhost:6543/.
  4. Log into the SubstanceD management interface at: http://localhost:6543/manage.

posted: 2013-12-13 23:00  by Tres Seaver   |   permalink

SubstanceD Screencast #2: Generating the Initial 'myintranet' Project

This screencast is the second in a series of short tutorials on installing SubstanceD and using it to build a simple intranet application. It starts from where Episode 1 leaves off.

This episode demonstrates generating the initial version of the myintranet project, checking it into Git, and installing it and its added dependencies into the virtual environment.

Annotated Commands

For those who'd like to read rather than listen, this is the set of commands outlined:

  1. List the templates available for generating a project:
    $ bin/pcreate --list-templates
    
  2. Generate the myintranet project:
    $ cd src
    $ ../bin/pcreate --template=substanced myintranet
    $ cd myintranet
    
  3. Check the initially generated code into a local Git repository:
    $ git init .
    $ cat > .gitignore
    *.pyc
    __pycache__
    *.egg-info
    *.fs*
    blobs
    tmp
    ^D
    $ git add .
    $ git commit -m "Initially-generated project."
    
  4. Install the project and its extra dependencies into the environment:
    $ ../../bin/python setup.py develop
    
  5. Verify that myintranet is importable from our checkout:
    $ cd ../..
    $ bin/python
    ...
    >>> import myintranet
    >>> print(myintranet.__file__)
    

posted: 2013-12-13 22:00  by Tres Seaver   |   permalink

SubstanceD Screencast #1: Setting Up the Environment

This screencast is the first in a series of short tutorials on installing SubstanceD and using it to build a simple intranet application.

This episode demonstrates creating a Python virtual environment and installing the SubstanceD software into it.

Annotated Commands

For those who'd like to read rather than listen, this is the set of commands outlined:

  1. Create a Python 3.3 virtual environment:
    $ /opt/Python-3.3.3/bin/pyvenv intranet
    $ cd intranet
    
  2. Install and update setuptools:
    $ wget https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py
    $ bin/python3 ez_setup.py
    $ bin/easy_install -U setuptools
    
  3. Check out SubstanceD from Github:
    $ mkdir src
    $ cd src
    $ git clone git@github.com:Pylons/substanced
    $ cd substanced
    
  4. Run SubstanceD's setup.py to install it in the environment:
    $ ../../bin/python3 setup.py develop
    
    Note that this step also installs SubstanceD's dependencies.
  5. Verify that SubstanceD is importable from our checkout:
    $ cd ../..
    $ bin/python
    ...
    >>> import substanced
    >>> print(substanced.__file__)
    

posted: 2013-12-13 22:00  by Tres Seaver   |   permalink

SubstanceD Screencasts

We're starting a series of short (3 - 5 minute) screencasts, demonstrating the SubstanceD application development platform. The series is built around the tasks needed to set up a simple intranet site.

For an overview of SubstanceD as a development platform, start with the talk given by Chris McDonough at the RuPy 2013 confernce: "SubstanceD: Building Civilized Web Applications".

posted: 2013-12-13 21:30  by Tres Seaver   |   permalink

Introducing the Pyramid Quick Tutorial

Last month we unveiled the Quick Tour of Pyramid, a high-level presentation of the basic features in Pyramid. The tour got positive feedback and has been updated and refined as work on Pyramid 1.5 progresses.

We now have something to accompany the Quick Tour: the Pyramid Quick Tutorial. 21 steps through the basic features, with working code, analysis, and linking to reference material. The tutorial is the result of a serious, sustained effort including several for-fee engagements, resulting in an open-content, commercial-quality tutorial that is part of the core Pyramid docs.

We're quite happy to have this available for evaluators and new developers. Over time, we'd like Pyramid to be a fantastic starting point for new Python web developers, with lots of evaluator-friendly resources.

Here's a bit of a look inside.

How It's Made

A couple of years ago I taught a Pyramid tutorial, for-fee, at a Plone Conference. I chose a different approach to tutorials: break the work into independent sections, one concept per section, and make it so even a room full of students would be successful doing it themselves. That formula has been tweaked quite a bit. Here's how the Pyramid Quick Tutorial is produced.

Each of these section is done as Sphinx documents with a common structure:

  • Explain the background and give the objectives of that section
  • Provide a series of steps to produce a working example in that topic
  • The steps link to a subdirectory with a working Python package and link in the code
  • Following the steps, some analysis of what was done
  • For people that finish faster than others, some extra credit questions
  • Lots of deeper linking to the official docs

I then let them go off and do the work for the step, then we reconvene and talk about it. Some students cut-and-paste, some type it all. If they get too far behind, they can just get the package from GitHub and teleport themselves into the present. All the material is available online in the official Pyramid docs, so they can come back later and freshen up.

The sections also have a modest amount of test code, to make sure what is being taught continues to work in the future.

Have tutorial, will travel

Have an in-house team of developers interested in Python 3 for web development? Running a conference with tutorials and up for a high-quality, open-content half/full/two-day tutorial? I know somebody that might be interested. [wink]

Lately I've given my Python 3 Web Development With Pyramid tutorial in some cool venues (Cambridge UK, Brasilia) and now this material is a part of the core Pyramid docs. Still, for each venue, I produce some new sections relevant to the particular needs of that organization or context.

I'm hoping to do more events and more material (next up: a traversal tutorial and an add-on development tutorial for more advanced usage.) Give me a shout, @paulweveritt on Twitter.

posted: 2013-10-08 18:57  by Paul Everitt   |   permalink