Giter VIP home page Giter VIP logo

python-livereload's Introduction

LiveReload

Reload webpages on changes, without hitting refresh in your browser.

Installation

LiveReload is for web developers who know Python. It is available on PyPI.

$ pip install livereload

Documentation

LiveReload's documentation is hosted on ReadTheDocs.

Security Report

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

python-livereload's People

Contributors

adq avatar adrianvollmer avatar andrewnelis avatar bcho avatar blueyed avatar bmcculley avatar hoatle avatar hugovk avatar jdufresne avatar kespindler avatar lepture avatar lucas-c avatar mgedmin avatar miracle2k avatar momamene avatar mshahbazi avatar p-eb avatar peque avatar pradyunsg avatar ralsina avatar robinandeer avatar ronnypfannschmidt avatar shadow-light avatar skitazaki avatar sloria avatar thezombie2111 avatar timka avatar twolfson avatar uniphil avatar waylan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-livereload's Issues

修改后浏览器会一直刷新?

我的 Guardfile

https://gist.github.com/3143786

修改 static/css/style.less 之后就会一直返回:

[Timestamp] Reload 1 waiters Changed ['static/css/style.less']

然后浏览器(Chromium 20)就不停刷新了(中途没有修改动作),但是用 liveload.js 不是一直刷新的吧?只是一直请求到有修改为止。

Document how to use livereload

Hello!

I came here from http://serialized.net/2013/01/live-sphinx-documentation-preview/ and got all confused: the blog post talks about Guardfiles, which is not mentioned once in http://livereload.readthedocs.org/en/latest/ or in the repository.

Trawling through the issues makes me think python-livereload used a Guardfile at some point, and then stopped. Instead I now have to write a Python script with the right incantations. Fair enough, but it'd be nice if the documentation had a small note about this, with an example describing how to convert a Guardfile like the one mentioned in the above blog post into a script.

Can't handle PNG file

On Windows, PNG file returns only 5 bytes.

At least, you should change open mode to "rb" (in server.py:146).
But it is better to consider mime-type.
Injection must be performed in case of text/html only.

Add grace_period just like guard-livereload

I'm using this in a django application to watch py files, but since there's no grace_period option to wait a specified number of seconds before restarting, the browser refreshes before the server (started as ./manage.py runserver) has restarted.

CoffeeScript compiler not working correctly + fix

The coffee function in compiler.py does not work correctly because it always compiles the file with the contents it had at the moment of the first function invocation, which results in the same output being generated regardless of the modifications made to the source file.

I have fixed the problem by creating a coffee function like this:

http://pastebin.com/FrfYjJAb

Can you integrate my solution (or at least a working coffeescript compiler) into python-livereload please?

make open_url timeout configurable

Currently it is just set to 5, but I think it would make sense to make it configurable, using e.g. a open_url_timeout parameter.

If you think it is a good idea, should I suggest a pull request?

infinity refresh

There is a logic error in the Task._check_file function.
the st_mtime is never updated making the browser reload infinitely.
To solve this I changed the function to :

@classmethod
    def _check_file(cls, path):
        for ext in IGNORE:
            if path.endswith(ext):
                return False

        if not os.path.isfile(path):
            return False

        modified = os.stat(path).st_mtime

        if path not in cls._modified_times:
            cls._modified_times[path] = modified
            return False


        if cls._modified_times[path] == modified:
            return False


        cls._modified_times[path] = modified
        return True

Use different ports for app (http) and livereload (websocket)

It looks like the websocket request to /livereload, prevents any further AJAX requests from being possible.

I've noticed this with Django's Debug Toolbar (a separate app), where the requests to /__debug__/render_panel/?store_id... are not being sent from Firefox and/or logged from python-livereload.

I guess that using a dedicated port for the websocket connection would help here.

No CLI for Windows?

Hi, the documentation reads, that there is a CLI:

$ livereload --help
usage: livereload [-h] [-p PORT] [directory]

At least for Windows none is available. the installation worked without errors. Am I doing anything wrong? Thank you.

