2005-10-24

Subterranean Explorations, part trois: The Change Things More

Greetings fellow Subway-ologists! If you recall our last two installments, please un-recall them because everything is different now. Better, if you will. Ahem, yes. Quite.

In part two, we learned about lovable little widgets. Oh! Who could forget those cute little snippets of Cheetah templates ready and able to jump to attention at a moment's notice?

Well, forget them, they're dead and hopefully buried. Get over it. Views can include other views so there wasn't really a need for them anyway. Pesky things.

And in part the first, I revealed the wonders of the docstring view. Pure simplicity and brilliance, but sadly lacking the power of the file based species who could extend other views.

Well, forget that, docstring views can now do that too. Excelsior!

And speaking of all things views, compiled views are now tidily tucked away so as to be unseen. They live in an app/views/.compiled directory and I'm quite happy about it. No more view droppings scattered about the pallor, no sirree.

Subway is nearing another milestone release, and the rumors have it that a "lesscode" 1.0 might not be too far behind. Got to beat the competition and all.

Until next time. Soon?

2005-10-18

A part time Python job with YT

I'm switching to half time work in November (and there was MUCH rejoycing!) so we need someone to pick up all my slack. We need someone with these kinds of skills:

* Python, python, python, python, spam and python
* Web Applications (We use CGI and Subway currently, but TurobGears is close enough <wink>)
* Databases (MySQL, and the MySQLdb python module)
* Asynchronous programming (Twisted and/or Threads)
* SNMP

The job is in Philadelphia at the University of Pennsylvania, and we prefer someone who can be at the office as much as possible. This is a part time and temporary position.

Still reading? Excellent!

If you, or someone you know is interested, get that resume to spamfilter@macspeno.com. And feel free to ask any questions about the job either here or via mail.

Take care.

P.S. yes, that's my real email address.

2005-10-06

Speno on Rails!

No relation.

I wonder if they'd ever let me drive one of those things...

2005-09-28

Django powered Avocados!

Here. Make sure you view the luscious close up version of the picture. *drool*

2005-09-19

The CherryPy Orchard

CherryPy Release Candidate 1 is now available here. Yay!

Earlier today I was watching Kevin Dangoor's very well done screencast on TurboGears and I noticed something that gave me a happy. You see, TurboGears is built on top of CherryPy, and during the presentation I saw one of the minor changes I had made to CherryPy flash on the screen. Even though it's such a tiny thing, I got really chuffed about it.

That's when I realized how wonderful it has been to be a part of a team of talented open source developers like those that help put together CherryPy. I've been using open source for a long time but I've never really enjoyed it as much as I do right now. It's very, very sweet.

Take care.

2005-09-16

Subterranean exploration, part 2 or What's a Widget?

Now that I have the attention of all you Thornton Melon fans, it's time to once again illuminate our electric torches and brandish our pickaxes in search of the latest chunky cured pork products from the Subway project. Today we're going to talk about widgets

Calm down! Calm down. It's okay. There's no danger here. Unlike the terrifying toe eating widgets of the Gobi dessert, Subway's variety are friendly. They're small, cuddly and unicorn-like in their ability to slowly drain impure thoughts from your brains.

Subway's widgets are small bits of view code available in the widget namespace. This means that your views can include those widgets whenever they are needed. The widgets themselves live in your application's widget directory and are, just like Subway's views, Cheetah templates. Here's an example widget that I'm fond of:


#if 'notice' in $flash
<div class="notice">
$escape($flash.notice)
</div>
#end if


That's Subway's notice.html widget which is used for web status notification. Whenever you need it, just drop it into your view using
$widget.notice
and you're all set. If you need to you can also pass arguments to your widgets using normal Python syntax.

My friend, if you like widgets, and I mean really like widgets, then go read Subway's How-to page on them right now!

2005-08-18

More python from my coworkers (pykpass)

Well, the world already knows about my friend Shumon's first public Python project, pykpass, because I saw it on the Daily Python-URL this morning and it's in the Cheeseshop too. Nice work, Shuggie!

