Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mac os x 10.9.5] rst2html failed #77

Closed
keepeye opened this issue Dec 9, 2014 · 6 comments
Closed

[mac os x 10.9.5] rst2html failed #77

keepeye opened this issue Dec 9, 2014 · 6 comments

Comments

@keepeye
Copy link

keepeye commented Dec 9, 2014

i pressed ctrl+shift+r and choosed rst2html,but it outputted nothing and no error reported.
then i modified your codes like below:

def open_result(self, outfile, target):
        if target == "html":
            os.system("open %s" % outfile)
            # webbrowser.open_new_tab(outfile)

now,it works temporarily.

@mgaitan
Copy link
Owner

mgaitan commented Dec 9, 2014

thanks xian, I'll check what's happening with this.

In a sake of completeness, what OS and Sublime version are you using?

On Tue, Dec 9, 2014 at 6:52 AM, Xian Zhao [email protected] wrote:

it outputted nothing,no error reported,so i modified your codes like below:

def open_result(self, outfile, target):
if target == "html":
os.system("open %s" % outfile)
# webbrowser.open_new_tab(outfile)

now,it work temporarily.


Reply to this email directly or view it on GitHub
#77.

mgaitan.github.io
textosypretextos.com.ar http://textosyprextextos.com.ar

@mgaitan
Copy link
Owner

mgaitan commented Dec 9, 2014

what a silly, I've just seen the subject! :D

On Tue, Dec 9, 2014 at 9:47 AM, Martín Gaitán [email protected] wrote:

thanks xian, I'll check what's happening with this.

In a sake of completeness, what OS and Sublime version are you using?

On Tue, Dec 9, 2014 at 6:52 AM, Xian Zhao [email protected]
wrote:

it outputted nothing,no error reported,so i modified your codes like
below:

def open_result(self, outfile, target):
if target == "html":
os.system("open %s" % outfile)
# webbrowser.open_new_tab(outfile)

now,it work temporarily.


Reply to this email directly or view it on GitHub
#77.

mgaitan.github.io
textosypretextos.com.ar http://textosyprextextos.com.ar

mgaitan.github.io
textosypretextos.com.ar http://textosyprextextos.com.ar

@keepeye
Copy link
Author

keepeye commented Dec 10, 2014

ha! I know how it is caused.Because my default webbrowser is Chrome. outfile must contain a scheme file:// when open a local file just like:

outfile = "file:///var/folders/86/2zqykwwd1f71bdb0d1tg20p80000gn/T/tmp28_694.html"
webbrowser.open_new_tab(outfile)

codes below do not work:

outfile = "/var/folders/86/2zqykwwd1f71bdb0d1tg20p80000gn/T/tmp28_694.html"
webbrowser.open_new_tab(outfile)

My Sublime version is 'sublime text 3 build 3065' and OS version is 'OSX 10.9.5'.

@mgaitan
Copy link
Owner

mgaitan commented Dec 10, 2014

On Tue, Dec 9, 2014 at 11:04 PM, Xian Zhao [email protected] wrote:

outfile =
"file:///var/folders/86/2zqykwwd1f71bdb0d1tg20p80000gn/T/tmp28_694.html"
webbrowser.open_new_tab(outfile)

what if we prepend "file://" no matter the browser? should it work?

@keepeye
Copy link
Author

keepeye commented Dec 11, 2014

On Tue, Dec 9, 2014 at 11:04 PM, Xian Zhao [email protected] wrote:
outfile =
"file:///var/folders/86/2zqykwwd1f71bdb0d1tg20p80000gn/T/tmp28_694.html"
webbrowser.open_new_tab(outfile)
what if we prepend "file://" no matter the browser? should it work?

At least Safiri and Chrome work well and i guess the others will be the same.

@mgaitan
Copy link
Owner

mgaitan commented Dec 11, 2014

thanks for the help @keepeye

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants