- 
                Notifications
    You must be signed in to change notification settings 
- Fork 101
Open
Description
I can't seem to be able to access the file descriptor...
>>> from quick2wire.gpio import pins, In, Out
>>> pins.pin(0, direction=In)
quick2wire.gpio.Pin(0)
>>> pin = pins.pin(0, direction=In)
>>> dir(pin)
['__class__', '__delattr__', '__dict__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__trigger__', '__weakref__', '_bank', '_check_open', '_direction', '_file', '_index', '_interrupt', '_pin_path', '_pull', '_soc_pin_number', '_write', 'bank', 'close', 'closed', 'direction', 'fileno', 'get', 'index', 'interrupt', 'open', 'pull', 'set', 'soc_pin_number', 'value']
>>> pin.fileno()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.2/dist-packages/quick2wire/gpio.py", line 180, in fileno
    return self._file.fileno()
AttributeError: 'NoneType' object has no attribute 'fileno'
>>> 
Metadata
Metadata
Assignees
Labels
No labels