Python Forum

Full Version: Syntax Highlighter Codebox Issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Quote:No problem for me when i copy direct from PyCharm.
I donwloaded pycharm to test this and i get the same thing too
Pasted straight out as text:
class Klass:
   pass


and in the code box
[color=#000080][b]class [/b][/color]Klass:

    [color=#000080][b]pass[/b][/color]




It modifies the text from thereafter within MyBB editor
Some code in PyCharm preserve tag from net.
There is a Copy as plain text that fix this out of PyCharm.
This i wrote out within pycharm, but the latter fixes anyways. 

Oh i see

@[sparkz_alot]

class Klass:

    pass
Ok, this is copied as 'plain text' in pycharm

while True:
    number = int(input("enter a number between 1 and 10: "))    # Get a number
    if 0 <= number <= 10:
        print("number = ", number)
        # Go back and get another number
    else:
        print("out of range")
        break    # Break out of 'while' loop and continue with next command

print("Done")
which works like a charm or should i say like a pycharm  :D
Whenever we stop changing stuff, and keep things more static, ill start making more help documents....including adding a tip for pycharm users :) for the python code tags
Atom
import curses
stdscr = curses.initscr()
from curses import wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)
PyCharm
[color=#000000][size=x-small][font=DejaVu Sans Mono][color=#000080][b]import [/b][/color]curses
stdscr = curses.initscr()
[color=#000080][b]from [/b][/color]curses [color=#000080][b]import [/b][/color]wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = [color=#0000ff]20[/color]; begin_y = [color=#0000ff]7
[/color]height = [color=#0000ff]5[/color]; width = [color=#0000ff]40
[/color]win = curses.newwin(height, width, begin_y, begin_x)[/font][/size][/color]
PyCharm has "Copy as Plain Text" in the selection context menu

Sublime Text 3
import curses
stdscr = curses.initscr()
from curses import wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)
Ninja IDE
import curses
stdscr = curses.initscr()
from curses import wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)
Geany
import curses
stdscr = curses.initscr()
from curses import wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)
I think we should enable the default codebox. This (until i figure out how to split them) also comes with the php codebox button as well. There are a few issues with the syntax highlighted codebox. And this allows a good back up. 

The syntax codebox is cool. But a lot of people are getting frustrated with it. Sometimes its better to just get the information across than to have it fancy'd up. If we ever get all the bugs worked out we can always switch the code tags to the python html again.

I think we should use it if having no problems, but if something happens (such as unexpected input), then one would just use the codebox. 

Anyways i didnt want to just switch it without wondering if people are thinking the same thing or not  :naughty:
Maybe wait and see how it goes,i think it work pretty well now.
I have look over most of code on site and it looks okay.
Some post have i correct,if there where some errors.

The features/problem(with MyBB) that tag is preserved when copy from web,
is the same in old code box.
I often copy code from the web. Im getting to the point would rather put it outside the codebox because then i dont have to fuss with it at all. 

And then there are a lot of small minor things that drive me insane.
Here is another issue
If you look at this post
http://python-forum.io/Thread-Tkinter-se...34#pid1534

func_to_run is actually spaced out with underscores. But you cant see that. It only shows spaces and hides the underscores. If you copy it you get the underscores. But it doesnt show that as it.
Pages: 1 2 3 4