This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation. Fix placing of .close() prematurely due to empt…
…y lines
- Loading branch information
alixander
committed
Dec 30, 2014
1 parent
d38dc8d
commit 2fac9bb
Showing
11 changed files
with
87 additions
and
88 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
From line 4: Watching variable x, currently int 5 | ||
From line 5: x changed to 3 | ||
From line 7: x changed to 7 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pyscribe | ||
|
||
def main(): | ||
ps = pyscribe.Scriber() | ||
|
||
ps.save_logs(True) | ||
|
||
x = 5 | ||
ps.p(x) | ||
|
||
for i in xrange(5): | ||
ps.iterscribe(i) | ||
|
||
y = "hello" | ||
ps.p(y) | ||
ps.watch(y) | ||
|
||
y = "world" | ||
|
||
synonyms = {"clerk": "secretary", "student": "apprentice", "ground": "floor"} | ||
ps.p(synonyms) | ||
|
||
if __name__ == "__main__": | ||
main() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import re | ||
import pprint | ||
import pyscribe | ||
|
||
def main(): | ||
pyscribe_log = open('pyscribe_logs.txt', 'w') | ||
ps = pyscribe.Scriber() | ||
|
||
ps.save_logs(True) | ||
|
||
x = 5 | ||
pyscribe_log.write('From line 9: x is the ' + re.search(r'\'[a-zA-Z]*\'', str(type(x))).group()[1:-1] + ' ' + str(x)+ '\n') | ||
|
||
BSGPBKPBDB = -1 | ||
pyscribe_log.write('----------------------------------------\n' + 'i is the ' + re.search(r'\'[a-zA-Z]*\'', str(type(i))).group()[1:-1] + ' ' + str(i) + ' at beginning of for loop at line 11' + '\n') | ||
for i in xrange(5): | ||
BSGPBKPBDB += 1 | ||
pyscribe_log.write('From line 12: In iteration ' + str(BSGPBKPBDB) + ', i changed to ' + str(i) + '\n') | ||
|
||
y = "hello" | ||
pyscribe_log.write('From line 15: y is the ' + re.search(r'\'[a-zA-Z]*\'', str(type(y))).group()[1:-1] + ' ' + str(y)+ '\n') | ||
pyscribe_log.write('From line 16: Watching variable y, currently ' + re.search(r'\'[a-zA-Z]*\'', str(type(y))).group()[1:-1] + ' ' + str(y)+ '\n') | ||
|
||
y = "world" | ||
|
||
synonyms = {"clerk": "secretary", "student": "apprentice", "ground": "floor"} | ||
pyscribe_log.write('From line 21: synonyms is the ' + re.search(r'\'[a-zA-Z]*\'', str(type(synonyms))).group()[1:-1] + ' ' + str(synonyms)+ '\n') | ||
|
||
pyscribe_log.close() | ||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
def main(): | ||
ps = pyscriber.Scriber() | ||
ps = pyscribe.Scriber() | ||
x = 5 | ||
ps.p(x) | ||
y = "hello" | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.