Adafruit Raspberry Pi Python Code TabError in v3.2
Posted: Thu Mar 06, 2014 8:02 pm
Hi
Still a newbie (just less newbie than a fortnight ago!) and just trying to learn about using GPIO and the Adafruit Cobbler. I've downloaded the code from http://github.com/adafruit/Adafruit-Ras ... n-Code.git. Two issues:
1. Unless I'm in the specific directory for a module, the import won't work. If I echo $PYTHONPATH I get a blank line returned. The code has several directories for each of the modules so do I have to add every one to the PYTHONPATH? What's the easiest way to add paths?
2. If I use Python3.2 (which is what started on) I get a TabError importing the Adafruit_CharLCD.py module but I don't get the error if I use Python2.7. I'm assuming this will happen with other modules and I'm guessing 3.2 is stricter on the indentation rules. How can I get the modules to import without error in 3.2? Do I need to edit every module to get the indentation right!?
Sorry if these are dumb questions but struggling a bit now!
Cheers
Rob
Still a newbie (just less newbie than a fortnight ago!) and just trying to learn about using GPIO and the Adafruit Cobbler. I've downloaded the code from http://github.com/adafruit/Adafruit-Ras ... n-Code.git. Two issues:
1. Unless I'm in the specific directory for a module, the import won't work. If I echo $PYTHONPATH I get a blank line returned. The code has several directories for each of the modules so do I have to add every one to the PYTHONPATH? What's the easiest way to add paths?
2. If I use Python3.2 (which is what started on) I get a TabError importing the Adafruit_CharLCD.py module but I don't get the error if I use Python2.7. I'm assuming this will happen with other modules and I'm guessing 3.2 is stricter on the indentation rules. How can I get the modules to import without error in 3.2? Do I need to edit every module to get the indentation right!?
Sorry if these are dumb questions but struggling a bit now!
Cheers
Rob