≡ Menu

Python

Python: Find Out If a File Exists or Not Using isfile() Function

How can I check if a file called /etc/resolv.conf exists or not using Python program?
[click to continue…]

HowTo: Install Python On Linux

How do I install python an interactive high-level object-oriented language on Linux operating system?
[click to continue…]

Python For Loop Examples

How and when do I use for loops under Python programming language?
[click to continue…]

HowTo: Python Convert a String Into Integer

How do I convert a string such as x=’12345′ to an integer (int) under Python programming language? How can I parse python string to integer?
[click to continue…]

Python Run External Command And Get Output On Screen or In Variable

I am a new Python user. I wanted to run a Linux or Unix external program. For example, I would like to call an external program called /bin/date with my python script and get the output on screen or store in a variable. How do I display such output and exit status (return code) of /bin/date program using a Python script?
[click to continue…]

gedit: Add Python / C++ Autocomplete Support

How do I find out python programming language version under UNIX / *BSD / Linux / Apple OS X operating systems?
[click to continue…]

Debian / Ubuntu Linux Apache mod_python Configuration

I‘ve installed a Web server (Apache2) and like to use Python interpreter correctly. How do I configure mod_python under Debian or Ubuntu Linux running Apache server version 2.x?
[click to continue…]

Hello World In Python Tutorial

How do I write my first program in python? How do I print “hello world” message in Python?
[click to continue…]

Red Hat / Centos Install Denyhosts To Block SSH Attacks / Hacking

How do I block and stop attacks on ssh server under CentOS Linux or Red Hat Enterprise Linux server 5.x?
[click to continue…]