Python datetime and format

One of the things I always forget is date and time in Python.
So message to myself:

the strftime method is used for formatting (string_format_time)

import datetime
start_date = datetime.datetime.now()
DATE_FORMAT = '%d/%m/%Y %H:%M'
print(start_date.strftime(DATE_FORMAT))

Cheatsheet

Distributing your own package on PyPi

In Regular Expressions Demystified I developed a little python package and distributed it via PyPi.

I wanted to publish my second self-written package as well, but coming back after almost a year, some things have changed in the world of PyPi, i.e. the old tutorials aren’t working anymore.

So I wrote this article to bring some clarity into this topic.

Distutils vs Setuptools

Continue reading “Distributing your own package on PyPi”

Differences in end of line characters

When You are working with different operating systems you encounter different line endings. Editing a file on a Linux system and opening it on a windows machine can give a weird result.

Here is a short overview which system uses which command characters:

OS Command character
Windows CR + LF
Linux LF
Mac OS <= 9 CR
Mac OS X LF