[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: U2 Query: file locations



OT: Anyone know anything about Python? A whole setup of it got dumped on my c: drive when I installed a demo. Is it useful? Safe? Worth investigating (given that I don't have time to breathe as it is)?
I use Python a bit. It's safe and effective. A rational, common-English
language for object-oriented programming. It stresses simplicity. Runs on
*NIX, and with the "IDLE" module, on PC's. Fairly well supported.
Here's a snippet of Python code, written by yours truly, to give you the
feel for it. The "#" is the comments sign (like ;*;)

# MAIN LOOPS

# 1. ADDR-A send
total_a = msg_number_a = 0
for one_msg_body_text in messages:
    msg_number_a = msg_number_a + 1
    person_number_a = 0
    for one_addr in a_list:
        out_msg = 'To:' + one_addr + '\n' + one_msg_body_text
        server.sendmail('hblist@xxxxxxxx', one_addr, out_msg)
#        print out_msg
        person_number_a = person_number_a + 1; total_a = total_a + 1
        if person_number_a%10 == 0:
print ' A:', msg_number_a, '--', `person_number_a`+ " ", one_addr
    log_file.write(' A-list: sent post #' + `msg_number_a` + ' to ' +\
         `person_number_a` + ' people\n')
print '---> Done sending to a:', msg_number_a, 'posts to',\
   person_number_a, 'people. Total sent:', total_a, '\n'
if float(total_a)/person_number_a == msg_number_a:
    check_msg = ' (ok)'
    need_to_halt = 0
else:
    need_to_halt = 1
    check_msg = \
   ' *** ERROR: ' + `float(total_a)/person_number_a` + ' posts/person'
    print check_msg
this_date = time.asctime(time.localtime())
log_file.write('\n DATE: ' + this_date + '\n Total sent to a-list: '+ `total_a` + check_msg+ '\n\n')
if need_to_halt:
    log_file.close()
    sys.exit()
If you are looking for a BASIC-like, but OOP, language that runs on UNIX and PC, Python is a good bet. Has an active "fan base" of geeks on the web. If you're not in special need of such a language, don't waste your time.



Harry Binswanger
hb@xxxxxxxx