How to use aria2 in my python GUI program?

4.7k Views Asked by At

I am using the aria2c downloader ( https://aria2.github.io/ ) in my python script. The aria2c is a command-line tool to batch download some stuff.

import os
#...
os.system("aria2c " + url)

The output of aria2c is displayed in the same console with the downloaded percentage and download speed etc.

Now, I want to convert my python program to a GUI. The GUI must display information of the download speed and percentage, which must be graphical labels in Tkinter GUI.

Is there any way to use aria2c and achieve this?

2

There are 2 best solutions below

5
On

Python default library's subprocess module allows you to call and interact with other programs. That will certainly suit your problem very well.

3
On

Seems like aria2p solves your problem. Here's the link.