Posts Tagged ‘python’

So I was just browsing some code, and I came across a cool module I’d never seen before: glob. Basically, it has two functions that either return a list or an iterator of files in a directory using shell pattern matching. So, for example, to return a list of all jpg files in a directory: […]

So unfortunately, the guy who developed libgmail has stopped upkeep, and most likely, the version you have is defunct. HOWEVER: There is an updated version of libgmail. Share and enjoy. I was working on a project once where I needed to download some Google Alert e-mails from a Gmail account and automatically download and organize […]

One of Python’s many strengths is its large library of modules. OK, so you may not be able to fly (well, maybe with that medicine…), but you can import antigravity now. It just opens up a Web browser with that comic in it. In any case, what does this have to do with processing a […]

In my last post, I said that using Python and Ruby were great alternatives to a calculator. I even provided some examples of how you could do nested calculations in the interpreters. What I failed to both notice and remember is how Python (and apparently Ruby) handle integer arithmetic. Even in my examples, the answer […]

Note: This post contains errors. I’m quite sorry, but see my correction post on the difference between floating-point and integer math for details. Sometimes when you’re sitting at a computer you need to hammer out a quick calculation. Despite not being a huge math fan, I find this to be true more often than I’d […]

If you have Python on your computer, you have access to a powerful way to learn: the Python interpreter itself. It allows you to interactively test out code and see the result. So with that said, fire up your Python interpreter. If you’re on windows, either open your command prompt (start menu->run->cmd.exe) and type “python,” […]

So a student, Mackenzie Morgan, asked a question on her Ubuntu Linux Tips & Tricks blog that made me think of this blog. In her post, she asks for advice on teaching Python to an 8 year old. Read the comments, there are some interesting tidbits in there. Now, I’m not equating your intellectual capacity […]