Skip to main content

Posts

Showing posts from January, 2017

Print file content in Python IDLE

During Python 3 learning in IDLE, I can't find a command/module to show a file content. It's boring to switch between IDLE and terminal, so I write this script to avoid boring open/read. For short type, I use pt as shortname of print. Usage: Import pt pt.pt(file_name) Eg: >>> for pyfile in os.listdir(): pt.pt(pyfile) Source code refer GitHub: https://github.com/catinsunshine/ShowFileInPythonIDLE def pt ( filename ): with open (filename) as f: fc = f.read() print (fc)

Install Teamviewer 12 on Debian 8

OS: Debian 8 testing When I tried to install teamviewer, I failed for amd64.deb version installation. Against help page note, I switched to the i386.deb version: Notes on Multiarch: On newer 64-bit DEB-systems with Multiarch-support (Debian 7)  teamviewer_linux_x64.deb  cannot be installed because the package ia32-libs is not available anymore on these systems. In this case you can use  teamviewer_11.0.xxxxx_i386.deb  instead. In case you get the error “wrong architecture i386” you have to execute the following command lines as an administrator: dpkg --add-architecture i386 apt-get update First try 'apt install' command, but get dependencies problems: peter@PDebian:~/Downloads$ sudo apt-get install ./teamviewer_12.0.71510_i386.deb Reading package lists... Done The following packages have unmet dependencies:  teamviewer:i386 : Depends: libc6:i386 (>= 2.11) but it is not installable                 ...