Language Selection

English French German Italian Portuguese Spanish

Programming With Python (LWN)

Filed under
Development
  • Unplugging old batteries

    Python is famous for being a "batteries included" language—its standard library provides a versatile set of modules with the language—but there may be times when some of those batteries have reached their end of life. At the 2018 Python Language Summit, Christian Heimes wanted to suggest a few batteries that may have outlived their usefulness and to discuss how the process of retiring standard library modules should work.

    The "batteries included" phrase for Python came from the now-withdrawn PEP 206 in 2006. That PEP argued that having a rich standard library was an advantage for the language since users did not need to download lots of other modules to get real work done. That argument still holds, but there are some modules that are showing their age and should, perhaps, be unplugged and retired from the standard library.

  • Advanced computing with IPython

    If you use Python, there's a good chance you have heard of IPython, which provides an enhanced read-eval-print loop (REPL) for Python. But there is more to IPython than just a more convenient REPL. Today's IPython comes with integrated libraries that turn it into an assistant for several advanced computing tasks. We will look at two of those tasks, using multiple languages and distributed computing, in this article.

    IPython offers convenient access to documentation, integration with matplotlib, persistent history, and many other features that greatly ease interactive work with Python. IPython also comes with a collection of "magic" commands that alter the effect of single lines or blocks of code; for example, you can time your code simply by typing %%time at the prompt before entering your Python statements. All of these features also work when using the Jupyter notebook with the IPython kernel, so you can freely switch between the terminal and the browser-based interface while using the same commands.

More Python

An introduction to the Tornado Python web app framework

  • An introduction to the Tornado Python web app framework

    Now let's look at a somewhat different option: the Tornado framework. Tornado is, for the most part, as bare-bones as Flask, but with a major difference: Tornado is built specifically to handle asynchronous processes. That special sauce isn't terribly useful in the app we're building in this series, but we'll see where we can use it and how it works in a more general situation.

    Let's continue the pattern we set in the first two articles and start by tackling the setup and config.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

Vista 10: Embrace, Now Extend

  • WLinux: Windows 10 Gets Its Own Exclusive Linux Distro
    Ubuntu, Debian, and Kali are some of the popular Linux distros available out there for Windows Subsystem for Linux. But, most of these distros contain packages that are irrelevant to WSL and lack development tools. How about a distro that is optimized specially for Windows 10?
  • New Linux Distro Created Specifically for Windows 10
    The Windows Subsystem for Linux allows users to run Linux distributions on top of Windows 10, and at this point, there are already several choices for users who want to try out this feature. In addition to Ubuntu, Debian, and Kali, beginning today, Windows 10 adopters are provided with a new Linux distro that’s specifically optimized for the WSL. Called WLinux, this new Linux distro is focused on the packages that are relevant to WSL, as well as the customizations to take full advantage of this Windows 10 feature.

Review: Bodhi Linux 5.0.0

Sometimes when reviewing an operating system it is difficult to separate the question "Is this a good distribution?" from "Is this a good distribution for me?" Bodhi is one of those projects where the answers to these questions are quite different, mostly over matters of style rather than functionality. On a personal level, I don't think I would ever be inclined to use Bodhi myself because I don't like the Moksha/Enlightenment style of desktop. It does a lot of little things differently (not badly, just differently) from other open source desktops and its style is not one I ever seem to find comfortable. This, combined with the streamlined, web-based AppCenter and unusual settings panel, makes Bodhi a distribution which always feels a bit alien to me. Let's put aside my personal style preferences though and try to look at the distribution objectively. Bodhi is trying to provide a lightweight, visually attractive distribution with a wide range of hardware support. It manages to do all of these things and do them well. The distribution is paying special attention to lower-end hardware, including 32-bit systems, and maintains a remarkably small memory footprint given the amount of functionality and eye candy included. Most lightweight distributions sacrifice quite a bit visually in order to provide the lightest interface possible, but Bodhi does a nice job of balancing low resource requirements with an attractive desktop environment. Bodhi is pleasantly easy to install, thanks to the Ubiquity installer, has a minimal collection of software (in the main edition) that allows us to craft our own experience and, for people who need more applications out of the box, there is the AppPack edition. All of this is to say that, for me personally, I spent more time that I would have liked this week searching through settings, trying to get used to how Moksha's panel works, tracking down less popular applications and re-learning when to use right-click versus left-click on the desktop. But, objectively, I would be hard pressed to name another distribution that more elegantly offers a lightweight desktop with visual effects, or that offers such easy access to both legacy and modern hardware support. In short, I think Bodhi Linux is a good distribution for those who want to get the most performance out of their operating system without sacrificing hardware support or the appearance of the interface. There are a few little glitches here and there, but sothing show-stopping and, overall, Bodhi is a well put together distribution. Read more

Android Leftovers

5 ways to play old-school games on a Raspberry Pi

They don't make 'em like they used to, do they? Video games, I mean. Sure, there's a bit more grunt in the gear now. Princess Zelda used to be 16 pixels in each direction; there's now enough graphics power for every hair on her head. Today's processors could beat up 1988's processors in a cage-fight deathmatch without breaking a sweat. But you know what's missing? The fun. You've got a squillion and one buttons to learn just to get past the tutorial mission. There's probably a storyline, too. You shouldn't need a backstory to kill bad guys. All you need is jump and shoot. So, it's little wonder that one of the most enduring popular uses for a Raspberry Pi is to relive the 8- and 16-bit golden age of gaming in the '80s and early '90s. But where to start? Read more