Backgrid.js – A set of core Backbone UI elementshttp://codevisually.com/backgrid-js/ Dated Added → Feb 16, 2013Categories → Framework 0 inShare Backgrid.js is a set of components for building semantic and easily stylable data grid widgets. It offers a simple, intuitive programming interface that makes easy things easy, but hard things possible when dealing with tabular data. The goal of Backgrid..
파이썬 3의 특징 모든 문자열은 유니코드로 처리한다. 변수명에 한글을 사용할 수도 있다. print문은 없어지고 함수 print()만 사용할 수 있다. raw_input()은 없어지고 input()을 사용한다.
python으로 android phone에 웹서버 만들기 Tutorial : http://code.google.com/p/android-scripting/wiki/Tutorials httpd.py import SimpleHTTPServer from os import chdir chdir('/sdcard/') SimpleHTTPServer.test() 실행하면 아래처럼 로그가 올라온다. 그럼, 폰의 웹브라우저로 접속하면 아래와 같다. 무선 AP에 접속 중이면 같은 망에 있는 다른 디바이스에서도 접근이 가능하도록 고유 IP를 찾아서 보자. shell로 접속해서 netcfg를 실행하면 "eth0"가 실행중인 것이 지금 실행중인 Lan정보이다. 그 IP를 사용하면 된다.
파이썬을 이용한 단어모음파일에서 무작위로 단어 프린트하기 wordlist.txt : 단어모음 text 파일 wordlist.py : 단어장 스크립트 파일 Line.3 : getcwd()를 이용하여 알아낸 경로에 'sl4a'가 포함되어 있으면 경로를 지정해 주도록한다. Line.4 : 파일을 읽는다. Line.5 : 파일내용을 splitlines(위 이미지는 오타)로 한줄씩 분할한다. lambda 함수는 간단한 함수를 한줄로 줄여준다. Line.8 : 사용자의 입력을 무한반복으로 기다린다.
예제 스크립트가 많아지면 파일및 폴더관리가 쉽지 않다. +ADD 버튼 선택하여 Folder를 생성해서 Shell로 관리하면 된다. 물론 PC와 USB 연결해서 정리하면 훨씬 빠르겠다. 간단 명령어 pwd : 현재 위치를 보여준다. cd scripts : scripts 폴더로 이동한다. ls : 디렉토리내의 파일목록을 보여준다. ls -l 또는 ll : 자세리 파일목록을 보여준다. mv hello_android.py scripts : scripts 폴더로 hello_android.py 파일을 이동시킨다. rm hello_android.py: 파일 삭제 사진찍기, 연속 촬영하기 import android,time a = android.Android() def pic(): return 'sdcard/sl4a/..
안드로이드폰에서 파이썬을 사용하려면 SL4A(Scripting Layer for Android), Python for Android를 설치해야 한다. SL4A 설치 : http://code.google.com/p/android-scripting/ android-scripting Scripting Layer for Android brings scripting languages to Android. QR로 다운 받을 수 있다. : http://android-scripting.googlecode.com/files/sl4a_r6.apk SL4A를 실행하고 Menu > View > Interpreters 를 선택하면 "SHELL"이라는 메뉴가 나타난다. shell 을 통해서 안드로이드폰과 대화를 할 수 있다. 난..