Mozilla Internship: Translate Java to Python, Pt. 2

Continued from Part 1

While I began writing my package as a direct, one-to-one translation of the Java package, my package turned out to look very different.

Java and Python are, after all, very different languages. I found some methods to be unnecessary in python, and chose to not use the same design pattern as axe-selenium-java.

The Java package, written by Deque Labs, uses the Builder design pattern.

I wrote the methods used by the Builder class to be methods of the Axe class instead.

Continue reading “Mozilla Internship: Translate Java to Python, Pt. 2”

Python Virtual Environments

python pip python virtual environments kimberlythegeek

Why Should I Use Python Virtual Environments?

It is always recommended to use python virtual environments for all of your projects. But why?

As The Hitchhiker’s Guide to Python says:

A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them.

It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable.

Continue reading “Python Virtual Environments”