Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sample/001_sample_comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
## in json files.

import sys
import os

sys.path.append('D:\B\python-jsonpreprocessor')
sys.path.append(os.path.abspath(os.path.dirname(__file__) + "/../"))

from JsonPreprocessor import CJsonPreprocessor

Expand All @@ -31,7 +32,7 @@
# - absolute path
# - paths containting environment variables by means of
# %envvariable% syntax
data=prepro.jsonLoad(".\json\json_with_comment.json")
data=prepro.jsonLoad(os.path.dirname(__file__) + "/json/json_with_comment.json")

pprint(data)

5 changes: 3 additions & 2 deletions sample/003_sample_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
## into json files.

import sys
import os

sys.path.append('D:\B\python-jsonpreprocessor')
sys.path.append(os.path.abspath(os.path.dirname(__file__) + "/../"))

from JsonPreprocessor import CJsonPreprocessor

Expand All @@ -31,7 +32,7 @@
# - absolute path
# - paths containting environment variables by means of
# %envvariable% syntax
data=prepro.jsonLoad(".\json\json_with_import.json")
data=prepro.jsonLoad(os.path.dirname(__file__) + "/json/json_with_import.json")

pprint(data)

5 changes: 3 additions & 2 deletions sample/005_sample_python_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
## as part of json files.

import sys
import os

sys.path.append('D:\B\python-jsonpreprocessor')
sys.path.append(os.path.abspath(os.path.dirname(__file__) + "/../"))

from JsonPreprocessor import CJsonPreprocessor
from JsonPreprocessor import CSyntaxType
Expand All @@ -34,7 +35,7 @@
# - absolute path
# - paths containting environment variables by means of
# %envvariable% syntax
data=prepro.jsonLoad(".\json\json_with_python_syntax.json")
data=prepro.jsonLoad(os.path.dirname(__file__) + "/json/json_with_python_syntax.json")

pprint(data)

5 changes: 3 additions & 2 deletions sample/007_sample_use_of_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
## in json files.

import sys
import os

sys.path.append('D:\B\python-jsonpreprocessor')
sys.path.append(os.path.abspath(os.path.dirname(__file__) + "/../"))

from JsonPreprocessor import CJsonPreprocessor

Expand All @@ -31,7 +32,7 @@
# - absolute path
# - paths containting environment variables by means of
# %envvariable% syntax
data=prepro.jsonLoad(".\json\json_with_variables.json")
data=prepro.jsonLoad(os.path.dirname(__file__) + "/json/json_with_variables.json")

pprint(data)