inflearn logo
강의

講義

知識共有

プログラミングの始め方:Python入門(Inflearnオリジナル)

External Functions(2-2)

webbroswer 질문

362

wsdq11058761

投稿した質問数 2

0

 안녕하세요 영상에 나온대로 webbrowser 코드를 그대로 작성했으나 실행이 되질 않습니다. 근데 밑 코드에 추가로 time.sleep을 넣어주면 또 실행이 돼요. 이유가 무엇인지 궁금합니다.


import webbrowser 
webbrowser.open('https://www.naver.com/')


python

回答 2

0

niceman

안녕하세요.

이상하네요. sleep 이 없어도 실행이 되야 하는데 해당 브라우저 실행 권한이나, 다른 이유가 있는 것으로 보여요

소스상에 문제가 없으면 환경을 바꿔서 해봐야 될 것 같습니다.(다른 pc 등)

webbrowser.open(url, new=0, autoraise=True)

Display url using the default browser. If new is 0, the url is opened in the same browser window if possible. If new is 1, a new browser window is opened if possible. If new is 2, a new browser page (“tab”) is opened if possible. If autoraise is True, the window is raised if possible (note that under many window managers this will occur regardless of the setting of this variable).

Note that on some platforms, trying to open a filename using this function, may work and start the operating system’s associated program. However, this is neither supported nor portable.

Raises an auditing event webbrowser.open with argument url.

webbrowser.open_new(url)

Open url in a new window of the default browser, if possible, otherwise, open url in the only browser window.

0

wsdq11058761

추가로 전 open과 open_new의 실행결과 차이가 전혀 없는데 왜 그럴까용,,

인스턴스 변수 문의

0

29

1

챕터 03_04 (튜플) 교육자료

0

28

2

Package(3-1) Sub 폴더 자료

0

35

1

아톰 출력 안됨

0

61

2

강의자료 메일 발송 요청 드립니다.

0

71

1

강의자료 메일로 보내주실 수 있으실까요?

1

48

0

Iterable 요소는 리스트로 작성해야하는 것 맞나요?

1

73

2

강의자료 부탁드립니다

0

57

2

if Flase: print('Bad')

0

57

1

=와 == 의 차이

0

75

1

functions 함수 섭들을려고하는데요

0

66

1

강의자료 부타드리겠습니다!

0

57

0

VSCODE에 VIEW에서 SELECTED INTERPRETER조회가 안됩니다.

0

65

1

강의자료 부탁드립니다.

0

50

0

dict의 Key를 바꾸는 방법

0

61

1

강의자료부탁드립니다

0

60

1

run withount 디버깅 및 F5+ctrl이 안먹혀요

0

60

1

강의 자료와 예정 다운로드

0

72

2

객체지향 vs 함수형

0

57

1

어렵네요 설정도

0

71

1

설정이 잘 된건지

0

50

1

맥 os vscode 설정 - python interpreter select

0

99

1

강의자료 부탁드립니다. mytoughgirl@naver.com 입니다.

0

43

1

vscode로 수업 진행한 영상은 없는건가요?

0

55

2