mirror of
https://github.com/satwikkansal/wtfpython.git
synced 2025-07-25 23:41:33 +02:00
Use dynamic path instead of fixed one
This commit is contained in:
@@ -18,8 +18,10 @@ Simplifictions and improvements through patches are more than welcome however :)
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import pprint
|
import pprint
|
||||||
fname = "/Users/300041709/code/self/wtfpython/README.md"
|
|
||||||
|
fpath = os.path.join(os.path.dirname( __file__ ), '..', 'README.md')
|
||||||
examples = []
|
examples = []
|
||||||
|
|
||||||
# The globals
|
# The globals
|
||||||
@@ -250,7 +252,7 @@ def convert_to_notebook(parsed_json):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
with open(fname, 'r+', encoding="utf-8") as f:
|
with open(fpath, 'r+', encoding="utf-8") as f:
|
||||||
lines = iter(f.readlines())
|
lines = iter(f.readlines())
|
||||||
line = next(lines)
|
line = next(lines)
|
||||||
result = []
|
result = []
|
||||||
|
Reference in New Issue
Block a user