Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(1)  |  Derive(0)  |  Import(2)

src/b/r/BrickPython-0.4/ExamplePrograms/TrialApp.py   BrickPython(Download)
 
from BrickPython.TkApplication import TkApplication
from BrickPython.Sensor import Sensor, TouchSensor, LightSensor,\
    UltrasonicSensor
import logging

src/b/r/BrickPython-0.4/test/TestSensor.py   BrickPython(Download)
import unittest
from BrickPython.BrickPi import PORT_1
from BrickPython.Sensor import Sensor, TouchSensor, UltrasonicSensor, LightSensor
import TestScheduler
 
    def testLightSensor(self):
        #Light is 680, dark about 800
        sensor = LightSensor('4')
        self.assertEquals(sensor.port, 3)
        self.assertEquals( sensor.idChar, '4' )