File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed
Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 1- from . core import *
1+ import platform
22from .version import __version__
33
4+ # -----------------------------------------------------------------------------
5+ # Guess platform we are running on
6+ def current_platform ():
7+ machine = platform .machine ()
8+ if machine == 'armv5tejl' :
9+ return 'ev3'
10+ elif machine == 'armv6l' :
11+ return 'brickpi'
12+ else :
13+ return 'unsupported'
14+
15+ if current_platform () == 'brickpi' :
16+ from .brickpi import *
17+ else :
18+ # Import ev3 by default, so that it is covered by documentation.
19+ from .ev3 import *
Original file line number Diff line number Diff line change 3030import os
3131import fnmatch
3232import numbers
33- import platform
3433import fcntl
3534import array
3635import mmap
4241from subprocess import Popen
4342
4443
45- # -----------------------------------------------------------------------------
46- # Guess platform we are running on
47- def current_platform ():
48- machine = platform .machine ()
49- if machine == 'armv5tejl' :
50- return 'ev3'
51- elif machine == 'armv6l' :
52- return 'brickpi'
53- else :
54- return 'unsupported'
55-
56-
5744# -----------------------------------------------------------------------------
5845# Attribute reader/writer with cached file access
5946class FileCache (object ):
You can’t perform that action at this time.
0 commit comments