• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python pydevd.settrace函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pysrc.pydevd.settrace函数的典型用法代码示例。如果您正苦于以下问题:Python settrace函数的具体用法?Python settrace怎么用?Python settrace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了settrace函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: init

def init():
    # append pydev remote debugger
    if globalvar.REMOTE_DBG:
        # Make pydev debugger works for auto reload.
        # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
        try:
            import pysrc.pydevd as pydevd
        # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
            pydevd.settrace('localhost', stdoutToServer=True, stderrToServer=True)
        except ImportError:
            sys.stderr.write("Error: " +
                "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")

    
    globalvar.channels = [
            [0, 'favourites', 'Favourites', favourites],
            [1, 'cplus', 'Canal +', cplus],
            [2, 'france1', 'France 1ere', pluzz],
            [3, 'france2', 'France 2', pluzz],
            [4, 'france3', 'France 3', pluzz],
            [5, 'france4', 'France 4', pluzz],
            [6, 'france5', 'France 5', pluzz],
            [7, 'franceO', 'France O', pluzz],
            [8, 'arte', 'Arte', arte],
            [9, 'gulli', 'Gulli', gulli]
            ]    
开发者ID:FreeFighter77,项目名称:freplay,代码行数:26,代码来源:utils.py


示例2: startPyDevClient

 def startPyDevClient(self):
     started = False
     try:
         from pysrc import pydevd
         pydevd.settrace(port=5678, suspend=False)
         started = True
         self._statusBar().showMessage(u"PyDev debugging active")
     except:
         pass
     return started
开发者ID:wbyne,项目名称:qgis-remote-debug,代码行数:10,代码来源:remotedebug.py


示例3: debug