This was Shumon's first attempt at wrapping a C library in Python, and I got to help him with a few tiny bits. In the process, I learned way more about the Python C API than I previously knew. I'm very glad I got a chance to answer those few questions. I'd appreciate it if some more experienced pythonistas could have a look at the work and offer their feedback. Thanks!

We have in our toolbox another useful Python module that wraps parts of the Cyrus SASL library using Pyrex that wants to be open source (it's publically available if you know where to look). Sadly, nothing ever came of that "effort". I think the way to getting it done is now clear though...

Take care.

2005-07-28

Native SNMPv3 in Python

I bemoaned about the lack of SNMPv3 support in Python here. Well bemoan no more pythonistas because now we have it. You'll recall that Ilya Etingof received one of the three grants awarded by the PSF to do this work. So thanks to Ilya and thank you Python Software Foundation! Sadly, I haven't yet gotten around to actually trying it yet...

2005-07-27

The Guac NOC : Mission Control for Avocados

This is the coolest thing to happen to avocados ever. The Haas Avocado Board has launched avoHQ.com as part of its global avocado marketing campaign. Where else can you get near real time trend data for avocado market penetration? Make sure you watch their movie.

See also Marketing Web site tracks worldwide flow of avocados

2005-07-21

Subterranean exploration, part 1

Join me as I journey into the underground so that I may mine a shiny red gem from the depths of the Subway project.

Looking around, something sparkly has caught my eye. What could it be? Why it's ( *rolls dice* ) docstring view templates using the @subway.method_view decorator!

This jewel of a feature allows us to use the docstrings from the methods in our controllers as our view templates. Here's a simple example which shows this treasure off a bit:

    
@subway.method_view
def echo(word="subway", count=3):
"""
<html><body>
#for $echo in $echoes
<p>$echo</p>
#end for
</body></html>
"""
echoes = [word] * int(count)
return echo.view()

Doesn't this seem like a quick and easy way to get a view written? Yes, I think that's the case. However, be warned that it doesn't support all the features that a real view provides. For example, the #extends feature from Cheetah isn't supported, while it is supported by a regular view.

Tune in next time for...something else!

Technorati Tags: ,

2005-07-18

django gets a shot of WSGI

Noticed in my svn up this morning that django now as a WSGI handler. That means you won't have to run it with mod_python, nor apache for that matter. That'll make it much easier for people to start using it, and cut out half the converstation on #django, I think.

Technorati Tags: ,

2005-07-15

Guacamole on a Stick?

Cheese stuffed, batter dipped, deep fried avocados! I'll take two please.

Technorati Tags: ,

django: The Web framework for perfectionists with deadlines.

Hello, django. Nice to meet you!

Technorati Tags: ,

2005-07-14

CherryPy, Subway, and Django news

Just spreading the word that the fun, easy to use, Python web framework, CherryPy, has released its 2.1 beta. It has come a long way since 2.0! Way to go team!

Given that is uses the above mentioned CherryPy as its controller, it is worth noting that the Subway project has released its first milestone here. You'll also find a simple example application called noteboard there that is an effective demonstration of some of Subway's nicest features. Yum!

Though promised to be out sometime this week, there's no sign of Django yet, but Adrian is presenting it to ChiPy tonight, so here's hoping we'll see something by tomorrow.

Take care.

Technorati Tags: ,

2005-07-13

Welcome back, Avocado eaters!

Hello! And welcome back! It's been nearly four months since I closed the Avocado down. Since that time I've been t playing with small bits of python related web technologies like CherryPy and Subway. I'm gonna write about those things.

Since I last mentioned it, my friend's book, Higher Order Perl, was released and I even got a chance to read it. There's a ton of great stuff in there, but if you're a perl programmer, you'll find ways to make perl much more functional. If you're a python programmer, you'll probably walk away appreciating python even more than you did before. I know I did.

One last tidbit. A co-worker of mine wrote a python implementation of the perl module File:Tail. There are a few of them out there, but I suggested he put it on the cookbook anyway. It's filetail.py.

Take care.

p.s. I'm editing this so it lands on the python planet.

Technorati Tags: ,