File tree Expand file tree Collapse file tree 8 files changed +16
-11
lines changed Expand file tree Collapse file tree 8 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 3
3
# MICROPYPATH=./:../lib ../../../ports/unix/micropython -i Dynamic_loading_font_example.py
4
4
#
5
5
6
- import sys
6
+ import usys as sys
7
7
sys .path .append ('' ) # See: https://github.com/micropython/micropython/issues/6419
8
8
9
- script_path = __file__ [:__file__ .rfind ('/' )] if __file__ .find ('/' ) >= 0 else '.'
9
+ try :
10
+ script_path = __file__ [:__file__ .rfind ('/' )] if __file__ .find ('/' ) >= 0 else '.'
11
+ except NameError :
12
+ script_path = ''
10
13
11
14
import lvgl as lv
12
15
import fs_driver
Original file line number Diff line number Diff line change 1
- import sys
1
+ import usys as sys
2
2
sys .path .append ('' ) # See: https://github.com/micropython/micropython/issues/6419
3
3
4
4
# See: https://pymotw.com/2/sys/tracing.html
Original file line number Diff line number Diff line change 5
5
# Initializations
6
6
##############################################################################
7
7
8
- import sys
8
+ import usys as sys
9
9
sys .path .append ('' ) # See: https://github.com/micropython/micropython/issues/6419
10
10
11
11
import lvgl as lv
Original file line number Diff line number Diff line change 1
1
# init
2
2
3
- import sys
3
+ import usys as sys
4
4
sys .path .append ('' ) # See: https://github.com/micropython/micropython/issues/6419
5
5
6
6
import lvgl as lv
Original file line number Diff line number Diff line change 1
1
2
2
# init
3
3
4
- import sys
4
+ import usys as sys
5
5
sys .path .append ('' ) # See: https://github.com/micropython/micropython/issues/6419
6
6
7
7
import ustruct as struct
Original file line number Diff line number Diff line change 1
- import sys
1
+ import usys as sys
2
2
sys .path .append ('' ) # See: https://github.com/micropython/micropython/issues/6419
3
3
4
- import time
5
4
import lv_utils
6
5
import lvgl as lv
7
6
Original file line number Diff line number Diff line change 5
5
#
6
6
##############################################################################
7
7
8
- import sys
8
+ import usys as sys
9
9
sys .path .append ('' ) # See: https://github.com/micropython/micropython/issues/6419
10
10
11
11
import lvgl as lv
18
18
driver = display_driver_utils .driver ()
19
19
scr = lv .scr_act ()
20
20
lv .img .cache_set_size (2 )
21
- script_path = __file__ [:__file__ .rfind ('/' )] if __file__ .find ('/' ) >= 0 else '.'
21
+ try :
22
+ script_path = __file__ [:__file__ .rfind ('/' )] if __file__ .find ('/' ) >= 0 else '.'
23
+ except NameError :
24
+ script_path = ''
22
25
23
26
# Register an image decoder
24
27
Original file line number Diff line number Diff line change 15
15
16
16
# Workaround for including frozen modules when running micropython with a script argument
17
17
# https://github.com/micropython/micropython/issues/6419
18
- import sys
18
+ import usys as sys
19
19
sys .path .append ('' )
20
20
21
21
# Imports
You can’t perform that action at this time.
0 commit comments