Greetings,
I have noticed that the
I have noticed that the
Code:
boxes often change what I place in them! Not desirable!
For example, I can not correctly display this particular line of python code - neither in body text nor in a code box:
GPIO.setup("P9_11", GPIO.OUT)
It looks correct until I post, and then when I read the post it has changed and if I copy/paste, it remains incorrect.
The above GPIO.setup line should have the syntax:
GPIO.setup-leftparen-doublequote-P9_11-doublequote-comma-space-GPIO.OUT-rightparen
Do you receive it correctly?
I am using the most recent Safari in OS X 10.10.5, if that matters.
Thanks for your work...
Frank
Last edited:
Yep - I read that line of code as:
GPIO.setup("P9_11GPGPIO.OUT)
...which would break the script that contains it...
GPIO.setup("P9_11GPGPIO.OUT)
...which would break the script that contains it...
...and when I read the original post using Chrome on the Mac, I see the same error, so I will just try posting it again below to see if the error is browser-specific:
GPIO.setup("P9_11", GPIO.OUT)
GPIO.setup("P9_11", GPIO.OUT)
...not browser specific! Chrome gets it wrong too! I think the forum needs to disable all spell checking within code boxes. ...just a hunch...
Best,
Frank
Best,
Frank
Waaait a minute! Now, 5-6 minutes later after posting from Chrome, the original post is displaying correctly! But if I reload the page it changes back to the wrong syntax. I will go back to Safari and check from there...
Last edited:
Reloaded into Safari and no go - original line of code in post #1 is still wrong
Good luck figuring this out!
Good luck figuring this out!
Did you notice it will preview correctly. Then it will show correctly while the page loads and then it changes when the page finishes loading. Hmmm.
PHP:GPIO.setup("P9_11", GPIO.OUT)
Thanks for looking at this Allen. The the line in the above box is correct. What is the font?
Courier new. I just checked my browser settings to confirm this because I can change it from there, but it's reasonable to assume it is the default in most browsers. It has been my preferred monospace font since it was in common use.
Showing this font without using the code tags.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import Adafruit_BBIO.GPIO as GPIO
import time
import smbus # needed if you later want to add i2c functions
# GPIO setup needed to address pins
GPIO.setup("P9_11", GPIO.OUT)
GPI😵utput("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPI😵utput("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPI😵utput("P9_13", GPIO.LOW)
rate = 0
rawrate = 0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import Adafruit_BBIO.GPIO as GPIO
import time
import smbus # needed if you later want to add i2c functions
# GPIO setup needed to address pins
GPIO.setup("P9_11", GPIO.OUT)
GPI😵utput("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPI😵utput("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPI😵utput("P9_13", GPIO.LOW)
rate = 0
rawrate = 0
Last edited:
...sorry, but THAT is what I'm talking about... At least the problem is being replicated! 😕 😕
I know of a few other examples where code was broken and can dig them up and supply them if it would help.
Frank
I know of a few other examples where code was broken and can dig them up and supply them if it would help.
Frank
Last edited:
OK, I checked that twice before I left and it was OK, now I come back and it is parsed wrongly. I'm going to try it now with the -left bracket-noparse-right bracket- tags.
GPIO.setup("P9_11", GPIO.OUT)
GPIO.output("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPIO.output("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPIO.output("P9_13", GPIO.LOW)
GPIO.setup("P9_11", GPIO.OUT)
GPIO.output("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPIO.output("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPIO.output("P9_13", GPIO.LOW)
Attachments
Last edited:
OK, I took out the spaces and it changes, taking out the parentheses on the right (first and third lines). The fifth is OK if I take out the first few characters.
GPIO.setup("P9_11",GPIO.OUT)
GPI😵utput("P9_11",GPIO.LOW)
GPIO.setup("P9_12",GPIO.OUT)
GPI😵utput("P9_12",GPIO.LOW)
O.setup("P9_13", GPIO.OUT)
GPI😵utput("P9_13",GPIO.LOW)
GPIO.setup("P9_11",GPIO.OUT)
GPI😵utput("P9_11",GPIO.LOW)
GPIO.setup("P9_12",GPIO.OUT)
GPI😵utput("P9_12",GPIO.LOW)
O.setup("P9_13", GPIO.OUT)
GPI😵utput("P9_13",GPIO.LOW)
Last edited:
It seems to get left alone using the special tags, I've seen this done before and until now didn't realise why
[special=GPIO.setup("P9_11", GPIO.OUT)
GPI😵utput("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPI😵utput("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPI😵utput("P9_13", GPIO.LOW)]%[/special]
[special=GPIO.setup("P9_11", GPIO.OUT)
GPI😵utput("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPI😵utput("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPI😵utput("P9_13", GPIO.LOW)]%[/special]
- Status
- Not open for further replies.
- Home
- Site
- Forum Problems & Feedback
- Code boxes seem to modify syntax