2
platform.machine()
을 제외한 다음 Ubuntu x86_64 데스크톱과 Raspberry Pi에서 다음 프로그램을 동일하게 작동 시키려고합니다.Pyparsing은 다른 컴퓨터에서 다르게 동작합니다
test.py : 우분투 x86_64의 바탕 화면에서
from pyparsing import QuotedString
import platform
print platform.machine()
string = QuotedString("'", escChar='\\')
print string.parseString(r"'abcd\\'")
: 라즈베리 파이에
$ cat /etc/issue
Ubuntu 12.04.4 LTS
$ python --version
Python 2.7.3
$ python test.py
x86_64
['abcd\\']
:
$ cat /etc/issue
Raspbian GNU/Linux 7
$ python --version
Python 2.7.3
$ python test.py
armv6l
['abcd\\\\']
감사합니다.