core-lightning/contrib/pylightning/lightning
Rene Pickhardt 6b5db38774 pylightning: Made rpc a public member of Plugin and sorted imports
After this code change people can use `plugin.rpc` from anywhere in
their plugin code this is much nicer than going this way:

```
@plugin.method("init")
def init(options, configuration, plugin):
    global rpc
    basedir = plugin.lightning_dir
    rpc_filename = plugin.rpc_filename
    path = os.path.join(basedir, rpc_filename)
    rpc = LightningRpc(path)
```

or similarly that way:
```
@plugin.method("init")
def init(options, configuration, plugin):
    global rpc
    basedir = configuration['lightning-dir']
    rpc_filename = configuration['rpc-file']
    path = os.path.join(basedir, rpc_filename)
    rpc = LightningRpc(path)
```

Also the imports have been sorted alphabetically

Co-authored-by: Rene Pickhardt <rene@rene-pickhardt.de>
Co-authored-by: Christian Decker <decker.christian@gmail.com>
2019-01-12 22:12:01 +01:00
..
__init__.py pylightning: Added a tiny library for python plugins 2018-12-15 15:04:32 +01:00
lightning.py pylightning: Increase buffer size for big JSON-RPC responses 2018-12-29 12:19:56 +01:00
plugin.py pylightning: Made rpc a public member of Plugin and sorted imports 2019-01-12 22:12:01 +01:00
test_plugin.py pylightning: Better inject arguments in plugin method calls 2019-01-08 17:37:00 +01:00