Hot-swapper for Python
Project description
Hotswap for Python
Install
pip install hotcodeswap
Usage
Decorate the main function with @hotswap.main
Example
import hotswap
from time import sleep
def function():
print('hoge')
class Calculater:
def add(self, x, y):
return x + y
@hotswap.main # add this to main function
def main(): # cannot be hot-swapped to the main function
calc = Calculater()
while True:
function()
print(calc.add(2, 3))
sleep(1)
if __name__ == '__main__':
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hotcodeswap-1.0.1.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for hotcodeswap-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce399e1d6fcf9a3410e0ca785caa33254c35119e4b830d11fd8509c4e29bb21b |
|
MD5 | e2731daba511a5d81b39582d9de6bcdd |
|
BLAKE2b-256 | fc968f0cdbb94591b70919f7426729148ab5bffc4aa04f2fb253e5882ab4304e |