sitron / lst

3 stars 3 forks source link

Add feature to automatically open generated graph #3

Open sephii opened 11 years ago

sephii commented 11 years ago

It would be nice to have the new graph automatically opened in the browser by invoking x-ww-browser.

sitron commented 11 years ago

isn't x-ww-browser linux only? i could also add a dependency and use http://docs.python.org/2/library/webbrowser.html

sephii commented 11 years ago

webbrowser looks good, and you wouldn't need to add a dependency since it's in the standard library.

jeanmonod commented 11 years ago

For OSX it's easier, just do open xxx.html

sephii commented 11 years ago

The "webbrowser" from the stdlib gives a cross-platform way to do this, so I think that's the correct way to do it rather than using platform-specific methods.

jeanmonod commented 11 years ago

OK, and in the same topic, do you know a better way to edit a text file? See: https://github.com/sitron/lst/pull/13/files#L1R621

Thanks

On Tue, Sep 3, 2013 at 9:04 AM, Sylvain Fankhauser <notifications@github.com

wrote:

The "webbrowser" from the stdlib gives a cross-platform way to do this, so I think that's the correct way to do it rather than using platform-specific methods.

— Reply to this email directly or view it on GitHubhttps://github.com/sitron/lst/issues/3#issuecomment-23693395 .

David Jeanmonod david.jeanmonod@gmail.com 077 437 51 12

sephii commented 11 years ago

Feel free to use what I made for taxi: https://github.com/sephii/taxi/blob/master/taxi/utils/file.py#L14-L30