Copying code from a [code] block

Copying code from a [code] block

Postby Ofnuts » Sun May 31, 2015 1:14 pm

When you use "select all" in a code block and then copy/paste to an editor, each line is prefixed with 4 spaces (to which the python interpreter later objects). Not that hard to remove, but could these been avoided?
This forum has been moved to http://python-forum.io/. See you there.
User avatar
Ofnuts
 
Posts: 2659
Joined: Thu May 14, 2015 9:46 am
Location: Paris, France, EU, Earth, Solar system, Milky Way, Local Cluster, Universe #32987440940987

Re: Copying code from a [code] block

Postby micseydel » Sun May 31, 2015 7:25 pm

I've had that happen in the past, but not recently. I just tried to reproduce it with Linux Mint and OS X (using Chrome in each) to no avail. I doubt we could do anything about it even if it were our/phpBB's fault. Out of curiosity though, what setup do you have that produces this problem?
Due to the reasons discussed here we will be moving to python-forum.io on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
micseydel
 
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Copying code from a [code] block

Postby Mekire » Sun May 31, 2015 8:42 pm

I have consistently had this issue on both windows 7 and linux mint 17 (any editor). It isn't a huge issue as I can just ctl+a and shift+tab but it is definately irritating. I agree though, probably nothing we can do about it.
New Users, Read This
  • Use code tags when posting code.
  • Include any errors with your post (in code tags).
  • Describe your problem; not your chosen solution.
  • Make examples the minimum length to demonstrate your issue.
User avatar
Mekire
 
Posts: 1711
Joined: Thu Feb 07, 2013 11:33 pm
Location: Tucson, Arizona

Re: Copying code from a [code] block

Postby metulburr » Sun May 31, 2015 10:01 pm

I have never once had this issue with either any windows, linux distros, or numerous browsers i use. I tried reproducing it as well, but i cannot get it to do that at all.

That would be annoying as hell though.
we will be moving to python-forum.io on October 1 2016
more details here
User avatar
metulburr
 
Posts: 2244
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: Copying code from a [code] block

Postby Mekire » Mon Jun 01, 2015 4:07 am

Hmm, maybe it is a browser thing then. Both windows and linux I use firefox. Might be the reason.
New Users, Read This
  • Use code tags when posting code.
  • Include any errors with your post (in code tags).
  • Describe your problem; not your chosen solution.
  • Make examples the minimum length to demonstrate your issue.
User avatar
Mekire
 
Posts: 1711
Joined: Thu Feb 07, 2013 11:33 pm
Location: Tucson, Arizona

Re: Copying code from a [code] block

Postby buran » Mon Jun 01, 2015 5:52 am

I always have this issue on python-forum.org, win8, win7, firefox. Just tried with win7 and opera and didn't have the issue
Note that with win7, Firefox, I don't have issue on another phpBB forum (http://www.excelforum.com/).
Last edited by buran on Mon Jun 01, 2015 10:36 am, edited 1 time in total.
We are moving to http://www.python-forum.io as of 1 October. Did you register there?
buran
 
Posts: 372
Joined: Tue Apr 08, 2014 4:53 pm
Location: Bulgaria, EU

Re: Copying code from a [code] block

Postby Ofnuts » Mon Jun 01, 2015 6:23 am

Hmm. Tested with Chrome and Rekonq (same OS and editor otherwise) and no spaces. Looks like a Webkit vs Gecko issue...
This forum has been moved to http://python-forum.io/. See you there.
User avatar
Ofnuts
 
Posts: 2659
Joined: Thu May 14, 2015 9:46 am
Location: Paris, France, EU, Earth, Solar system, Milky Way, Local Cluster, Universe #32987440940987

Re: Copying code from a [code] block

Postby ichabod801 » Mon Jun 01, 2015 10:38 pm

Yeah, I have the problem in firefox as well. But it's just habit now to dedent the whole thing before running it.
Due to the reasons discussed here we will be moving to python-forum.io on October 1st, 2016.
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
ichabod801
 
Posts: 688
Joined: Sat Feb 09, 2013 12:54 pm
Location: Outside Washington DC

Re: Copying code from a [code] block

Postby buran » Tue Jun 02, 2015 7:47 am

Just to share one more observation. I have the problem only when I click on select all and then copy the text. If I manually select the text and copy it, then there is no problem.
We are moving to http://www.python-forum.io as of 1 October. Did you register there?
buran
 
Posts: 372
Joined: Tue Apr 08, 2014 4:53 pm
Location: Bulgaria, EU


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests

cron