简体   繁体   English

如何创建本地保存文件的超链接评论 - PyCharm

[英]How do you create a hyperlink-comment of a locally saved file- PyCharm

Looking for something like this:寻找这样的东西:

# http://file///path/to/example.png # http://file///path/to/example.png

or或者

# http://localhost/path/to/example.pdf # http://localhost/path/to/example.pdf

Any work arounds would be much appreciated.任何解决方法将不胜感激。

Got it working.得到它的工作。 This was of great help:这很有帮助:

https://serverfault.com/a/126090 https://serverfault.com/a/126090

So I had to configure a server.所以我不得不配置一个服务器。 I'm sure there are a ton of ways of doing this, but windows comes with it's own IIS (Internet information Services).我确信有很多方法可以做到这一点,但 windows 带有它自己的 IIS(互联网信息服务)。 Also, I had to create a virtual directory to be able to browse my files.此外,我必须创建一个虚拟目录才能浏览我的文件。

And now with this as a comment in my code:现在将此作为我的代码中的注释:

# http://localhost/path/to/example.pdf # http://localhost/path/to/example.pdf

I can reference documentation with ease.我可以轻松参考文档。


Steps to setup IIS:设置 IIS 的步骤:

  1. Control Panel\Programs\Programs and Features控制面板\程序\程序和功能
  2. Select "Turn Windows features on or off" in the side bar Select 侧栏中的“打开或关闭 Windows 功能”
  3. Enable "Internet information Services"启用“互联网信息服务”
  4. Open IIS app打开 IIS 应用程序
  5. Create "website" in left panel.在左侧面板中创建“网站”。 point to "C:\inetpub\wwwroot"指向“C:\inetpub\wwwroot”
  6. Right click on new website and add virtual directory.右键单击新网站并添加虚拟目录。 point to "C:\inetpub\wwwroot"指向“C:\inetpub\wwwroot”
  7. After creation, right click on it and select "Convert to Application"创建后,右键单击它并 select “转换为应用程序”
  8. Look for "Directory Browsing" and enable it in in right side panel查找“目录浏览”并在右侧面板中启用它

CATCH : You have to work out of this - "C:\inetpub\wwwroot" directory from now on. CATCH :从现在开始,您必须解决这个问题 - “C:\inetpub\wwwroot”目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM