Skip to content

Commit

Permalink
UPD: move mss example to mss subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
desty2k committed Jul 1, 2021
1 parent a7acd1e commit 93e77c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
File renamed without changes.
19 changes: 10 additions & 9 deletions example/mss_example.py → example/mss/mss_example.py
@@ -1,18 +1,16 @@
"""
Example for importing mss from JSON file using paker.
If you have mss installed you should remove it by using `pip uninstall mss -y` command.
"""


import paker
import logging

file = "mss.json"
logging.basicConfig(level=logging.NOTSET)

if __name__ == '__main__':
# install mss using `pip install mss`
# serialize module

with open(file, "w+") as f:
paker.dump("mss", f, indent=4)

# now you can uninstall mss using `pip uninstall mss -y`
# load package back from dump file
with open(file, "r") as f:
loader = paker.load(f)

Expand All @@ -25,4 +23,7 @@
loader.unload()

# this will throw error
import mss
try:
import mss
except ImportError:
print("mss unloaded successfully!")

0 comments on commit 93e77c5

Please sign in to comment.