Categories
- Apache
- blogging
- bookmarks
- Calendaring
- cx_Oracle
- Debian
- Email Servers
- ESX
- Exim
- Folly
- fpm
- gcc
- git
- grub
- How Tos
- iCal
- IDE
- IIS
- ip addressing
- ipv4
- jumpstart
- libc
- libmcrypt
- lightning
- linux
- LVM
- Mail Post
- Mcrouter
- mcrypt
- microsoft
- mysql
- networking
- offsiteHowTo
- OpenSUSE
- Oracle
- Oracle Linux
- perl
- php
- phpbb
- POP3
- postfix
- Programming
- python
- qmail
- RBL
- redhat
- rpm
- SLES
- SMTP
- Software
- solaris
- spam
- SQL
- SQLAlchemy
- Sunbird
- thrift
- thunderbird
- Unix
- Wangle
- WebDav
- windows 2003
- wordpress
- zypper
Category Archives: python
How To Prevent A Python Script From Running As Root
At or near the top of your app, before it executes anything sensitive, place the following code: if os.geteuid()==0: print “Cannot run as root!” sys.exit(1) How to do this in PERL: …how-to-prevent-a-perl-script-from-running-as-root… Did you find this post useful or have … Continue reading
Posted in How Tos, Programming, python
Leave a comment
HOW TO detect STDIN with Python
In Python, as with most languages, STDIN is treated like a file. You can read from it any time, but knowing what kind of file it is lets us know if someone passed us something via STDIN or if we … Continue reading
Posted in How Tos, Programming, python
2 Comments
Python HOWTO Push a Dict on to a List (push a hash on to an array)
One of my more popular posts is How to Push a Hash on to an Array in PERL, but how do you push a dict on to a list in Python? Lists are one-dimensional arrays and dicts are associative arrays … Continue reading
Posted in How Tos, Programming, python, Software
Leave a comment