Hey All, quick question.

I have a small snippet of code that runs a ruby script, which I read
the stdout when it's done. But, I'm not getting the stdout when it's
in django production.

Here's my python snippet:

def generate_license(paymentForm,dsaPrivFile):
        name = paymentForm.cleaned_data['firstname'] + " " +
paymentForm.cleaned_data['lastname']
        product = paymentForm.cleaned_data['product_code']
        command = "/usr/bin/ruby licensing/genlicense.rb " + "'" +
dsaPrivFile + "'" + " " + product + " '"+name+"'"
        process = subprocess.Popen(command,stdout=subprocess.PIPE,shell=True)
        stdout_value = process.communicate()[0]
        print process.stdout.read()
        print stdout_value
        return stdout_value

I have a couple prints in there just for testing in debug. My question
is how to get this to behave normally in django production
environment. I've tried a couple different things with opening tmp
files and using that for stdout for subprocess. But no luck. Any help
is much appreciated.

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to