def debug():
    #http://wiki.xbmc.org/index.php?title=HOW-TO_debug_Python_Scripts_with_Eclipse
    # Make pydev debugger works for auto reload.
    # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
    print sys.path
    try:
        from pysrc import pydevd
    # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
        pydevd.settrace('localhost', stdoutToServer = True, stderrToServer = True)
    except ImportError:
        sys.stderr.write("Error: " +
            "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
        sys.exit(1)
开发者ID:alshain,项目名称:xbmc-sftv,代码行数:13,代码来源:util.py


示例4: debug

 def debug(self):
     
     if REMOTE_DBG:
             # Make pydev debugger works for auto reload.
             # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
         try:
             import pysrc.pydevd as pydevd
             # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
             pydevd.settrace('localhost', port=5678, stdoutToServer=True, stderrToServer=True)
         except ImportError:
             sys.stderr.write("Error: " +
                     "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
             sys.exit(1)         
     
     return
开发者ID:majello,项目名称:Sick-Beard-Majello,代码行数:15,代码来源:nyaatorrents.py


示例5: debugger

def debugger():
    try:

        remote_debugger = settings.getSetting('remote_debugger')
        remote_debugger_host = settings.getSetting('remote_debugger_host')

        # append pydev remote debugger
        if remote_debugger == 'true':
            # Make pydev debugger works for auto reload.
            # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
            import pysrc.pydevd as pydevd
            # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
            pydevd.settrace(remote_debugger_host, stdoutToServer=True, stderrToServer=True)
    except ImportError:
        xbmc.log(addon.getLocalizedString(30016), xbmc.LOGERROR)
        sys.exit(1)
    except :
        pass
开发者ID:ddurdle,项目名称:Amazon-Cloud-Drive-for-KODI,代码行数:18,代码来源:kodi_common.py


示例6: __init__

 def __init__(self, debug = True):
     '''
     Constructor
     '''
     if debug:
         # Make pydev debugger works for auto reload.
         # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
         try:
             from pysrc import pydevd;  
         except:
             sys.stderr.write("Error: " +
                 "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.");
             return;
         
         try:
             pydevd.settrace("localhost", stdoutToServer=True, stderrToServer=True, suspend=True);
         except:
             sys.stderr.write("Error: " +
                 "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.");
             return;
开发者ID:IanCallaghan,项目名称:script.service.superepg,代码行数:20,代码来源:debugManager.py


示例7: startDebugging

 def startDebugging(self):
     active = False
     #Eric4
     try:
         from dbg_client.DebugClient import DebugClient
         DBG=DebugClient()
         DBG.startDebugger(host='localhost', filename='', port=42424, exceptions=True, enableTrace=True, redirect=True)
         active = True
         self._statusBar().showMessage(u"Eric4 debugging active")
     except:
         pass
     #PyDev (Eclipse)
     try:
         from pysrc import pydevd
         pydevd.settrace(port=5678, suspend=False)
         active = True
         self._statusBar().showMessage(u"PyDev debugging active")
     except:
         pass
     if not active:
         self._statusBar().showMessage(u"Debugging connection failed")
开发者ID:m-kuhn,项目名称:qgis-remote-debug,代码行数:21,代码来源:remotedebug.py


示例8:

except:
    import simplejson as json
import SimpleDownloader as downloader
import time


g_ignoreSetResolved=['plugin.video.f4mTester','plugin.video.shahidmbcnet']

REMOTE_DBG=False;
if REMOTE_DBG:
    # Make pydev debugger works for auto reload.
    # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
    try:
        import pysrc.pydevd as pydevd
    # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
        pydevd.settrace('localhost', stdoutToServer=True, stderrToServer=True)
    except ImportError:
        sys.stderr.write("Error: " +
            "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
        sys.exit(1)  


addon = xbmcaddon.Addon('plugin.video.live.streams')
addon_version = addon.getAddonInfo('version')
profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
home = xbmc.translatePath(addon.getAddonInfo('path').decode('utf-8'))
favorites = os.path.join(profile, 'favorites')
REV = os.path.join(profile, 'list_revision')
icon = os.path.join(home, 'icon.png')
FANART = os.path.join(home, 'fanart.jpg')
source_file = os.path.join(profile, 'source_file')
开发者ID:aladm,项目名称:ShaniXBMCWork,代码行数:31,代码来源:default.py


示例9: log

#from resources.lib import tvWindow


#debugging
try:

    remote_debugger = addon.getSetting('remote_debugger')
    remote_debugger_host = addon.getSetting('remote_debugger_host')

    # append pydev remote debugger
    if remote_debugger == 'true':
        # Make pydev debugger works for auto reload.
        # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
        import pysrc.pydevd as pydevd
        # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
        pydevd.settrace(remote_debugger_host, stdoutToServer=True, stderrToServer=True)
except ImportError:
    log(addon.getLocalizedString(30016), True)
    sys.exit(1)
except :
    pass


# retrieve settings
user_agent = addon.getSetting('user_agent')


mode = plugin_queries['mode']

# make mode case-insensitive
mode = mode.lower()
开发者ID:azumimuo,项目名称:family-xbmc-addon,代码行数:31,代码来源:default.py


示例10: __init__

# REMOTE DEBUGGING
REMOTE_DBG = False

# append pydev remote debugger
if REMOTE_DBG:
    # Make pydev debugger works for auto reload.
    # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
    try:
        import pysrc.pydevd as pydevd
    # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
        pydevd.settrace('localhost', stdoutToServer=True, stderrToServer=True, suspend=False)
    except ImportError:
        sys.stderr.write("Error: " +
            "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
        sys.exit(1)
    except:
        sys.stderr.write('Remote Debugger is not started')



##if (__name__ == "__main__" ):
##    from lib.main import Main
##    main = Main()
##    main.run()

class Main:
  def __init__(self):
    self.pDialog = None
    self.run()
开发者ID:gtfamily,项目名称:gtfamily,代码行数:29,代码来源:default.py


示例11:

'''
Created on Jan 9, 2011

@author: Administrator
'''


from pysrc import pydevd

pydevd.settrace('172.16.0.1', stdoutToServer=True, stderrToServer=True)
import rpyc
print 'marek'
开发者ID:mwicat,项目名称:s60rpyc,代码行数:12,代码来源:_devd.py


示例12: searchBacklog

    def searchBacklog(self, which_shows=None):

        REMOTE_DBG = False
            
        if REMOTE_DBG:
                    # Make pydev debugger works for auto reload.
                    # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
            try:
                import pysrc.pydevd as pydevd
                    # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
                pydevd.settrace('localhost', port=5678, stdoutToServer=True, stderrToServer=True)
            except ImportError:
                sys.stderr.write("Error: " +
                        "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
                sys.exit(1)

        if which_shows:
            show_list = which_shows
        else:
            show_list = sickbeard.showList

        if self.amActive == True:
            logger.log(u"Backlog is still running, not starting it again", logger.DEBUG)
            return

        self._get_lastBacklog()

        curDate = datetime.date.today().toordinal()
        fromDate = datetime.date.fromordinal(1)

        if not which_shows and not curDate - self._lastBacklog >= self.cycleTime:
            logger.log(u"Running limited backlog on recently missed episodes only")
            fromDate = datetime.date.today() - datetime.timedelta(days=7)

        self.amActive = True
        self.amPaused = False

        #myDB = db.DBConnection()
        #numSeasonResults = myDB.select("SELECT DISTINCT(season), showid FROM tv_episodes ep, tv_shows show WHERE season != 0 AND ep.showid = show.tvdb_id AND show.paused = 0 AND ep.airdate > ?", [fromDate.toordinal()])

        # get separate lists of the season/date shows
        #season_shows = [x for x in show_list if not x.air_by_date]
        air_by_date_shows = [x for x in show_list if x.air_by_date]

        # figure out how many segments of air by date shows we're going to do
        air_by_date_segments = []
        for cur_id in [x.tvdbid for x in air_by_date_shows]:
            air_by_date_segments += self._get_air_by_date_segments(cur_id, fromDate) 

        logger.log(u"Air-by-date segments: "+str(air_by_date_segments), logger.DEBUG)

        #totalSeasons = float(len(numSeasonResults) + len(air_by_date_segments))
        #numSeasonsDone = 0.0

        # go through non air-by-date shows and see if they need any episodes
        for curShow in show_list:

            if curShow.paused:
                continue

            if curShow.air_by_date:
                segments = [x[1] for x in self._get_air_by_date_segments(curShow.tvdbid, fromDate)]
            else:
                segments = self._get_season_segments(curShow.tvdbid, fromDate)

            for cur_segment in segments:

                self.currentSearchInfo = {'title': curShow.name + " Season "+str(cur_segment)}

                backlog_queue_item = search_queue.BacklogQueueItem(curShow, cur_segment)

                if not backlog_queue_item.wantSeason:
                    logger.log(u"Nothing in season "+str(cur_segment)+" needs to be downloaded, skipping this season", logger.DEBUG)
                else:
                    sickbeard.searchQueueScheduler.action.add_item(backlog_queue_item)  #@UndefinedVariable

        # don't consider this an actual backlog search if we only did recent eps
        # or if we only did certain shows
        if fromDate == datetime.date.fromordinal(1) and not which_shows:
            self._set_lastBacklog(curDate)

        self.amActive = False
        self._resetPI()
开发者ID:majello,项目名称:Sick-Beard-Majello,代码行数:83,代码来源:searchBacklog.py


示例13: fuck

def fuck(_sys, _xbmc):
    ####Variables
    # Inicializadas
    global sys
    global xbmc
    global logger
    global addon
    sys = _sys
    xbmc = _xbmc
    modo = MODO_INICIAL
    params = get_params()
    url_plugin = sys.argv[0]
    handle_xbmc = int(sys.argv[1])
    addon = xbmcaddon.Addon(id=__plugin__)

    # Sin inicializar
    velocidad_internet = 0
    total_a_descargar = 0
    urls_archivos_descargables = []
    hilos_archivos_descargables = []
    logger = None
    opener = None
    pagina = None
    parser_html = None
    carpeta_li = None
    archivo_persistencia = None
    url_descarga = ""
    carpetas = {}

    # append pydev remote debuggerm
    if REMOTE_DBG:
        # Make pydev debugger works for auto reload.
        # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
        try:
            import pysrc.pydevd as pydevd

            # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
            pydevd.settrace("localhost", stdoutToServer=True, stderrToServer=True, port=5678)
        except ImportError:
            sys.stderr.write("Error: " + "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
            sys.exit(1)

    # Inicializando logger

    logging.basicConfig(level=logging.DEBUG)
    logger = logging.getLogger("mierda")
    #   logger.debug("kussou rumba %s" % params)

    # Configurando el timeout de los socketes
    socket.setdefaulttimeout(60)

    if len(params) > 0 and params["modo"]:
        modo = int(params["modo"], 0)

    if modo == MODO_INICIAL:
        logger.debug("Modo inicial")
        carpeta_li = xbmcgui.ListItem("Series", iconImage="DefaultFolder.png", thumbnailImage="")
        carpeta_li.setInfo(type="Video", infoLabels={"Title": "Series"})
        xbmcplugin.addDirectoryItem(
            handle=handle_xbmc, url="%s?modo=%d" % (url_plugin, MODO_CARPETA), listitem=carpeta_li, isFolder=True
        )

        carpeta_li = xbmcgui.ListItem("Canales", iconImage="DefaultFolder.png", thumbnailImage="")
        carpeta_li.setInfo(type="Video", infoLabels={"Title": "Canales"})
        xbmcplugin.addDirectoryItem(
            handle=handle_xbmc, url="%s?modo=%d" % (url_plugin, MODO_LISTA_FLUJO), listitem=carpeta_li, isFolder=True
        )

        carpeta_li = xbmcgui.ListItem("Peliculas", iconImage="DefaultFolder.png", thumbnailImage="")
        carpeta_li.setInfo(type="Video", infoLabels={"Title": "Peliculas"})
        xbmcplugin.addDirectoryItem(
            handle=handle_xbmc, url="%s?modo=%d" % (url_plugin, MODO_LISTA_PELOS), listitem=carpeta_li, isFolder=True
        )

        carpeta_li = xbmcgui.ListItem("Pagos por evento", iconImage="DefaultFolder.png", thumbnailImage="")
        carpeta_li.setInfo(type="Video", infoLabels={"Title": "PPV"})
        xbmcplugin.addDirectoryItem(
            handle=handle_xbmc, url="%s?modo=%d" % (url_plugin, MODO_INICIAL), listitem=carpeta_li, isFolder=True
        )

        xbmcplugin.endOfDirectory(int(sys.argv[1]))
    elif modo == MODO_CARPETA:
        logger.debug("Modo carpeta")

        opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=1))
        opener.addheaders = [("User-agent", "Mozilla/5.0")]
        pagina = opener.open(URL_CACA)
        parser_html = ParserArchivos(pagina)

        archivo_persistencia = shelve.open("mierda")
        archivo_persistencia["carpetas"] = parser_html.carpetas
        archivo_persistencia.close()

        for carpeta in parser_html.carpetas:
            carpeta_li = xbmcgui.ListItem(carpeta.replace(".", " "), iconImage="DefaultFolder.png", thumbnailImage="")
            carpeta_li.setInfo(type="Video", infoLabels={"Title": carpeta.replace(".", " ")})
            xbmcplugin.addDirectoryItem(
                handle=handle_xbmc,
                url="%s?carpeta=%s&modo=%d" % (url_plugin, carpeta, MODO_ARCHIVO),
                listitem=carpeta_li,
#.........这里部分代码省略.........
开发者ID:statusquo2391,项目名称:plugin.video.mierda,代码行数:101,代码来源:crap.py


示例14: WebUIDriver

REMOTE_DBG = True 

# append pydev remote debugger
if REMOTE_DBG:
    # Make pydev debugger works for auto reload.
    # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc
    try:
        import pysrc.pydevd as pydevd
    # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console
        pydevd.settrace('10.155.30.24',port=5678, stdoutToServer=True, stderrToServer=True)
    except ImportError:
        sys.stderr.write("Error: " +
            "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
        sys.exit(1)
        
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.common.by import By

class WebUIDriver(WebDriver):
    def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=None, browser_profile=None, session_id=None):
        self.preserved_session_id = session_id
        WebDriver.__init__(self, command_executor, desired_capabilities, browser_profile)

    def start_session(self, desired_capabilities, browser_profile=None):
        if self.preserved_session_id:
            self.command_executor._commands['getSession'] = ('GET', '/session/$sessionId')
            self.session_id = self.preserved_session_id
            response = self.execute('getSession', {'sessionId ': self.session_id})
            self.session_id = response['sessionId']
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:31,代码来源:clchen_hm_test.py


示例15: start

def start():
    pydevd.settrace('localhost', stdoutToServer=True, stderrToServer=True, suspend=False)
    #pydevd.settrace('192.168.1.10', stdoutToServer=True, stderrToServer=True, suspend=False)
    #pydevd.settrace('192.168.1.10')        
    
    logging.basicConfig(level=logging.DEBUG)
开发者ID:SportySpice,项目名称:Collections,代码行数:6,代码来源:debug.py



注:本文中的pysrc.pydevd.settrace函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python pysrt.open函数代码示例发布时间:2022-05-27
下一篇:
Python dbapi2.connect函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap