Actually a1eio's question about the use of os.popen() gave me this idea:
# pipe calendar.prmonth(2005, 6) to a string
# save the short code within the triple quotes as cal_mar2006.py:
p = os.popen("python D:/Python24/Atest/cal_mar2006.py")
str1 = p.read()
s = calendar.month(2006, 3)
- gives the same effect. If I am understanding this correctly, the prmonth() method does not return a value - it only prints. If you are dead-set on using prmonth() to get at this data, I think you will need to do what vegaseat suggests: catch the output using a file, or something similar.