Firefox says it cannot connect

Console shows the browser making an attempt but the URL it's looking for is

ws://localhost:35729/websocket

perhaps this could be added as an alias?

ImportError: No module named 'thread'

Starting the liveserver in shell directly after installing it gave me this output. Any ideas?

  Traceback (most recent call last):
  File "/Users/jonathan/.virtualenvs/hackership/bin/livereload", line 4, in <module>
    from livereload.server import Server
  File "/Users/jonathan/.virtualenvs/hackership/lib/python3.3/site-packages/livereload/__init__.py", line 14, in <module>
    from .server import Server, shell
  File "/Users/jonathan/.virtualenvs/hackership/lib/python3.3/site-packages/livereload/server.py", line 15, in <module>
    import thread
ImportError: No module named 'thread'

livereload doesn't detect file creation

Hi, I am using livereload to auto-rebuild a site from a static site generator, and it works GREAT! However, it seems not to be picking up file creation.

After the file is created, if I "touch" it, it's picked up and triggers a rebuild.

To reproduce:

In one terminal:

mkdir /mp/foo
cd /tmp/foo
livereload -b

In a second terminal:

cd /tmp/foo
touch bar [triggers no refresh]
touch bar [triggers refresh]

Error when opening a directory name without trailing slash

This is reported as getnikola/nikola#1180 but basically, if there is a foo/index.html and you open foo then this will happen:

