목록빅데이터 (364)
스택큐힙리스트
이것이 결과물입니다. 이것들은 아마도 UTF-8 문자열입니다... 일부는 NoneType일 수 있지만, 이런 것들이 즉시 실패합니다, 그 앞에 있는 것보다... instr = '%s', '%s', '%d', '%s', '%s', '%s', '%s' % softname, procversion, int(percent), exe, description, company, procurl TypeError: 형식 문자열에는 충분한 인수가 없습니다. 이건 7개에 7개인데?답변 1형식 인수를 튜플에 넣어야합니다 (괄호를 추가하세요): instr = '%s', '%s', '%d', '%s', '%s', '%s', '%s' % (softname, procversion, int(percent), exe, descriptio..
만약 나에게 다음과 같은 코드가 있다면: for x in range(10): print(x) 나는 다음과 같은 출력을 받을 것이다 1 2 등등.. 나는 새로운 줄을 출력하는 대신 이전 값을 바꾸고 같은 줄에 새로운 값을 덮어 씌우고 싶습니다.답변 1간단한 버전 줄바꿈 없이 줄의 시작으로 돌아가기 위해 줄 바꿈 문자('\r')를 사용하는 한 가지 방법입니다. Python 3 for x in range(10): print(x, end='\r') print() Python 2.7 이상용으로 호환 from __future__ import print_function for x in range(10): print(x, end='\r') print() Python 2.7 for x in range(10): print..
아래 코드를 사용하여 일부 네이티브 지원 애니메이션을 수행 할 때 requestAnimationFrame을 사용합니다: var support = { animationFrame: window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame }; support.animationFrame(function() {}); //에러 support.animationFrame.call(window, function() {}); //올바름 support.animationFrame를 직..
File C:\Users\Administrator\Documents\Mibot\oops\blinkserv.py, line 82, in __init__ self.serv = socket(AF_INET,SOCK_STREAM) TypeError: 'module' object is not callable 왜 이 오류가 발생하는 걸까요? 혼란스럽습니다. 이 오류를 어떻게 해결할 수 있을까요?답변 1소켓은 소켓 클래스를 포함한 모듈입니다. socket.socket(...) 또는 from socket import socket을 해야 합니다: >>> import socket >>> socket >>> socket.socket >>> >>> from socket import socket >>> socket 이 오류 메시..