Learning Python (Week 4)

After last week’s distressing discovery, that CollateX is now only available as a Python module, I decided to hunker down and get serious about learning Python. I’m an educated person: I can learn a programming language, even if the only reason to do so is so that I can use CollateX. Should it prove that I CollateX is not suitable for my work, then I console myself that automating regular expression routines–I use RegEx extensively within text editors–will itself be worth the investment in time and the new skill.

Below are the ways that I’m studying Python:

  • Learning about managing two different environments, Python 2.7 and Python 3.4, on same machine. First, download and install Anaconda Python. And then take the 20-minute Test Drive, which explains how to switch between environments.
  • I need two Pythons because the Python course I’ve been taking from edX, Introduction to Programming and Computation, is version 2.7, and CollateX is supported under 3.4. I keep returning to course, even though I’m using it in archive mode–on week 4 of 8-week course that ended several weeks ago, because one still has access to lectures and auto-graded exercises.
  • Three other course/tutorials I’ve been working through or sampling from are the official Python Tutorial, Learn Python the Hard Way (also a book), and Automating the Boring Stuff with Python (also a book). PS: Book history types, they’re both rather interesting to think about as book-course combos.

With another serious week of Python study (Python all the time for last few days) under my belt on top of this summer (when I spent 3 semi-serious plus one desultory week with Guttag-Grimson-Bell course before teaching responsibilities kicked in), now I turn back to figure out how to run CollateX with Python because that’s the option that remains available. I’m an English professor. If you wonder why I’d put myself through this, it’s kinda-sorta Digital Humanities but for the most traditional of purposes, because I’m a philologist and want to learn how to use CollateX to help automate editing. For my initial panic, see CollateX, Python, Anaconda, Oh My: Or, What Have I Done? (Week 3 Reflections).

What’s next?

  1. Review Birnbaum’s Obduron instructions for importing files, and review Python instructions for manipulating files with RegEx and saving results as another file.
  2. Learn to read JSON and Dictionaries
  3. Encode UTC transcriptions as XML, preferably with and sentences and verse lines individually numbered. (PS: I always think of that as turning Uncle Tom’s Cabin into a Bible. Book-chapter-verse numbering is an amazing invitation. Philosophy texts are often numbered by book and section, and scholarly versions add numbering to paragraphs for reference purposes.)
  4. Re-learn XSLT (for the nth time)
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s