Browse by Tags

All Tags » python (RSS)
Note to Self 13 – Whole Lot of Django
Testing Django can be somewhat challenging. Instead of simply running a unittest module, you need to run the manage.py script in your Django app passing it the “test” parameter. This sets up a test database...

Posted by dhawley | with no comments

Filed under: ,

Django at the Ann Arbor Software Development Study Group
I was supposed to lead a jam last December at the Ann Arbor Software Development Study Group , but a client project postponed it. On Tuesday, February 2, we’ll try one more time. The topic is “ Zero to...

Posted by dhawley | with no comments

Filed under: ,

IterHelper Released
I’ve mentioned IterHelper in my last few posts and I’m glad to say that I finally released a version of it that I feel is solid. I’ve run my unit tests on Python versions 2.5 and 2.6 and also on IronPython...

Posted by dhawley | with no comments

Euler Problem 1 Revisited
The other day at the Software Development Study Group in Ann Arbor, Chris Marinos was demonstrating F# , a functional programming language targeting the .NET framework. Of course, this got me thinking...

Posted by dhawley | with no comments

Does IronPython need LINQ?
Before I get started, I think I need to clear up some misconceptions that the Python community might have about LINQ. From the posts I’ve read, Python developers have dismissed LINQ as only a series of...

Posted by dhawley | with no comments

Filed under: , ,

Note to Self 11 – Patterns in Python, Process is Everything, Selenium
While studying a particular portion of IronPython in Action , I came across a footnote to a blog post entitled Patterns in Python . By the end of the post, I found myself mentally tweaking a lot of my...

Posted by dhawley | 1 comment(s)

Running nose with IronPython
I just spent the past week at the 2009 Microsoft MVP Summit where I got a chance to talk to the some of the crew behind the dynamic languages at Microsoft. When I mentioned that I had gotten nose, a Python...

Posted by dhawley | with no comments

Filed under: , , ,

Note to Self 8 - IronPython2, Hosting, DLR
The latest DLR code and documentation can be found at www.codeplex.com/dlr For the examples below, here is the Python script I'm using class Person(object): def __init__(self, name, phone): self.name...

Posted by dhawley | with no comments

Filed under: , , , ,

Note to Self 7 - Naming Python Modules, SciTE, IronPython and __name__
Be careful naming your Python modules. If you name a Python file the same as an existing file in your Python install directory, you may get the following exception message: "'module' object...

Posted by dhawley | with no comments

Filed under: , , ,

Note to Self 6 - IronPython, pyc.py and SciTE
The pyc.py file can compile you IronPython code into .NET executables. The pyc.py file is part of the sample code released with IronPython. It can be found here . Look for the "IronPython-2.0-Samples...

Posted by dhawley | with no comments

Filed under: , ,

Learning SQL Alchemy
I spent a portion of my holidays studying the basics of SQL Alchemy. My first lesson is that SQL Alchemy is NOT an ORM for Python but instead a SQL abstraction tool with an ORM built-into it. At first...

Posted by dhawley | with no comments

Filed under: ,

Project Euler Problem Number 3
Project Euler problem 3 reads as follows: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? There are no special Python features here that really...

Posted by dhawley | with no comments

Filed under: ,

Project Euler Problem 2
Problem number 2 reads "Find the sum of all the even-valued terms in the Fibonacci sequence which do not exceed four million." The resolution to this problem is not quite as simple as the previous...

Posted by dhawley | with no comments

Filed under: ,

Taking on Project Euler with Python
Lately a number of posts on Project Euler , a series of predefined mathematical/computer science puzzles, have come to my attention. Bill Wagner has started a series of posts solving the Euler problems...

Posted by dhawley | with no comments

Filed under: ,