Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

#!/usr/bin/python3 

 

""" 

PyLucid Admin Shell 

~~~~~~~~~~~~~~~~~~~ 

 

:created: 2018 by Jens Diemer 

:copyleft: 2018 by the PyLucid team, see AUTHORS for more details. 

:license: GNU GPL v3 or above, see LICENSE for more details. 

""" 

 

import logging 

import os 

from pathlib import Path 

 

from bootstrap_env.admin_shell.path_helper import PathHelper 

 

# PyLucid 

import pylucid 

from pylucid.admin_shell.normal_shell import PyLucidNormalShell 

from pylucid.admin_shell.path_helper import get_path_helper_instance 

 

log = logging.getLogger(__name__) 

 

 

TEST_REQ_FILE_NAME="test_requirements.txt" 

 

 

def main(): 

assert "VIRTUAL_ENV" in os.environ, "ERROR: Call me only in a activated virtualenv!" 

 

path_helper = get_path_helper_instance() 

# path_helper.print_path() 

# path_helper.assert_all_path() 

 

36 ↛ 38line 36 didn't jump to line 38, because the condition on line 36 was never true if path_helper.normal_mode: 

# Installed in "normal" mode (as Package from PyPi) 

ShellClass = PyLucidNormalShell 

else: 

# Installed in "developer" mode (as editable from source) 

# Import here, because developer_shell imports packages that 

# only installed in "developer" mode ;) 

from pylucid.admin_shell.developer_shell import PyLucidDeveloperShell 

ShellClass = PyLucidDeveloperShell 

 

ShellClass( 

path_helper, 

self_filename=Path(__file__).name 

).cmdloop() 

 

 

if __name__ == '__main__': 

main()