@@ -20,7 +20,7 @@
addrdata: MMGen AddrData and related classes
"""
-from .globalvars import gc
+from .cfg import gc
from .util import fmt,die
from .base_obj import AsyncInit
from .obj import MMGenObject,MMGenDict,get_obj
addrfile: Address and password file classes for the MMGen suite
from .util import msg,die,capfirst
from .protocol import init_proto
from .obj import MMGenObject,TwComment,WalletPassword,MMGenPWIDString
@@ -37,7 +37,7 @@ altcoin.py - Coin constants for Bitcoin-derived altcoins
import sys
+from .cfg import gc,Config
from .util import msg
def test_equal(desc,a,b,*cdata):
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-globalvars: Constants and configuration options for the MMGen suite
+cfg: Configuration classes for the MMGen suite
import sys,os
@@ -188,7 +188,7 @@ class CfgFileSampleSys(cfg_file_sample):
else:
# self.fn is used for error msgs only, so file need not exist on filesystem
self.fn = os.path.join(os.path.dirname(__file__),'data',self.fn_base)
- from .globalvars import gc
+ from .cfg import gc
self.data = gc.get_mmgen_data_file(self.fn_base).splitlines()
def make_metadata(self):
@@ -47,7 +47,7 @@ def nocolor(s):
def set_vt100():
'hack to put term into VT100 mode under MSWin'
if gc.platform == 'win':
from subprocess import run
run([],shell=True)
@@ -21,6 +21,6 @@ common: Common imports for all MMGen scripts
-from .globalvars import *
+from .cfg import *
import mmgen.opts as opts
from .util import *
@@ -23,7 +23,7 @@ crypto: Random number, password hashing and symmetric encryption routines for th
import os
from collections import namedtuple
from .util import (
msg,
msg_r,
@@ -24,7 +24,7 @@ import os,time,importlib
from subprocess import run,PIPE,CompletedProcess
from .color import set_vt100
from .util import msg,Msg_r,ymsg,die,remove_dups,oneshot_warning
from .flags import *
@@ -43,7 +43,7 @@ class File:
import stat
if stat.S_ISBLK(st.st_mode):
mode = (os.O_RDONLY,os.O_RDWR)[bool(write)]
mode |= os.O_BINARY
try:
@@ -22,7 +22,7 @@ fileutil: Routines that read, write, execute or stat files
help: help notes for MMGen suite commands
def help_notes_func(proto,cfg,k):
@@ -29,7 +29,7 @@ def launch(mod,package='mmgen'):
mod = 'addrgen'
if gc.platform == 'linux' and sys.stdin.isatty():
import termios,atexit
@@ -22,7 +22,7 @@ mmgen-addrgen: Generate a series or range of addresses from an MMGen
from .addr import MMGenAddrType
from .addrfile import AddrFile
from .wallet import Wallet
@@ -23,7 +23,7 @@ mmgen-addrimport: Import addresses into a MMGen coin daemon tracking wallet
from .util import msg,suf,die,fmt,async_run
from .addrlist import AddrList,KeyAddrList
from .tw.shared import TwLabel
@@ -22,7 +22,7 @@ mmgen-passgen: Generate a series or range of passwords from an MMGen
from .addrlist import AddrIdxList
from .passwdlist import PasswordList
@@ -22,7 +22,7 @@ mmgen-regtest: Coin daemon regression test mode setup and operations for the MMG
from .util import die,async_run
opts_data = {
@@ -22,7 +22,7 @@ mmgen-seedjoin: Regenerate an MMGen deterministic wallet from seed shares
from .util import msg,msg_r,die
from .color import yellow
from .obj import MMGenWalletLabel
@@ -23,7 +23,7 @@ mmgen-tool: Perform various MMGen- and cryptocoin-related operations.
import sys,os,importlib
from .util import msg,Msg,die,capfirst,suf,async_run
@@ -22,7 +22,7 @@ mmgen-txbump: Increase the fee on a replaceable (replace-by-fee) MMGen
from .util import msg,msg_r,die,async_run
from .color import green
@@ -22,7 +22,7 @@ mmgen-txcreate: Create a cryptocoin transaction with MMGen- and/or non-MMGen
from .util import fmt_list,async_run
@@ -21,7 +21,7 @@ mmgen-txdo: Create, sign and broadcast an online MMGen transaction
from .util import die,fmt_list,async_run
from .subseed import SubSeedIdxRange
@@ -23,7 +23,7 @@ mmgen-txsend: Broadcast a transaction signed by 'mmgen-txsign' to the network
from .util import async_run
@@ -21,7 +21,7 @@ mmgen-txsign: Sign a transaction generated by 'mmgen-txcreate'
from .util import msg,ymsg,die,async_run
@@ -22,7 +22,7 @@ main_wallet: Entry point for MMGen wallet-related scripts
from .color import green,yellow
from .util import msg,gmsg_r,ymsg,bmsg,die,capfirst
from .wallet import Wallet,get_wallet_cls
@@ -24,7 +24,7 @@ mmgen-xmrwallet: Perform various Monero wallet operations for addresses
from .util import ymsg,die,async_run
from .xmrwallet import xmrwallet_uarg_info,MoneroWalletOps
@@ -22,7 +22,7 @@ mn_entry.py - Mnemonic user entry methods for the MMGen suite
import time
from .util import msg,msg_r,fmt,fmt_list,capfirst,die,ascii_lowercase
from .term import get_char,get_char_raw
from .color import cyan
@@ -13,7 +13,7 @@ msg: base message signing classes
import os,importlib,json
from .objmethods import MMGenObject,Hilite,InitErrors
from .util import msg,die,suf,make_chksum_6,fmt_list,remove_dups
from .color import red,orange,grnbg
@@ -21,7 +21,7 @@ opts: MMGen-specific options processing after generic processing by share.Opts
-from .globalvars import gc,Config
from .base_obj import Lockable
import mmgen.share.Opts
@@ -14,7 +14,7 @@ proto.btc.daemon: Bitcoin base protocol daemon classes
-from ...globalvars import gc
+from ...cfg import gc
from ...util import list_gen
from ...daemon import CoinDaemon,_nw,_dd
@@ -14,7 +14,7 @@ proto.eth.daemon: Ethereum base protocol daemon classes
from ...util import list_gen,get_subclasses
from ...daemon import CoinDaemon,RPCDaemon,_nw,_dd
@@ -14,7 +14,7 @@ proto.xmr.daemon: Monero base protocol daemon classes
from ...util import list_gen,die,contains_any
@@ -22,7 +22,7 @@ protocol: Coin protocol base classes and initializer
from .objmethods import MMGenObject
decoded_wif = namedtuple('decoded_wif',['sec','pubkey_type','compressed'])
@@ -24,7 +24,7 @@ import re,base64,json,asyncio,importlib
from decimal import Decimal
from .util import msg,die,fmt,fmt_list,pp_fmt
from .obj import NonNegativeInt
@@ -25,7 +25,7 @@ term: Terminal classes for the MMGen suite
import sys,os,time
@@ -23,7 +23,7 @@ tool.fileutil: File routines for the 'mmgen-tool' utility
from .common import tool_cmd_base
-from ..globalvars import gc
+from ..cfg import gc
from ..util import msg,msg_r,die,suf,make_full_path
from ..crypto import Crypto
@@ -133,7 +133,7 @@ def gen_tool_usage():
def gen_tool_cmd_usage(cfg,mod,cmdname):
- from ..globalvars import gc
+ from ..cfg import gc
from ..util import capfirst
cls = main_tool.get_mod_cls(mod)
tool.util: Utility commands for the 'mmgen-tool' utility
class tool_cmd(tool_cmd_base):
@@ -80,7 +80,7 @@ class TwUnspentOutputs(TwView):
await super().__init__(cfg,proto)
self.minconf = minconf
self.addrs = addrs
self.min_cols = gc.min_screen_width
@property
@@ -515,7 +515,7 @@ class TwView(MMGenObject,metaclass=AsyncInit):
for k in self.scroll_keys['vi']:
assert k not in self.key_mappings, f'{k!r} is in key_mappings'
self.key_mappings.update(self.scroll_keys['vi'])
self.key_mappings.update(self.scroll_keys[gc.platform])
return self.key_mappings
@@ -12,7 +12,7 @@
tx.base: base transaction class
from ..objmethods import MMGenObject
from ..obj import (
ImmutableAttr,
tx.info: transaction info class
from ..color import red,green,orange
from ..util import msg,msg_r
@@ -13,7 +13,7 @@ tx.new: new transaction class
from .base import Base
from ..color import pink,yellow
from ..obj import get_obj,MMGenList
from ..util import msg,fmt,die,suf,remove_dups,get_extension
tx.sign: Sign a transaction generated by 'mmgen-txcreate'
from ..util import msg,suf,fmt,die,remove_dups,get_extension
from ..obj import MMGenList
from ..addr import MMGenAddrType
@@ -14,7 +14,7 @@ ui: Interactive user interface functions for the MMGen suite
from .util import msg,msg_r,Msg,die
def confirm_or_raise(cfg,message,action,expect='YES',exit_msg='Exiting at user request'):
@@ -23,7 +23,7 @@ util: Frequently-used variables, classes and utility functions for the MMGen sui
import sys,os,time,re
from .color import *
-from .globalvars import gv,gc
+from .cfg import gv,gc
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
wallet.enc: encrypted wallet base class
from ..util import msg,make_chksum_8
from .base import wallet
@@ -14,7 +14,7 @@ wallet.incog_hidden: hidden incognito wallet class
from ..seed import Seed
from ..util import msg,die,capfirst
from ..util2 import parse_bytespec
@@ -19,7 +19,7 @@
-from mmgen.globalvars import gc
+from mmgen.cfg import gc,Config
from mmgen.util import msg,die
def normalize_path(p):
@@ -28,7 +28,7 @@ sys.path.insert(0,overlay_setup(repo_root))
# Import these _after_ local path's been added to sys.path
from mmgen.color import green,red,purple
from mmgen.util import msg,capfirst,is_int,die
@@ -137,7 +137,7 @@ class TestSha512(TestSha2):
0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 )
from test.include.common import getrand,set_globals
-from mmgen.globalvars import Config
+from mmgen.cfg import Config
set_globals(Config())
@@ -26,7 +26,7 @@ from subprocess import run,PIPE
from include.tests_header import repo_root
from mmgen.util import msg,msg_r,bmsg
@@ -21,7 +21,7 @@ test.test_py_d.common: Shared routines and data for the test.py test suite
+from mmgen.cfg import gc
from mmgen.util import msg
from ..include.common import *
@@ -23,7 +23,7 @@ test.test_py_d.ts_autosign: Autosign tests for the test.py test suite
import os,shutil
from .common import *
@@ -21,7 +21,7 @@ test.test_py_d.ts_base: Base class for the test.py test suite
@@ -25,7 +25,7 @@ from decimal import Decimal
from subprocess import run,PIPE,DEVNULL
from mmgen.util import die
from mmgen.protocol import CoinProtocol
test.test_py_d.ts_misc: Miscellaneous test groups for the test.py test suite
from .ts_base import *
@@ -23,7 +23,7 @@ test.test_py_d.ts_xmrwallet: xmrwallet tests for the test.py test suite
import sys,os,atexit,asyncio,shutil
from subprocess import run,PIPE
from mmgen.obj import MMGenRange
from mmgen.amt import XMRAmt
from mmgen.addrlist import KeyAddrList,AddrIdxList
@@ -6,7 +6,7 @@ test.unit_tests_d.__init__: shared data for unit tests for the MMGen suite
-from mmgen.globalvars import gv
+from mmgen.cfg import gv
from ..include.common import cfg
class unit_tests_base: