Having looked at creating simple functions in the last tutorial we are now ready to add them to our project scripts. We wish to create and delete users both from an input file and specified…
As we build towards the final project application we need to be able to calculate expiry dates. This can be done by adding a number of days or months (or any other form of timing) to the…
As our scripts go, we are going to find the need to use functions, reusable blocks of code. In the project script that we are working with, we create users from the command line input…
By using argparse in Python as an alternative to making use of the sys module and the argv array is a great solution to quickly give you more functionality.To understand this this we need to…
Our script to create user accounts is coming along. We left off last time having been able to create the user with an expiry date. The downside was that the user was hard coded into…
As with any scripting technology the power is in the looping constructs so that we can repeat code quickly and effectively. In this tutorial we look at using FOR loops first, simply to list and Python…