Skip to content

Instantly share code, notes, and snippets.

@saikat
Created November 27, 2009 23:10
Show Gist options
  • Select an option

  • Save saikat/244276 to your computer and use it in GitHub Desktop.

Select an option

Save saikat/244276 to your computer and use it in GitHub Desktop.
from mockingbird.project.models import Project, Screen, Widget, Subwidget
from mockingbird.settings import SECRET_KEY
from mockingbird.utils import json_view
from django.db import transaction
from django.core.exceptions import ObjectDoesNotExist
from django.core.exceptions import MultipleObjectsReturned
import subprocess
import StringIO
import sys
import cgi
import hashlib
@json_view
def export(request):
print "Here"
p = subprocess.Popen(['echo', 'hi'], stdout=PIPE)
print p.stdout.read()
print "Finished stdout read"
return {'status_code' : 200,
'body' : {}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment