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

Ubuntu 18.10 Cosmic Cuttlefish and More

  • Ubuntu 18.10 Cosmic Cuttlefish is officially out. Here’s what you need to know
    It is late October and Ubuntu’s xx.10 release is here, this year; Ubuntu 18.10 Cosmic Cuttlefish. The previous release, Ubuntu 18.04 was an LTS version meaning it will get security patches and support for the next 4 years, and has since enjoyed really good reviews. 6 months later, Cosmic Cuttlefish is here, hoping to one-up that legacy. But does it have what it takes to do so? What does it bring to the table?
  • Intel's Hades Canyon NUC And Ubuntu Linux 18.10 Are Perfect Together
    In general, Linux kernel 4.18 seems to offer vast improvements for Hades Canyon NUC and specifically AMD's Radeon Vega M graphics hardware. I've seen reports of success from Arch and Fedora users who've upgraded, so it's wonderful news that slick devices like the Hades Canyon NUC -- and by extension future products featuring Radeon Vega M graphics -- should be well supported going forward.

Servers and Databases: PASE Versus ILE, Cassandra and More

  • PASE Versus ILE: Which Is Best For Open Source?
    Open source has emerged as a driver of innovation in the past 20 years, and has greatly accelerated technological innovation. The proprietary IBM i platform has also benefited from this trend, thanks in large part to the capability to run Linux applications in the PASE runtime. But some members of the IBM i community are concerned that the fruits of the open source innovation have not tasted quite as sweet as they do on other platforms. Linux was the original breakout star in open source software, and so it should be no surprise that the vast majority of software developed with the open source method is designed to run on the Linux operating system and associated open source componentry, including the Apache Web Server, MySQL database, and PHP, the so-called LAMP stack (although you can substitute other pieces, like the Postgres and MariaDB databases and languages like Perl, Python, and Node.js to create other clever acronyms). The IBM i operating system can run Linux applications through PASE, the AIX runtime that IBM brought to OS/400 so many years ago. Getting Linux applications to run on PASE requires that they’re first ported to AIX, which is often not too much work, since Linux is a variant of Unix, just like AIX.
  • How Instagram is scaling its infrastructure across the ocean
    To prevent quorum requests from going across the ocean, we're thinking about partitioning our dataset into two parts: Cassandra_EU and Cassandra_US. If European users' data stores are in the Cassandra_EU partition, and U.S. users' data stores are in the Cassandra_US partition, users' requests won't need to travel long distances to fetch data. For example, imagine there are five data centers in the United States and three data centers in the European Union. If we deploy Cassandra in Europe by duplicating the current clusters, the replication factor will be eight and quorum requests must talk to five out of eight replicas. If, however, we can find a way to partition the data into two sets, we will have a Cassandra_US partition with a replication factor of five and a Cassandra_EU partition with a replication factor of three—and each can operate independently without affecting the others. In the meantime, a quorum request for each partition will be able to stay in the same continent, solving the round-trip latency issue.
  • Two software companies, fed up with Amazon, Alibaba and other big cloud players, have a controversial new plan to fight back
    Every year, large cloud companies like Amazon rake in billions of dollars— but some of their most popular cloud services comes from repackaging software projects created by other, smaller companies. Amazon is repackaging what's known as "open source" software, which is software that is given away for free, meaning Amazon has every legal right to use it in this way. For instance, since 2013, Amazon had been offering the open-source database Redis as part of a popular cloud service called ElastiCache.
  • Running Your Own Database-as-a-Service with the Crunchy PostgreSQL Operator
    One reason why enterprises adopt open source software is to help free themselves from vendor lock-in. Cloud providers can offer open source “as-a-service” solutions that allow organizations to take advantage of open source solutions, but this in turn has can create a new type of trap: infrastructure lock-in. Many organizations have adopted Kubernetes to give themselves flexibility in where they can deploy their services in the cloud, without being locked into one provider. Some people express concerns that this instead creates “Kubernetes lock-in,” but because Kubernetes is open source and has both widespread support and active development, it should be no different than adopting Linux as your operating system.

Latest About GNU/Linux Software on Chromebooks

  • Linux Apps Coming To MediaTek-Powered Chromebooks Like The Acer R13
    Google made no mention of Linux apps on Chrome OS at last week’s hardware event in New York. I was a little surprised considering the fact that the Pixel Slate and Chrome OS saw nearly as much stage time as the Pixel phone that brought most of the media to Manhattan. [...] Unfortunately, the Chromebook R13 was quickly overshadowed by new flagships from Samsung and ASUS that featured more powerful processors and various features that made them more appealing to consumers. It was a sad happenstance for the Acer Chromebook because honestly, it is still a great device two years later. Seeing Google bring Linux apps to this device could breath much-needed new life into this model.
  • Linux app support coming to MediaTek-based Chromebooks
    Linux apps have arrived in the Chrome OS stable channel, but not all Chromebooks have access to them. The Linux container requires some kernel features that won't be backported to several models, but now Google is bringing the feature to a handful of MediaTek-based Chromebooks. Chrome Unboxed discovered a commit that enables Linux app support for the "oak" platform, which a number of Chromebooks were based on.
  • Linux apps on Chrome OS: An easy-to-follow guide
    The software that started out as a strictly web-centric entity — with everything revolving around the Chrome browser and apps that could operate inside it — is now one of modern computing's most versatile operating systems. Contemporary Chromebooks still run all the standard web-based stuff, of course, but they're also capable of connecting to Google's entire Play Store and running almost any Android app imaginable. And if that isn't enough, many models have recently gained the ability to run Linux apps as well.

Latest Lime SDR board builds on Raspberry Pi CM3

The open spec, 125 x 65mm LimeNET Micro is Lime’s first fully embedded SDR board, featuring the Raspberry Pi Compute Module 3, MAX 10 FPGA, u-blox GNSS, RF transceiver, Ethernet with PoE, and optional enclosures. UK-based Lime Microsystems has returned to Crowd Supply to launch its first fully autonomous, embedded software defined radio (SDR) platform, and the first to include integrated PoE and GNSS. The successfully funded LimeNET Micro is available through Dec. 6, starting at $269, including the integrated Raspberry Pi Compute Module 3, with shipments due Feb. 25, 2019. Other packages add enclosures and omni-directional antennas. Read more