semvec/pypi-packages huggingface dataset:
pytasks 1.3
work on time-triggered or event-triggered tasks
License: BSD


 Example

    #test.py
    from pytasks import App
    from datetime import datetime as dt
    from datetime import timedelta as td
    class T:
        def __init__(self, taskid):
            self.times = 10    #<--------------the largest number of this task will be executed
            self.now = dt.now()
            self.every = td(seconds=4)  #<------frequency of task being polled
            self.taskid = taskid
        def __call__(self):    #<--------------content of task
            print self.taskid, ":", dt.now()-self.now
            self.now =dt.now()
        def schedule(self):    #<--------------task'schedule：
            return dt.now()+td(seconds=2)         #return bool() or datetime.datetime(...)[means the time to run task]
    task1 = T(1)                                   
    task2 = T(2)
    #set task2's schedule
    task2.schedule = lambda: True if os.environ['LOGNAME']=='root' else False
    app = App()
    app.add(task1)
    app.add(task2
    app.run()
autodebug 1.0.1
Importing this module enables automatic post mortem debugging upon any exception. It uses module specified in envvar
License: BSD
Keywords: debugger debug automatic auto auto-debug

Auto-Debugger
==============

Overview
--------------

This is a simple module which enables you to have automatic post-mortem debugging as simply as possible

Usage
--------------

Install it using ``pip install autodebug``.

Then in your Python script, before the possible exception write

    import autodebug
 

Then if any **uncaught** exception happens, you'll be immediately transferred to debugger.
Exactly the moment **before** the exception occured. So you'll have access to all variables and everything.

Debugger
--------------

You can specify which Python debugger you want to use.

To do that simply set the environmental variable ``AUTO_DEBUG``.
Possible debuggers currently are:

* ``pdb`` for built-in Python debugger
* ``ipdb`` for ``ipdb`` Python debugger
* ``pudb`` for full-screen console Python debugger.

If you do not set the variable, ``pdb`` will be used, as it is built-in.

Post notes
--------------

* Please note that this module uses custom ``sys.excepthook``, so if you are using your own, this module will not work, or will overwrite your ``excepthook`` 
  (This depends on order of ``import`` and setting your own ``excepthook``)

* In order to make it work with ``uwsgi`` you have to pass ``--honour-stdin`` to uwsgi configuration. This will make it possible to debug ``uwsgi`` applications!.
  But keep in mind, that if you've got more than 1 worker, and multiple people are using your application, the terminal output will be ugly.

* The debugger won't start if it is imported inside interactive console, so it may not work in some IDEs. Experiment yourself, however it is adviced to start your
  programs using command line.