Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

terminal

Setting the correct encoding when piping stdout in Python

August 21, 2022 by Magenaut

When piping the output of a Python program, the Python interpreter gets confused about encoding and sets it to None. This means a program like this:

Categories Python, Q&A Tags encoding, python, python-2.x, stdout, terminal Leave a comment

How to get Linux console window width in Python

August 20, 2022 by Magenaut

Is there a way in python to programmatically determine the width of the console? I mean the number of characters that fits in one line without wrapping, not the pixel width of the window.

Categories Python, Q&A Tags console, linux, python, terminal, width Leave a comment

Is there go up line character? (Opposite of n)

August 18, 2022 by Magenaut

I would like to overwrite something on a line above in a serial console. Is there a character that allows me to move up?

Categories Python, Q&A Tags c#, console, python, terminal Leave a comment

Execute terminal command from python in new terminal window?

August 18, 2022 by Magenaut

The goal here is to run a new python file in a new shell from and existing python file in an existing shell. Say i have two files, aaa.py and bbb.py. Lets say for simplicity that all aaa.py does is…

Categories Python, Q&A Tags new-window, python, shell, subprocess, terminal Leave a comment

Add pygame module in PyCharm IDE

August 18, 2022 by Magenaut

I’ve downloaded pygame-1.9.1release.tar.gz from the Pygame website. I extracted and installed it and it’s working fine in the command line Python interpreter in Terminal (Ubuntu). But I want to install it for some IDE, like PyCharm. How can I do it?

Categories Python, Q&A Tags pycharm, pygame, python, python-2.7, terminal Leave a comment

How to terminate process from Python using pid?

August 18, 2022 by Magenaut

I’m trying to write some short script in python which would start another python code in subprocess if is not already started else terminate terminal & app (Linux).

Categories Python, Q&A Tags linux, process, python, terminal Leave a comment

Dynamic terminal printing with python

August 17, 2022 by Magenaut

Certain applications like hellanzb have a way of printing to the terminal with the appearance of dynamically refreshing data, kind of like top().

Categories Python, Q&A Tags python, terminal Leave a comment

Python Script execute commands in Terminal

August 16, 2022 by Magenaut

I read this somewhere a while ago but cant seem to find it. I am trying to find a command that will execute commands in the terminal and then output the result. For example: the script will be: command 'ls -l' It will out the result of running that command in the terminal Answers: Thank … Read more

Categories Python, Q&A Tags python, terminal Leave a comment

How to embed a terminal in a Tkinter application?

August 13, 2022 by Magenaut

I want to embed a terminal in my main Tkinter window. I would like to have a sub window where a terminal (Bash based terminal) would run. I would like also to be able to let my program interact with the terminal, at least I would like to read the current working directory and/or set it.

Categories Python, Q&A Tags python, terminal, tkinter Leave a comment

How to fix column calculation in Python readline if using color prompt

August 13, 2022 by Magenaut

I use standard tips for customizing interactive Python session:

Categories Python, Q&A Tags interpreter, python, readline, terminal Leave a comment
Older posts
Page1 Page2 … Page12 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress