NoSuspend.py
1.0.0
https://codeberg.org/KOLANICH-libs/NoSuspend.py로 이동하여 새 버전을 다운로드하세요.
Micro$oft가 소유한 GitHub는 "더 나은 보안"이라는 위장 하에 1FA 비밀번호 사용자를 차별하는 동시에 성공에 대한 상업적 관심과 비밀번호 대체를 홍보하는 FIDO 1FA 사양 및 Windows Hello 구현의 광범위한 채택을 추구했습니다. 이는 심각한 결과를 초래할 수 있으며 경쟁적으로 용납될 수 없습니다. 그 이유를 읽어보세요.
자신에게 해를 끼치는 일에 가담하고 싶지 않다면 선례를 따라 GitHub 및 Micro$oft에서 멀리 떨어진 곳으로 마이그레이션하는 것이 좋습니다. 다음은 이를 수행할 수 있는 대안과 근거 목록입니다. 토론이 삭제되면 사본을 얻을 수 있는 잘 알려진 장소가 있습니다. GitHub를 떠나야 하는 이유도 읽어보세요.
시스템이 ACPI S1-4와 같은 절전 모드로 진입하는 것을 방지하기 위한 라이브러리입니다.
python3-dbus
와 사용된 D-Bus 인터페이스를 제공하는 일부 프로그램이 필요합니다. from NoSuspend import *
with NoSuspend ():
doLongWork ()
플랫폼에 따라 추가 인수를 제공할 수 있습니다.
Windows에서는 화면을 활성화된 상태로 유지하기 위해 추가 매개변수를 제공할 수 있습니다.
with NoSuspend(suspend=True, display=True, hidden=False, inherit=True):
doLongWork()
with NoSuspend ( suspend = True , display = False , hidden = False , appName = "MySuperApp" , reason = "doing long work..." ):
doLongWork ()
with NoSuspend () as state :
print ( state )
Windows에서는 다음을 사용하여 검색할 수 있습니다.
print ( NoSuspend . getCurrentState ())
EXECUTION_STATE.CONTINUOUS | EXECUTION_STATE.SYSTEM_REQUIRED
( suspend=True
에 해당) 예상대로입니다. 2가지 상속 모드가 있습니다: print ( NoSuspend . getCurrentState ())
with NoSuspend () as state1 :
print ( state1 , NoSuspend . getCurrentState ())
with NoSuspend ( display = True , inherit = False ) as state2 : # the default one, replaces the state
print ( state2 , NoSuspend . getCurrentState ())
print ( NoSuspend . getCurrentState ())
print ( NoSuspend . getCurrentState ())
with NoSuspend () as state1 :
print ( state1 , NoSuspend . getCurrentState ())
with NoSuspend ( EXECUTION_STATE . DISPLAY_REQUIRED , inherit = True ) as state2 : # adds flags to the state
print ( state2 , NoSuspend . getCurrentState ())
print ( NoSuspend . getCurrentState ())
콘솔 인터페이스도 사용 가능
python3 -m NoSuspend echo a
NoSuspend echo a
caffeinate echo a