jilkka

jilkka

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Skills

Availability

Not Specified

Recent Forum Posts

post-render python script 2013年4月22日4:29

That did the trick!

post-render python script 2013年4月21日2:50

apparently I'm getting the following error on the node:
Python error: SyntaxError: ('invalid syntax', ('<stdin>, 1, 1, sendalertmessage.py'))

Here's the code

import datetime
import socket
import smtplib
import email
import os
import mimetypes
import sys
from email import encoders
from email.message import Message
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText

username = “me@mail.com
passwd = “xxxxxxx”

def mail(to, subject, text):
msg = MIMEMultipart()

msg = username
msg = to
msg = subject

msg.attach(MIMEText(text))
try:

server = smtplib.SMTP(“webmail.mail.com”, 25)
server.ehlo()
server.login(username, passwd)
try:
server.sendmail(username, to, msg.as_string())
finally:
server.close()

except Exception, exc:
sys.exit( “mail failed; %s” % str(exc) )

machine = socket.gethostname()
ftime = datetime.datetime.now().strftime(“%H:%M on %m-%d-%Y”)

mail(“me@gmail.com”, “Operation Complete”, “Operation completed on %r at %r” % (machine, ftime))

post-render python script 2013年4月20日18:08

I've got a python script that sends an email out whenever run. I want it to run whenever the renderop is completed, tried using as post-render script but it looks like it doesnt run. It's just a standard python email script. Do I have to add in anything houdini specific for it to be run?