Traceback (most recent call last):
  File "/home/ralsina/.virtualenvs/nikola/local/lib/python2.7/site-packages/tornado/web.py", line 1218, in _when_complete
    callback()
  File "/home/ralsina/.virtualenvs/nikola/local/lib/python2.7/site-packages/tornado/web.py", line 1239, in _execute_method
    self._when_complete(method(*self.path_args, **self.path_kwargs),
  File "/home/ralsina/.virtualenvs/nikola/local/lib/python2.7/site-packages/livereload/handlers.py", line 181, in get
    with open(filepath, 'r') as f:
IOError: [Errno 21] Is a directory: u'/home/ralsina/Desktop/proyectos/nikola/master/foo/output/galleries/demo/foo'

Specify files to ignore

This may be a non-issue

in the ruby version of livereload the ~/.livereload file allows you to set file types to ignore

this file seems to be ignored, and there is no documentation about how to set file types to be ignored

my current use case is running a django dev server, each time the page loads it writes to project.log the results of the page load
livereload sees the project.log file update and reloads the page
insta-infinite loop

Re-instate CLI functionality

I have been using [email protected] from the command line for a while without any problems. Recently, I was setting up a coworker and we noticed that as of 2.0.0, this functionality is gone.

There doesn't seem to be any documented reason (issue or changelog) why it was removed. Can you explain the reason and possibly put the functionality back in?

python3 support

Please update the pypi index to introduce python 3 support.

Programming Language :: Python :: 3

Livereload might interfere with server restart (when watching for application .py files)

I have noticed that the application automatically gets restarted, if a .py file changes, but it does not trigger a browser reload.

When adding the .py files as tasks, this will trigger a browser reload, but it results in a HTTP error, because the server is restarting when the reload is triggered.

What is the proposed way to get livereloading in this case?

Shouldn't any reloads get triggered after a server restart?

Cannot import enable_pretty_logging from tornado

Hi,

I found that error while trying to start livereload on windows:

C:\Dev\Git\Python\rapid-web\static>livereload -p 8000
...
File "C:\Python27\lib\site-packages\livereload-0.14-py2.7.egg\livereload\server.py", line 18, in
from tornado.options import enable_pretty_logging
ImportError: cannot import name enable_pretty_logging

I've search a little bit and found that in a recent tornado update the enable_pretty_logging method moved packages (https://groups.google.com/forum/#!msg/python-tornado/YanBMlvdI38/nDZ7r5qYHVYJ)

Server.serve ignores root argument

e.g.

server.serve(root=config['static_dir'])
# app will be served out of CWD regardless of the value of root

Looks like it has to do with Server.root being initialized to None, and when serve is called, the parameter root is ignored.
Not sure if this is the intended behavior. Thanks!

The shell() function does not treat correctly a single argument if it contains the whitespace character

The shell() function works very well as long as the command line parameters do not contain the space character ' ', but if I need a command parameter that has a space character, the current implementation treats it as 2 separate parameters.

Python's subprocess.Popen interface works amazingly well because it does not accept a space separated string as the command parameters, but it uses a list instead.
My proposal is to have the shell() function accept both a string or a list (or any other iterable), and if it is a string, then it splits it as it does now, else it passes the command as it is to Popen.

Can't set delay before reloading

When I save my sources the dev server reloads and livereload refreshes page too early. It would be nice to add delay before reload starts.

Possible TypeError: unorderable types: str() > int() on Python 3

I noticed this while reading through the source code of examine (BTW the source code is very clean and elegant!):

        delays = set()
        for path in self._tasks:
            if self.is_changed(path):
                func, delay = self._tasks[path]
                func and func()
                delays.add(delay)

        if delays:
            delay = max(delays)

If you have a task with delay='forever', as well as a task with a numerical delay, and if they trigger simultaneously, this code will end up evaluating max(set([0, 'forever'])) which fails on Python 3:

>>> max(set([0, 'forever']))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: str() > int()

[proposal] restructure server creation

for more complex setups (in particular jspm based fonent, python backend) the creation of propper watchers is messy, and the reported paths dont always match the urls

my current setup is soemthing like:


from tornado.web import StaticFileHandler
from livereload.server import BaseServer


from mybox.web import APIHandler


def F(match, **opts):
    return (match, StaticFileHandler, opts)


class MyBoxServer(BaseServer):
    def get_web_handlers(self):
        return [
            F('/jspm_packages/(config\.js)', path='.',),
            F('/jspm_packages/(.*)', path='jspm_packages'),
            F('/lib/(.*)', path='app'),
            ('api/(.*)', APIHandler, {'backend': None}),
            F('.*()', path='app/html', default_filename='index.html'),
        ]


if __name__ == '__main__':
    server = MyBoxServer()
    server.watch('jspm_packages')
    server.watch('app')
    server.serve(port=5050)

instead i would like to propose a different creation, something more along the lines of

from livereload import Configurator
server = Configurator(auto_inject=False)
server.add_file('jspm_packages/config.js', 'config.js')
server.add_folder('jspm_packages')
server.add_folder('lib', path='app')
server.add_handler('/api', ApiHandler, backend=None)
server.add_appshell('app/html/shell.html')
server.serve(port=5050)

this is just a first iteration on the idea, please beat it into shape

A livereload server for wsgi

Now, livereload will be a library rather than an application. in version: 2.0.0

from livereload import Server

server = Server(wsgi_app)
# run a shell command
server.watch('static/*.stylus', 'make static')
# run a function
server.watch('foo.txt', lambda: print('foo'))
server.serve()

With this snippet it will serve an wsgi application, and it will insert the livereload.js script into the response body.

liverreload Uncaught exception in /livereload

When running on ubuntu 13.04 with python 2.7.4

I use east_install "easy_install livereload"

then

I get this error:

https://gist.github.com/atttx123/6897179

yu @ yu-ubuntu in ~/workspace/bootstrap/
$ livereload -p 8989
Serving path . on 127.0.0.1:8989
[I 131009 14:39:17 web:1635] 200 GET / (127.0.0.1) 6.41ms
[I 131009 14:39:17 web:1635] 304 GET /livereload.js (127.0.0.1) 1.28ms
[I 131009 14:39:17 server:105] Browser Connected: http://127.0.0.1:8989/
[I 131009 14:39:17 server:112] No Guardfile
[I 131009 14:39:17 task:54] Add task: /home/yu/workspace/bootstrap
[I 131009 14:39:17 server:116] Start watching changes
[E 131009 14:39:17 websocket:306] Uncaught exception in /livereload
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1.1-py2.7.egg/tornado/websocket.py", line 303, in wrapper
return callback(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/livereload-1.0.1-py2.7.egg/livereload/server.py", line 117, in on_message
if not Task.start(self.watch_tasks):
File "/usr/local/lib/python2.7/dist-packages/livereload-1.0.1-py2.7.egg/livereload/task.py", line 63, in start
cls.notifier = pyinotify.TornadoAsyncNotifier(cls.wm, ioloop.IOLoop.instance(), default_proc_fun=TaskEventHandler(func=func))
AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
[I 131009 14:39:18 server:105] Browser Connected: http://127.0.0.1:8989/

Livereload doesn't reload any files.

Hook Messages

I'm using livereload with fabric and growl - curious if it's possible to hook the message handling to integrate it a little better into my app:

  1. Reconfigure the message prefix
  2. Send a livereload message to my own function (or)
  3. Send a message to the livereload message emitter

I looked through the docs real quick but didn't see anything. Thanks!

LiveReload Cannot connect to LiveReload server

livereload
启动后 用chrome livereload 插件 点击enable 出现:
** LiveReload Cannot connect to LiveReload server:
ws://127.0.0.1:35729/websocket

后台log
*Start service at 127.0.0.1:35729
*
[W 120820 00:21:18 web:1447] 404 GET /websocket (127.0.0.1) 0.39ms

(Almost) Realtime reload in browser

Is there any way to make browser reload in realtime like we have in sublime? I experience a few second (3-5) longer than sublime.
PS: I use vim

Ignore open_url=True when live-reloading the server

I've a live.py that looks like this:

from livereload import Server

server = Server()
# no recursive globbing on Python 2 :(
for pattern in '*.rst', '*/*.rst':
    server.watch(pattern, 'make html')
server.serve(root='_build/html', open_url=True)

Every time I make a change to it, I see

[I 150408 13:13:54 autoreload:195] live.py modified; restarting server

on the console, and then I get a new browser tab.

I like that livereload reloads its own configuration every time the script changes, but would it be possible to ignore open_url when the reload happens?

Wishlist: recursive watching for a file pattern

I want to run a command whenever a filename matching a particular glob pattern (*.rst) changes in a directory tree.

I can watch the directory tree recursively with server.watch('directory/'), but this triggers for other kinds of files as well.

I can watch for a glob pattern (*.rst), but this doesn't support recursive globbing (yet).

Possible solutions:

  • implement '**/*.rst'-style globbing (perhaps backport the feature from Python 3.5?)
  • add a filter argument so I could say server.watch('.', filter=lambda fn: fn.endswith('.rst'), func='make html')

Note that a solution to manually use an external library for file globbing, like the one suggested in the manual, is unsuitable because it would not pick up newly-created files or subdirectories.

Could not connect to LiveReload server.

I got on one terminal :

 ~/Bureau $ livereload
Serving path . on 127.0.0.1:35729
[I 130831 09:32:15 web:1359] 200 GET /livereload.js?ext=Firefox&extver=2.0.8 (127.0.0.1) 2.95ms
[I 130831 09:32:16 web:1359] 304 GET /livereload.js?ext=Firefox&extver=2.0.8 (127.0.0.1) 2.36ms

On another :

~/Bureau $ serve
Serving HTTP on 0.0.0.0 port 8000 ...
localhost - - [31/Aug/2013 09:32:15] "GET /test.html HTTP/1.1" 200 -
localhost - - [31/Aug/2013 09:32:15] "GET /style.css HTTP/1.1" 200 -
localhost - - [31/Aug/2013 09:32:16] "GET /test.html HTTP/1.1" 200 -
localhost - - [31/Aug/2013 09:32:16] "GET /style.css HTTP/1.1" 200 -
localhost - - [31/Aug/2013 09:32:20] "GET /test.html HTTP/1.1" 200 -
localhost - - [31/Aug/2013 09:32:20] "GET /style.css HTTP/1.1" 200 -
localhost - - [31/Aug/2013 09:32:21] "GET /test.html HTTP/1.1" 200 -
localhost - - [31/Aug/2013 09:32:21] "GET /style.css HTTP/1.1" 200 -

And an extension installed firefox 23.0 / Ubuntu 12.04. from here :

http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-

If I click on the LiveReload extension button, I get the following message :

Could not connect to LiveReload server. Please make sure that a compatible LiveReload server is running. (We recommand guard-livereload, until LiveReload 2 comes to your platform.)

Editing the CSS file does not reflect changes. Reload the page does, of course.

Use/allow another name for Guardfile

The Guardfile filename clashes with what guard is using, and creates confusion.

It would be nice, if you could specify an alternate filename.

I realized that python-livereload is going in another direction currently, but as long as a file is provided to load/add tasks dynamically, this is an issue.

Unclear error when compilers are not installed.

I (stupidly) tried to get this set up to compile my less files on a fresh linux install where I'd not yet installed lessc. An OSError was raised (file not found), which I spent a while trying to debug as incorrect paths in my Guardfile. Of course, it was the operating system complaining that lessc itself was not found. A better error message would have helped me resolve this much more quickly.

Watch files without triggering a livereload

I would like to watch .scss files, and trigger a function for them, but want to only trigger a livereload for changed .css files (please notice the new livereload=False keyword argument):

for filepath in formic.FileSet(include="./htdocs/static/**/*.css"):
    server.watch(filepath)
for filepath in formic.FileSet(include="./htdocs/static/scss/*.scss"):
    server.watch(filepath, 'make sass', livereload=False)

This would allow to trigger the livereload only when the .css file changes (i.e. there is no compilation error).

pyinotify does not work if the file inode changes (i.e. when the original file is deleted and moved over)

When creating a Guardfile I have noted that if I add a task like this:

Task.add('my_directory')

everything works fine, but if I add a task like this:

Task.add('my_file.html')

when I modify the my_file.html file the livereload event does not trigger.

When looking for a solution I have tried to force the HAS_PYINOTIFY variable to False in the task.py file, and when disabling pyinotify everything works correctly, which means the problem lies somewhere either in the pyinotify integration, or in pyinotify itself, or I have some settings that prevent inotify to notify changes to single files.

I am using Fedora 19 x86_64 with kernel 3.10.10-200.fc19.x86_64 and pyinotify version 0.9.4

Broken on tornado 4.0

Not had time to investigate why yet. Error reported on console log is:
[W 140716 19:52:11 web:1811] 403 GET /livereload (127.0.0.1) 1.24ms

On browserside (chrome), it says:
WebSocket connection to 'ws://localhost.localdomain:5500/livereload' failed: Error during WebSocket handshake: Unexpected response code: 403

Downgrading to tornado 3.2.2 makes it work again.

hash.update() fails with Python3

I'm getting this error using Python3.3:

$ livereload
Serving path . on 127.0.0.1:35729
[I 130920 13:56:21 server:105] Browser Connected: http://localhost:35729/
[I 130920 13:56:21 server:112] No Guardfile
[I 130920 13:56:21 task:54] Add task: /tmp/demosite/output
[I 130920 13:56:21 server:116] Start watching changes
[E 130920 13:56:24 web:1228] Uncaught exception GET / (127.0.0.1)
    HTTPRequest(protocol='http', host='localhost:35729', method='GET', uri='/', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Language': 'es-ar,es;q=0.8,en-us;q=0.5,en;q=0.3', 'Cache-Control': 'max-age=0', 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0', 'Host': 'localhost:35729', 'Connection': 'keep-alive', 'Accept-Encoding': 'gzip, deflate', 'Cookie': '__atuvc=190%7C37%2C308%7C38', 'If-None-Match': '"f564fb0397076cb4ea165b7847bf127bf7d581e3"', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'})
    Traceback (most recent call last):
      File "/home/humitos/.virtualenvs/nikola-dev-py3/lib/python3.3/site-packages/tornado/web.py", line 1141, in _when_complete
        callback()
      File "/home/humitos/.virtualenvs/nikola-dev-py3/lib/python3.3/site-packages/tornado/web.py", line 1162, in _execute_method
        self._when_complete(method(*self.path_args, **self.path_kwargs),
      File "/home/humitos/.virtualenvs/nikola-dev-py3/lib/python3.3/site-packages/livereload/server.py", line 131, in get
        self.read_path(abspath)
      File "/home/humitos/.virtualenvs/nikola-dev-py3/lib/python3.3/site-packages/livereload/server.py", line 167, in read_path
        hasher.update(data)
    TypeError: Unicode-objects must be encoded before hashing
[E 130920 13:56:24 web:1635] 500 GET / (127.0.0.1) 5.74ms
[I 130920 13:56:24 web:1635] 200 GET /favicon.ico (127.0.0.1) 4.69ms
^CShutting down...

I'm not sure if this is a good fix, but it solves the issue:

--- server.py.bak   2013-09-20 13:31:09.552436660 -0300
+++ server.py   2013-09-20 13:31:12.872436657 -0300
@@ -164,6 +164,8 @@
                 self.write(data)

             hasher = hashlib.sha1()
+            if isinstance(data, str):
+                data = data.encode('utf8')
             hasher.update(data)
             self.set_header('Etag', '"%s"' % hasher.hexdigest())
             return

I'm using livereload==1.0.1

Issue copied from here: getnikola/nikola#736

Watch files without a connected browser

It seems like python-livereload only starts to watch files for changes if there's a browser connected.

I want to use python-livereload with a generic watch task to build scss files automatically, and there does not have to be a browser connected necessarily.

(issue #63 might be related)

Error in periodic callback

I'm trying to create a livereload to compile rst file to html.

my Guardfile is

#!/usr/bin/env python

import docutils.core
from livereload.task import Task
from livereload.compiler import rstc

Task.add('file.rst', rstc('file.rst', 'file.html'))

But when i launch server and saving my rst file, I get this error:

[E 130208 00:06:45 ioloop:504] Error in periodic callback
    Traceback (most recent call last):
      File "/Library/Python/2.7/site-packages/tornado-2.4.1-py2.7.egg/tornado/ioloop.py", line 502, in _run
        self.callback()
      File "/Library/Python/2.7/site-packages/livereload-0.14-py2.7.egg/livereload/server.py", line 51, in watch_tasks
        changes = Task.watch()
      File "/Library/Python/2.7/site-packages/livereload-0.14-py2.7.egg/livereload/task.py", line 44, in watch
        func and func()
      File "/Library/Python/2.7/site-packages/livereload-0.14-py2.7.egg/livereload/compiler.py", line 93, in __call__
        self.write(output)
      File "/Library/Python/2.7/site-packages/livereload-0.14-py2.7.egg/livereload/compiler.py", line 76, in write
        code = self.get_code()
      File "/Library/Python/2.7/site-packages/livereload-0.14-py2.7.egg/livereload/compiler.py", line 121, in get_code
        return stdout.decode()
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 474: ordinal not in range(128)

I'm new in python so I get a bit lost with that kind of error

Add support for compiling SASS stylesheets

As I see that there is support for compiling LESS stylesheet, it would be great if there was integrated support for compiling SASS stylesheets as well in compiler.py

A function that compiles SASS stylesheets can be found here:

http://pastebin.com/6a0d2AKT

Can you integrate this function into compiler.py, please?

Protocol version 8 and 9, wowsie!

Hey! I've just learned that python-livereload claims support of LiveReload protocols version 8 and 9.

Any chance you can shed some light on those? I confess I wouldn't mind supporting them as well. Also, can I borrow your time machine for just a few minutes?

Log to 'livereload' logger name instead of root logger

Hi, instead of logging to the rootLogger via

import logging
logging.info('stuff')

I think it would be better to use a named logger via:

import logging
logger = logging.getLogger(__name__)
logger.info('stuff')

This way gives the user more granular control and won't accidentally interfere with the user's settings if they had already set up their root logger. I'd be happy to provide a PR if you agree.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.