Skip to content
Permalink
Browse files

[pyqgis-console] fix sharing snippets code via codepad

  • Loading branch information
slarosa committed May 1, 2013
1 parent 36e613a commit d8fd259628c40cc7c2c4b5466302d4ec21668887
Showing with 2 additions and 7 deletions.
  1. +2 −7 python/console/console_editor.py
@@ -345,18 +345,13 @@ def objectListEditor(self):
else:
listObj.show()
self.parent.pc.objectListButton.setChecked(True)

def codepad(self):
import urllib2, urllib
listText = self.selectedText().split('\n')
getCmd = []
for strLine in listText:
if strLine != "":
#if s[0:3] in (">>>", "..."):
# filter for special command (_save,_clear) and comment
if strLine[4] != "_" and strLine[:2] != "##":
strLine.replace(">>> ", "").replace("... ", "")
getCmd.append(unicode(strLine))
getCmd.append(unicode(strLine))
pasteText= u"\n".join(getCmd)
url = 'http://codepad.org'
values = {'lang' : 'Python',

0 comments on commit d8fd259

Please sign in to comment.
You can’t perform that action at this time.