I want a program that loops over a list of numbers (y) and tells me whether
each number in the list is less than, greater than or equal to another number
(x).
In the below code, I can't get python to see that 2 is equal to 2.
x = 2
def compare():
for y in ['12', '33', '2']:
if x
Hey Pythons.
This script works fine except I would like it to NOT print everything on a
newline.
How can I tell print to chomp?
Thanks.
--- snip
-
#!/usr/bin/python
import time
import sys
def getload():
f = open('/p
People keep telling me I need a course in "Data Structures and Algorithms."
Since Python is the only language that doesn't give me headaches I thought this
book might be good. Has anyone read it or can anyone recommend the author? Can
anyone recommend a better Data Structures and Algorithms book
Hey All.
I'm learning some python with the seemingly simple task of updating a firewall
config file with the new IP address when my dhcpd server hands one out. Yeah,
I know it's dangerous to edit such a file "in place" but this is just an
exercise at this point. I would not mind using file han
Hi All.
I'm trying to write a script that will send me an email message when my IP
address changes on a specific NIC. On Linux, the script works. On FreeBSD, it
fails with:
Traceback (most recent call last):
File "./pyifcheck.py", line 22, in
if get_ip_address('xl0') == IPADDY:
File "./pyifch