python - 在pycharm中,如何快速建立类、方法
阿神
阿神 2017-04-17 17:37:08
0
5
492

if __name__=="__main__" :

root_url = "http://baike.baidu.com/view/21087.htm"
obj_spider = SpiderMan()
obj_spider.craw(root_url)

在视频教程中,看到别人使用eclipse,在SpiderMan上ctrl+1就能弹出菜单快速新建类,建完类之后在craw()上的菜单能在SpiderMan这个类下快速新建出一个方法,请问在pychram中这些如何操作,谢谢

阿神
阿神

闭关修行中......

reply all(5)
PHPzhong

Try alt+enter in the yellow area, or shift+insert

伊谢尔伦

Generally, better IDEs have shortcut key settings. You can set the shortcut keys in pycharm to be similar to eclipse, it depends on your own habits

PHPzhong

I found it, it’s alt+enter. Is there any way to quickly set it up similar to eclipse? It’s too troublesome to change one by one

洪涛

File-Settings-Keymap
Just set the keymaps to eclipse.

PHPzhong

You should be looking at the crawler course on MOOC.com

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template