This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Reqtrace | |
@trace_file = File.open('/tmp/reqtrace.txt', 'w') | |
@name_stack = [nil] | |
@time_stack = [0] | |
def self.trace(name, &blk) | |
@name_stack << name | |
@time_stack << 0 | |
start = Time.now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def help_text(): | |
from textwrap import dedent | |
print dedent(""" | |
If you do this, | |
it will print correctly | |
without looking so ugly in code.""") | |
help_text() |
NewerOlder