Not able to see any prints from inline scripts in windows

I installed mitmproxy 0.17v on windows 7. I’m able to see the traffic on mitmdump console, but not able to see any output or print statements on console when I run mitmdump -s “print_response.py” and below is the code I have in print_response.py

import json
from mitmproxy.models import decoded

def response(flow):
print "This is the start"
print "This is in the url : ",flow.response.url
if matchObj: # optionally filter based on some criteria…
with decoded(flow.response): # automatically decode gzipped responses.
data = json.loads(flow.response.content)
data[“foo”] = "bar"
print json.dumps(parsed, indent=4, sort_keys=True)
#flow.response.content = json.dumps(data)

def request(flow):
print(“handle request: %s%s” % (flow.request.host, flow.request.path))
time.sleep(5)
print(“start request: %s%s” % (flow.request.host, flow.request.path))

I’m not using cygwin but using windows command prompt.

Hi @fun2ph,

The example you posted is for the in-development version of mitmproxy, not mitmproxy 0.17. Check out https://github.com/mitmproxy/mitmproxy/tree/0.17.x/examples!