Archive for July, 2009

python commands.getouput vs subprocess.Popen

by on Jul.02, 2009, under Uncategorized

I have been using the commands module for quite some time, purely because it is simple to use.
Now that i have to go to writing code to work on windows, its time to start using the suproccess module. Also to make it easier for the other hard core programmers i will be working with to read my code.

Using the commands module to get the output of a command:


import commands
output = commands.getoutput('ls -lah /home/')
outputList = output.split('\n')

print outputList


The command that is run by Popen, needs to be supplied to the command as a list, no spaces.

Using subproccess command:

<pre class="c:firstline[1]">import subprocess
output = subprocess.Popen(["ls","-lah","/home/"], stdout=subprocess.PIPE).communicate()[0]
outputList = output.split('\n')

print outputList

Im pretty sure that in a few months time i will have forgotten about this way of working.

Leave a Comment :, , more...

MetaSL ftw!

by on Jul.01, 2009, under Uncategorized


Awesome, Mental images have released a spec on there new metasl shading language. Its already integrated into mr 3.7 but will not be supported in maya till the 2010 version released a siggraph this year.

My hope is that we will not have to wait for the first maya service pack to roll out to be able to use it properly.

Leave a Comment :, more...

HTML:Iframe-inf fun….not

by on Jul.01, 2009, under Uncategorized

So for the last few weeks my blog has been plagued with an Iframe-inf infection.
Avast, wouldnt let me load any part of my site, so at least i know it works.

i ended out finding this post a few days ago, which helped me a treat, but also returns more files that are ok than the ones infected:


The shell scripts this guy has created, did help me track the bits i needed to remove which was a link to:


Thanks Fields Marshall, help save my blog.

Leave a Comment :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!