Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old May 28th, 2007, 07:33 PM
bartonc's Avatar
Site Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Age: 45
Posts: 6,399
Default New (Firefox)!!! Instructions for copying code from these threads (also IE)

If you are using Firefox as you browser, you'll probably have discovered that the new-style [code] tags don't allow you to copy posted code without an annoying "#" on every other line.
In order for you to get the raw text of the posted code, just hit the "Reply" button, copy what's between the tags and browse "Back" to the OP.

Hope that helps,
Barton

Last edited by bartonc; June 30th, 2007 at 09:00 AM. Reason: Not on IE7 any more
Reply
  #2  
Old May 28th, 2007, 07:59 PM
bvdet's Avatar
Expert
 
Join Date: Oct 2006
Location: Nashville, TN
Posts: 1,221
Default

I have been saving the copied code to a text file and running this script:
Expand|Select|Wrap|Line Numbers
  1. fn = 'script.txt'
  2. outFile = 'script.py'
  3.  
  4. f = open(fn)
  5. fList = [line.rstrip()[6:] for line in f]
  6. f.close()
  7.  
  8. f=open(outFile, 'w')
  9. f.write('\n'.join([i for i in fList if i != '']))
  10. f.close()
Thanks for the tip, Barton. That will be easier.
Reply
  #3  
Old May 28th, 2007, 08:47 PM
bartonc's Avatar
Site Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Age: 45
Posts: 6,399
Default

Quote:
Originally Posted by bvdet
I have been saving the copied code to a text file and running this script:
Expand|Select|Wrap|Line Numbers
  1. fn = 'script.txt'
  2. outFile = 'script.py'
  3.  
  4. f = open(fn)
  5. fList = [line.rstrip()[6:] for line in f]
  6. f.close()
  7.  
  8. f=open(outFile, 'w')
  9. f.write('\n'.join([i for i in fList if i != '']))
  10. f.close()
Thanks for the tip, Barton. That will be easier.
You are welcome. The funny thing is (living in relative isolation from eachother, as we do), I didn't think that this would really affect many users. I'm glad to know that a simple IE user can come up with solutions to other's problems.

Thanks for the script, too. I've quoted you over on the Feedback Forum. It'll be interesting to see other's reactions.
Reply
  #4  
Old June 30th, 2007, 09:22 PM
bartonc's Avatar
Site Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Age: 45
Posts: 6,399
Default

Quote:
Originally Posted by bartonc
If you are using Firefox as you browser, you'll probably have discovered that the new-style [ code ] tags don't allow you to copy posted code without an annoying "#" on every other line.
In order for you to get the raw text of the posted code, just hit the "Reply" button, copy what's between the tags and browse "Back" to the OP.

Hope that helps,
Barton
I now looks as if these instructions apply to everybody. Long lines like:
Expand|Select|Wrap|Line Numbers
  1.     print '*****************************************************************'
get spaces added in some weird place. I remember having this problem in IE a long time ago.
Reply
  #5  
Old August 3rd, 2007, 10:43 AM
bartonc's Avatar
Site Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Age: 45
Posts: 6,399
Default

If found the coolest solution for Firefox users who regularly visit sites that work poorly (or won't work at all - like Window Update) on Firefox!

Just go get ietab for firefox.
It works very well, but you do lose the spell checker.
Reply
  #6  
Old August 14th, 2007, 10:03 AM
latitude's Avatar
Member
 
Join Date: Nov 2006
Age: 33
Posts: 51
Default

ehh...so what happened to my post bartonc???? who deleted it and why??
Reply
  #7  
Old August 14th, 2007, 09:32 PM
bartonc's Avatar
Site Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Age: 45
Posts: 6,399
Default

Quote:
Originally Posted by latitude
ehh...so what happened to my post bartonc???? who deleted it and why??
Do you mean the one in this thread? I split it out to separate the issues being discussed. It was easy to find: Click you name (link to profile) click "find all posts be latitude".
Reply
  #8  
Old August 15th, 2007, 07:59 AM
latitude's Avatar
Member
 
Join Date: Nov 2006
Age: 33
Posts: 51
Default

Ah right, thanks for clearing that up...

Thats such a nice feature it really should be in the control panel - makes life abit more easier!
Reply
  #9  
Old August 26th, 2007, 08:58 PM
bartonc's Avatar
Site Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Age: 45
Posts: 6,399
Default

Firefox users: Clear your cache for a big surprise!
Reply
  #10  
Old November 29th, 2007, 06:04 PM
RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,072
Default

Quote:
Originally Posted by bartonc
Firefox users: Clear your cache for a big surprise!
I did that but my toaster exploded! You are evil Barton, pure evil! Now I need to buy a new toaster.
Reply
  #11  
Old July 9th, 2008, 08:10 PM
tharden3's Avatar
Site Addict
 
Join Date: Jul 2008
Location: Ocala, FL (USA)
Age: 17
Posts: 594
Default

gracias for the tip. I just got firefox (well, I got Ubuntu with firefox) so thanks.
Reply
  #12  
Old August 10th, 2008, 09:51 PM
Newbie
 
Join Date: Aug 2008
Posts: 7
Default

Hi everyone,I used to copy the code.
After that, opening Kwrite on linux.
Then, press Ctrl + R search with regex and put this regex
\s\s+\d+[.]+\n+\s{6}
then replace all.
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles