Language Selection

English French German Italian Portuguese Spanish

Programming: PyLint, C2x, Librem 5, Portable Document Format (PDF) in Python

Filed under
Development
  • Writing Cleaner Python Code With PyLint

    PyLint is a well-known static analysis tool for Python 2 and 3. It has a number of useful features, like checking your code for compliance with the PEP 8 Python style guide. It makes sure that your code follows the code style guide and it can also automatically identify common bugs and errors in your Python code.

    In this video series you’ll see how to install and set up the PyLint code linter tool. You’ll learn why you should use code linters like PyLint, Flake8, PyFlakes, or other static analysis tools—and how they can help you write cleaner and more Pythonic code.

    You can get this setup up and running in a few minutes and it’ll quickly help you write better and cleaner Python code.

  • LLVM Clang 9.0 Picks Up Initial C2x Language Mode

    Merged today to the mainline Clang compiler front-end is the initial C2x language mode support as what will eventually be the successor to the C18 programming language.

    C2x is still quite a ways out from release and its changes still under determination. At this stage the C2x language support for LLVM Clang is just enabling support by default for the [[attribute]] (double square brackets attribute; similar to C++) support.

  • Librem 5 App Design Tutorial – Part II

    Hello and welcome to the second of my series of blog posts on how to design your own, brand new app for the Librem 5.

    In my last post we went over the philosophy and process, goals and relevant art of building a read-it-later app; today we’ll be discussing sketches and mockups – specifically in what concerns navigation, article and article list screens, and desktops.

  • Working with PDFs in Python: Adding Images and Watermarks

    Today, a world without the Portable Document Format (PDF) seems to be unthinkable. It has become one of the most commonly used data formats ever. Up to PDF version 1.4, displaying a PDF document in an according PDF viewer works fine. Unfortunately, the features from the newer PDF revisions, such as forms, are tricky to implement, and still require further work to be fully functional in the tools. Using various Python libraries you can create your own application in an comparable easy way.

    This article is part two of a little series on PDFs with Python. In part one we already gave you an introduction into reading PDF documents using Python, and started with a summary of the various Python libraries. An introduction followed that showed how to manipulate existing PDFs, and how to read and extract the content - both the text and images. Furthermore, we showed you how to split documents into its single pages.

    In this article you will learn how add images to your PDF in the form of watermarks, stamps, and barcodes. For example this is quite helpful in order to stamp or mark documents that are intended to be read by a specific audience, only, or have a draft quality, or to simply add a barcode for identification purposes.

More in Tux Machines

Linux Candy: ASCIIQuarium – embrace marine life from the terminal

Who loves eye candy? Don’t be shy — you can raise both hands!! Linux Candy is a new series of articles covering interesting eye candy software. We’re only going to feature open-source software in this series. I’m not going to harp on about the tired proverb “All work and no play makes Jack a dull boy”. But there’s a certain element of truth here. If you spend all day coding neural networks, mastering a new programming language, sit in meetings feeling bored witless, you’ll need some relief at the end of the day. And what better way by making your desktop environment a bit more memorable. Read more

Bookworm is a light-weight eBook reader for Linux

While Calibre has a built-in reader, and is the absolute best when it comes to managing and converting eBooks, some people may prefer an alternative when it comes to reading ebooks. Bookworm, a lightweight ebook reader for Linux, offers a minimalist experience. Developed for Elementary OS, Bookworm is also available for other Linux distributions such as Ubuntu or OpenSUSE. Options to install from source or flatpack are provided as well. Read more

Review: Drauger OS 7.4.1, and EndeavourOS 2019.07.15

This week I once again turned to the DistroWatch waiting list to sample new items I had not tried before. Near the top of the list of projects waiting for evaluation was Drauger OS, a Linux distribution based on Xubuntu. The project uses the Xfce desktop environment and is built to run on 64-bit (x86_64) computers. The project places a strong focus on offering easy access to games and, correspondingly, good desktop performance. To this end, Drauger ships with Steam installed by default, along with WINE and PlayOnLinux. Drauger OS also comes with the modified, low-latency, Liquorix Linux kernel, which is based off the ZEN kernel. According to the project's documentation, the distribution can run on UEFI-enabled machines, but booting in legacy BIOS mode is recommended. The documentation also mentions that in place of the regular Xubuntu installer, Drauger uses the System Install utility to copy the operating system from the live media to the local hard drive. While most of the project's listed features are technical in nature, one of the main talking points goes a bit over the top when describing Drauger's security advantage: "Drauger OS is far more secure than the leading desktop operating system. This means that you can game without fear of trolls hacking into your computer, getting a virus, or losing your data." Of course Linux systems can be hacked and certainly may lose data due to various bugs, security breaches or hardware failure. The developers' claims strike me as being optimistic, at best. Drauger is available in one edition and the distribution's ISO file is a 3.2GB download. Booting from the disc brings up a menu asking if we would like to run a live desktop session or launch a system installer. The live option shows the Ubuntu boot screen, which identifies the distribution as "Ubuntu 7.4.1". The system then presents us with a graphical login screen where we are given the choice of using a "user" account or a "guest" account. In either case we can sign in without a password. Drauger's live mode uses the Xfce 4.12 desktop. Once the desktop loads, a welcome screen appears, showing buttons that open links to the distribution's website, launch a tool for installing third-party drivers, open a readme file, and link to some on-line resources. There is also a tutorial button which opens a series of pop-up messages about the desktop elements. We can only move forward through the tutorial tips one at a time, and cannot go back to previous pop-ups. The Additional Drivers button opens the Ubuntu software sources, updates and driver utility. On-line resources and documentation are opened in the Firefox web browser. The welcome window is pretty straight forward to use and navigate and I like that we are put in touch with both on-line and off-line resources. Read more

GNU Guile 2.9.4 (beta) released

We are delighted to announce GNU Guile 2.9.4, the fourth beta release in preparation for the upcoming 3.0 stable series. See the release announcement for full details and a download link. This release enables inlining of references to top-level definitions within a compilation unit, speeding up some programs by impressive amounts. It also improves compilation of floating-point routines like sin, implements the Ghuloum/Dybvig "Fixing Letrec (reloaded)" algorithm, and allows mixed definitions and expressions within lexical contours, as is the case at the top level. Try it out, it's good times! GNU Guile 2.9.4 is a beta release, and as such offers no API or ABI stability guarantees. Users needing a stable Guile are advised to stay on the stable 2.2 series. Experience reports with GNU Guile 2.9.4, good or bad, are very welcome; send them to guile-devel@gnu.org. If you know you found a bug, please do send a note to bug-guile@gnu.org. Happy hacking! Read more