Post Image

Python – List Comprehensions

Posted at 6:44 PM on 09-17-2018

In Python you can use list comprehensions to shorten the amount of code that you need to use to accomplish tasks when working with lists. The first time I heard of list comprehensions it sounded very advanced and confusing and when I looked at some example code I was, as I expected confused. Fear...

Post Image

Jinja2 - Custom Filters

Posted at 1:19 AM on 09-18-2018

When using Jinja2 as your template engine you will no doubt eventually use a filter to control the output of what jinja is rendering for you. An example, lets say that you are storing raw HTML in your applications database and you want to render that html directly into your page. You can use the "s...

Post Image

Jinja2 - Calling Python Functions

Posted at 8:47 PM on 09-18-2018

You should take every effort to not use any programming logic within your Jinja templates but there are times where you have no choice and the best of the bad options you have available to you is to give Jinja access to a python function to grab data out of the database or do some other tasks. In...

Post Image

Overwriting Line of Console Output – Python

Posted at 1:58 AM on 09-20-2018

When writing CLI based applications in Python there often comes a time where you are running a loop and it may take a minute or 2 to complete your loop and break out, if the user is sitting and waiting for the task to complete they may become impatient and try to restart the program because it ap...

Post Image

Python – Tkinter Entry Widget

Posted at 2:53 AM on 09-20-2018

In this post I will be outlining the Tkinter Entry widget and the various ways you can use it. The Entry widget is often used to display or enter a line of text and is a standard Tkinter widget so you will not need to install anything special to your Python environment to use it. Below is the ba...

Post Image

Python – Benefits of using a Virtual Environment

Posted at 3:05 AM on 09-20-2018

A virtual environment can be extremely useful when developing multiple projects that require different dependencies, developing across multiple computers, and making it easier to collaborate with others on projects. In this post I will be outlining what exactly a virtual environment is and how to...

Post Image

Python Tkinter – Create Tabs with Notebook Widget

Posted at 3:23 PM on 09-23-2018

In the Video I go through writing the code below which will add a notebook widget inside of your main window which will allow you to make tabs in your interface. The majority of the code is configuring the window itself, there is only about 6 lines that actually make the tabs which when I learne...

Post Image

Liebert Web Cards - Configuration File Line Endings

Posted at 10:16 PM on 09-24-2018

I wanted to write this article to hopefully save someone else the trouble and hassle myself and my team has gone through working with Liebert UPS webcard configuration files. If you are working with Liebert UPS web cards and want to modify the configuration file and re upload them to help automa...

Post Image

Linux - Add User to Group

Posted at 6:39 PM on 09-26-2018

The groups that a user belongs to in an operating system are a very flexible way of managing users on a system weather that be restricting permissions or extending functionality because of the fundemental importance of groups and group permissions in the Linux operating system after a short time ...

Post Image

Python - Extend Parent Classes Methods - Polymorphism

Posted at 5:55 PM on 09-27-2018

There are often times when inheriting from a parent class you need to extend a method without overwriting it so you can execute the code that is contained in the parent module without having to rewrite it. In this post I will show you how to do that with pythons " super " method. Lets take a loo...