default distribution and, optionally, for SMP
Module name is r8168
Here you can find a tarball of the driver disk. Just unpack to a filesystem accessible during the installation process.
This driver disk supports r8168 for the following kernels:
As an happy user of the SciTE editor I was missing this feature in Komodo Edit which by the way is an excellent product.
Comment/uncomment means that a "special" comment string is used, i.e. #~ for Python. If this string is present at beginning of line the macro removes it (uncomment); if not it is inserted (comment). Python and PHP only for now, and poor code for sure. Any help is welcome.
import logging
logger = logging.getLogger('macro')
h = logging.FileHandler("/tmp/somefile", "w")
logger.addHandler(h)
ke = komodo.editor
kd = komodo.document
kv = komodo.view
commentMap = {
u'python': '#~ ',
u'php': '//~ ',
u'javascript': '//~ ',
u'c++': '//~ ',
}
commentTxt = commentMap[kd.language.lower()]
def EVAL(stmt):
res = eval(stmt)
logger.error("%s --> %s" % (stmt, res))
def getLineNo(position=None):
pos = position or ke.currentPos
return ke.lineFromPosition(pos)
def getLine(lineNo=None):
line = lineNo or getLineNo()
eol = ke.getLineEndPosition(line)
return ke.getTextRange(ke.currentPos, eol)
def vCHome(lineNo=None):
if (lineNo is not None):
ke.gotoLine(lineNo)
ke.vCHome()
if (getLine().strip() == ''):
return
if (ke.getTextRange(ke.currentPos, ke.currentPos+1).isspace()):
ke.vCHome()
def doLine(lineNo=None):
vCHome(lineNo)
pos = ke.currentPos
s = ke.getTextRange(pos, pos+len(commentTxt))
if (s == commentTxt):
ke.setSel(pos, pos+len(commentTxt))
ke.replaceSel('')
else:
ke.insertText(pos, commentTxt)
komodo.view.setFocus()
try:
pStart = ke.anchor
pEnd = ke.currentPos
lStart = ke.lineFromPosition(pStart)
lEnd = ke.lineFromPosition(pEnd)
if (lEnd < lStart):
tmp = lStart
lStart = lEnd
lEnd = tmp
for line in range(lStart, lEnd+1):
doLine(line)
except:
logger.error("Error", exc_info=True)
return
|
|
September '07 |
|
||||
| Mo | Tu | We | Th | Fr | Sa | Su |
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
2006-2008 Giuseppe 'Cowo' Corbelli | Cowo's homepage | Cowo's photo page | Contact me | Back to top
Design by Andreas Viklund | Serendipity Template by Carl