Python Forum
[Tkinter] output "os" in frame
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] output "os" in frame
#6
I tried this way:

import subprocess

def lsblk():
    records = subprocess.Popen('/usr/bin/lsblk', shell=True).readlines()
in this way, I display the output in bash.
I'm returning this error:
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.6/tkinter/__init__.py", line 1702, in __call__
    return self.func(*args)
  File "os.py", line 20, in lsblk
    records  =subprocess.Popen('/usr/bin/lsblk').readlines()
AttributeError: 'Popen' object has no attribute 'readlines'
my version python 3.6 and 2.7
I use as os arch linux
Reply


Messages In This Thread
output "os" in frame - by m_clayton - May-25-2018, 03:52 PM
RE: output "os" in frame - by woooee - May-25-2018, 07:57 PM
RE: output "os" in frame - by m_clayton - May-26-2018, 10:12 PM
RE: output "os" in frame - by woooee - May-27-2018, 04:06 AM
RE: output "os" in frame - by m_clayton - May-27-2018, 08:51 PM
RE: output "os" in frame - by m_clayton - May-28-2018, 02:49 PM
RE: output "os" in frame - by m_clayton - May-29-2018, 12:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Scrollbar, Frame and size of Frame Maksim 2 11,498 Sep-30-2019, 07:30 AM
Last Post: Maksim
  [Tkinter] create and insert a new frame on top of another frame atlass218 4 15,503 Apr-18-2019, 05:36 PM
Last Post: atlass218
  [Tkinter] Frame size only works if frame is empty(Solved) Tuck12173 7 8,534 Jan-29-2018, 10:44 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020