Saravanan666/pypi-org huggingface dataset:
Package: win-pos
A tiny Python utility library used to get the bounds of an application window.Theget_window_posfunction takes either a string, or a callable
where the first argument is a string and that returns a boolean.As an example, we'll get the position of Discord. As Discord's window title
can vary depending on what server and channel you're in, we'll take advantage
of the expected callable and pass a lambda to see if the window ends with'Discord'.fromWinPosimportget_window_posget_window_pos(lambdatitle:title.endswith('Discord'))# (619, 473, 1624, 716)Not all windows are as complicated as Discord, fortunately. If the window you're
trying to get the position of is static and never changes, you can simply pass
a string through and get your value.fromWinPosimportget_window_posget_window_pos('Task Manager')# (125, 117, 895, 726)If for whatever reason you need to repeatedly get the position of the same window,
you can importget_window_hwndandget_window_pos_from_hwndfunctions. This will
save some time from not having to iterate over every application to check the title.fromWinPosimportget_window_hwnd,get_window_pos_from_hwndhwnd=get_window_hwnd('Task Manager')get_window_pos_from_hwnd(hwnd)# (125, 117, 895, 726)
Package: win-precise-time
win-precise-timeThe documentation is availablehere.Table of ContentsDescriptionInstallationUsageTestBuildLicenseDescriptionOn Windows the builtintime.time()provides a timestamp with ~15ms resolution.
This package provides the functionwin_precise_time.time()to retrieve an accurate timestamp by usingGetSystemTimePreciseAsFileTime.
The function is implemented as a C extension so the performance is equal to the builtintime.perf_counter()(both functions rely onQueryPerformanceCounter).The functionwin_precise_time.sleep()reimplements the more precisetime.sleep()version of CPython >= 3.11 for older python versions.
This enables sub-millisecond sleep precision without increasing the Windows timer resolution viatimeBeginPeriod.Installationpip install win-precise-timeUsage>>> import win_precise_time as wpt
>>> wpt.time()  # retrieve current time
1654539449.4548845
>>> wpt.sleep(0.001)  # sleep for 1msTestpip install toxtoxBuildpip install buildpython -m build .Licensewin-precise-timeis distributed under the terms of theMITlicense.
Package: winprefetch
This module is for parsing Windows Prefetch files.Build StatusInstallationTo install winprefetch, simply:$ pip install winprefetchor using easy_install:$ easy_install winprefetchor from source:$ python setup.py installGetting Started>>>importwinprefetchMore InformationFree software: BSD license, see LICENSE.txt for detailsDocumentation:https://winprefetch.readthedocs.org.Code licensed under the BSD license. See LICENSE.txt
file for terms.
Package: winproxy
From time to time it is necessary to change the systems proxy settings. This
can be due to network changes or to test software with internet access on
different proxies or proxy settings. However, always walking through the
Windows system dialog and manually changing the settings is a tedious task.Therefore, this small python project enables the quick change of the proxy
settings either programmatically by using the provided module functions, or
from the command line, by calling the command line scripts, that are part of
this project as well.The Command Line Tool[TODO: Description]To turn on the proxy call> winproxy onfrom the command prompt and to turn off the proxy run> winproxy offfrom the command prompt. You may want to display the current proxy settings by> winproxy viewIf you do have man proxy exceptions (overrides), you can limit the number of
proxy exceptions displayed with the -n option:> winproxy view -n 5    # Display only the first 5 exceptions> winproxy view -n 0    # Don’t display proxy exceptions at allThe Python API[TODO: API Description]Change Log0.3.0a1Added a first draft of the set commandThe winproxy view command was broken if
* no overrides were set at all
* less overrides were set, than should be shown at mostThe override list may contain not only ‘;’ separated proxies, but also ‘,’
separated ones. This may even be mixed. Also, there may be whitespace in the
Text. This all is now corrected for, i.e., setting override through the
ProxySettings API will always normalize the string to ‘;’ delimited proxies.Missing registry values fall back to sensible defaults0.2.0a1Added the “winproxy cpl” to the command line to open the Windows Internet
Settings dialogAdded a change log to the README0.1.0a1Basic ProxySettings class for the Python APICommand line with “winproxy on|off|view” to
* turn the proxy on
* turn the proxy off
* display the current proxy settingsAuthorsAndre Alexander Bell <winproxy@andre-bell.de>
Package: win-pyxs
win-pyxsA python implementation of the Xenstore protocol for Windows using either theWinPVorGPLPVdrivers.StatusVery unfinished and not working yet. This is a work in progress and will be added to as and when I have the time.BackgroundInspired by the work ofselectelandJKDingwallthis project takes the work done by JKDingwall and splits it out into a separate module which is compatible with the latest version of pyxs.
Package: winregal
“Use the Windows Registry like a king”A Modern Python wrapper for the Windows Registry (wrapping winreg)Python Windows Registry ModuleAccess Registry like a dictInstallpip install winregalUsageUse winregal.RegKey along with the ‘with’ statement to access any key of your choice.
winregal handles key opening and closing for you and makes iteration really simple.Get a Key hierarchy with all values as a dictionaryExample : Print Putty sessionsIn[2]:fromwinregalimportRegKeyIn[3]:withRegKey("HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Sessions")askey:...print(key.to_dict())...{'Server1: {'UserName': u'user', 'HostName': u'192.168.48.131', ... },'Server2':{'UserName':u'user','HostName':u'192.168.48.132',...}}Iterate over Key hierarchy handling only valuesExample : Print most recently run commands(RunMru)In[1]:withRegKey("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU")askey:...foriteminkey:...ifisinstance(item,RegValue):...print(item.name,item.data)...('a',u'cmd\\1')('b',u'winword\\1')('c',u'notepad\\1')('d',u'control\\1')('e',u'regedit\\1')('f',u'calc\\1')('j',u'notepad++\\1')Directly access a value / keyIn[10]: with RegKey(“HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerRunMRU”) as key:
…     print(key[‘a’].data)
…
cmd1Next in module DevelopmentSupport ConnectRegistry (via RegKey.__init__)Wrap Edit/Save/Delete operations: e.g. CreateKey, DeleteKey, DeleteValue, SetValue, SaveKeyContact me (py@bitweis.com) if you need these anytime soon.
Package: winregistry
winregistryMinimalist Python library aimed at working with Windows Registry.InstallationpipinstallwinregistryUsagefromwinregistryimportWinRegistryTEST_REG_PATH=r"HKLM\SOFTWARE\_REMOVE_ME_"if__name__=="__main__":withWinRegistry()asclient:client.create_key(TEST_REG_PATH)client.write_entry(TEST_REG_PATH,"remove_me","test")test_entry=client.read_entry(TEST_REG_PATH,"remove_me")asserttest_entry.value=="test"client.delete_entry(TEST_REG_PATH,"remove_me")Usage withRobot Testing FrameworkLibrary*** Settings ***
Library    winregistry.robot

*** Test Cases ***
Valid Login
        ${path} =    Set Variable    HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run
        Write Registry Entry    ${path}             Notepad   notepad.exe
        ${autorun} =            Read Registry Key   ${path}
        Delete Registry Entry   ${path}             Notepad
Package: winreglib
A Pathlib style object oriented interface to the Windows RegistryExamples:from winreglib import RegPath
# enumerate keys
p=RegPath(r'HKLM\Software')
for k in p.subkeys():
    print(k.name)

# set a value (creates keys and values as required)
new_path=(p/'winreglib')
new_path.value('test').set('apples')
Package: winregmgr
winregmgrHelper library that allows to read/write from/to Windows Registry via simplified syntax of Python contextmanager.Install:$pipinstallwinregmgrUsage Samples:fromwinregmgrimportOpenKeyimportwinreg# for accessing constants# Read parameter from Registry:withOpenKey(winreg.HKEY_CURRENT_USER,r"SOFTWARE\ODBC\ODBC.INI\MS Access Database\\")asreg_key:value=reg_key.get_value("Driver")# If parameter is read only - optional access type has to be explicitly set:withOpenKey(winreg.HKEY_LOCAL_MACHINE,"Read Only Path",access=winreg.KEY_READ)asreg_key:value=reg_key.get_value("Driver")# Read all parameters under given path into dictionarywithOpenKey(winreg.HKEY_LOCAL_MACHINE,r"SOFTWARE\\")asreg_key:values=reg_key.get_values()# Write Parameter if path does not exist - creates itwithOpenKey(winreg.HKEY_LOCAL_MACHINE,r"SOFTWARE\\")asreg_key:reg_key.set_value("Parameter","Its value")# Delete ParameterwithOpenKey(winreg.HKEY_CURRENT_USER,r"PATH\TO\PARAMETER\\")asreg_key:reg_key.delete_value("Parameter")
Package: winreg_unicode
The winreg_unicode package is a drop-in replacement for Python 2’s_winregmodule.  However, it returns unicode values where possible,
similar to Python 3’swinregmodule.To illustrate the need for the winreg_unicode package, suppose an
application must query the registry to discover a filename and the
registry contains the string “međuresorna.txt”.  Python 2’s_winregmodule will return “meduresorna.txt” instead, which is not the actual
name of the file.The winreg_unicode package does not yet contain all of_winreg’s
functions.  In particular, functions that write to the registry are
not yet included.  Code contributions are welcome.The following functionsareincluded in winreg_unicode:OpenKeyQueryInfoKeyEnumValueEnumKeyQueryValueExRelevant linksBug trackerSource code
Package: winremote
# WinRemoteThis package is primarily a library which helps you remotely manage yourwindows machine. Secondly it's command line tool to manage windows machineremotely. The command line tool calls directly specific module. Modules arevery easily extensible. You can write your own and use it from command lineimmediately, only specifying its name and module function.For example this command:```bash$ winremote --username=Administrator --password=****** --ip=10.0.0.1 services get WinRM{'Name': 'WinRM', 'StartMode': 'Auto', 'State': 'Running'}```Equals to this python code:```pythonimport pprintimport winrmfrom winremote import winremotefrom winremote.modules import servicessession = winrm.Session(target='10.0.0.1', auth=('Administrator', '******'))pprint.pprint(services.get(winremote.Windows(session, winremote.WMI(session)),'WinRM'))```This package uses [pywinrm](https://pypi.python.org/pypi/pywinrm/),so please follow its readme to setup your windows machine to work via WinRM.
Package: winrichnotify
Windows Rich Notifications for Python (winrichnotify)An easy-to-use Python library for displaying notifications for Windows 10 and Windows 11.Installationpip install winrichnotifyBuild SetupInstallPoetryNavigate to the root directory of the project and runpoetry install. This will install the dependencies for the projectRunpoetry buildto generate built releases of the library.ExamplefromwinrichnotifyimportWindowsNotifiernotifier=WindowsNotifier()notifier.notify("This is an example notification!","With an example title!",icon_path="custom.ico",duration=10)notifier.notify("Another notification!","With yet another title!",icon_path=None,duration=5,threaded=True)# Wait for the threaded notification to finishwhilenotifier.is_notification_active():time.sleep(0.1)ContributingContributions are very welcome! To find a list of current contributors gohereLicenseThis project is protected under the MIT license, available in the LICENSE file.
Package: winrmcp
winrmcpA Python library to execute remote commands on Windows (cmd.exe and PowerShell), and to transfer files.This is a thin wrapper on top of excellentpywinrm.For file transfer, we use the same method as in Go packagewinrmcp.InstallationpipinstallwinrmcpQuick startfromwinrmcpimportClientclient=Client('my-windows-machine.com',auth=('CleverUser','cleverPassword'))withclient.shell()asshell:out,_=shell.check_cmd(['ipconfig','/all'])print(out)script="""$strComputer = $HostClear$RAM = WmiObject Win32_ComputerSystem$MB = 1048576"Installed Memory: " + [int]($RAM.TotalPhysicalMemory /$MB) + " MB" """out,_=shell.check_ps(script)print(out)client.copy('/home/mike/temp/build.bat','%TEMP%\\build.bat')withclient.shell()asshell:shell.check_call('cmd.exe','/k','%TEMP%\\build.bat)APIClientClientextendswinrm.Sessionto provideClient.shellcontext-manager that opens remote shell.See documentaiotn  ofpywinrmfor the expected parameters.Client.shell()- creates a new context-managed shell, returns intsance ofShell.Client.copy(local_file, remote_file)- copies the content of local filelocal_fileto the remote machine asremote_file.
Note thatlocal_filecan be a file-like object, havingreadmethod returningbytes.ShellShellrepresent the shell running on the remote Windows machine. You can get an instance of this class by
callingshell()on aClientinstance.Shell.cmd(command, *args)- runs a command in remoteCMD.EXEshell. Returnswinrm.Responseinstance, see docs there.Shell.ps(script)- runs a script in remotePowerShellshell. Returnswinrm.Responseinstance, see docs there.Shell.check_cmd(command, *args)- runs a command in remoteCMD.EXEshell. Returns a tuple of stdout and stderr strings. If remote command
return non-zero code, raisesShellCommandErrorexception.Shell.check_ps(script)- runs a script in remotePowerShellshell. Returns a tuple of stdout and stderr strings. If remote command
return non-zero code, raisesShellCommandErrorexception.
Package: winrmmanager
A project to create winrm sessions via python utilizing the pywinrm libraryDocumentation:FeaturesReturn a winrm session in order of most secure to least secure.TodoCertificate authentication across winrm currently not supportedHistory0.1 (2018-07-06)First release1.0.0 (17-10-2018)Ported the template part to python 3.7 and dropped support for python 2.71.0.1 (15-01-2019)Updated requests module1.1.0 (28-08-2020)bumped pywinrm
Package: win-roboco-py
win-roboco-pyA thin python wrapper around Window'sRobocopyutility.This package is not intended to cover 100% of Robocopy's functionality.
Instead, the focus of the package is allow you to easily take advantage of Robocopy's robustness for the most common operations.ContributionsPull requests or issue tickets are very welcome and appreciated.Quick Usageimportwin_roboco_pyasrobo# Copies the file to the destination, with the same filename.robo.copy_file(Path('./src/file.txt'),Path('./dst'))# Copies the file to the destination, then deletes the source file.robo.move_file(Path('./src/file.txt'),Path('./dst'))# Copies all files to the destination.robo.copy_directory(Path('./src'),Path('./dst'),recursive=True)# Copies all files to the destination, then deletes the sources.robo.move_directory(Path('./src'),Path('./dst'),recursive=False)# Copies all files to the destination, and deletes extra files.robo.mirror_directory(Path('./src'),Path('./dst'))
Package: winrt
Python/WinRTThe Windows Runtime Python Projection (Python/WinRT) enables Python developers to accessWindows Runtime APIsdirectly from Python in a natural
and familiar way.Getting StartedPrerequisitesWindows 10, October 2018 Update or later.Python for Windows, version 3.7 or laterpip, version 19 or laterInstallingPython/WinRT can be installed from thePython Package Indexvia pip. Assuming
pip is on the path, Python/WinRT can be installed from the command line with the following command:>pipinstallwinrtYou can test that Python/WinRT is installed correctly by launching Python and running the following
snippet of Python code. It should print "https://github.com/Microsoft/xlang/tree/master/src/tool/python"
to the console.importwinrt.windows.foundationaswfu=wf.Uri("https://github.com/")u2=u.combine_uri("Microsoft/xlang/tree/master/src/tool/python")print(str(u2))For more information on accessing Windows Runtime APIs from Python, please visitPython/WinRT's homepage.For an end-to-end sample of using Python/WinRT, please see theWinML Tutorialin the samples folder of the xlang GitHub repo.
Package: winrtocr
Multiprocessing library for OCR with WinRTpip install winrtocrTested against Windows 10 / Python 3.10 / AnacondaThe results are not as good as the ones from Tesseract or EasyOCR, but it is way faster.fromwinrtocrimportWinRTocrfromtimeimportperf_counterfroma_cv_imwrite_imread_plusimportopen_image_in_cvwinrto=WinRTocr(cpus=5,language="en-US")picslinks=[r"https://github.com/hansalemaos/screenshots/raw/main/pandsnesteddicthtml.png",r"https://github.com/hansalemaos/screenshots/raw/main/cv2_putTrueTypeText_000000.png",r"https://github.com/hansalemaos/screenshots/raw/main/cv2_putTrueTypeText_000008.png",r"https://github.com/hansalemaos/screenshots/raw/main/cv2_putTrueTypeText_000017.png",]picsunique=[open_image_in_cv(x,channels_in_output=4)forxinpicslinks]pics=[]for_inrange(100):pics.extend(picsunique)start=perf_counter()dfa=winrto.get_ocr_df(pics)print(f"Multi:{perf_counter()-start}")dfa2=winrto.get_ocr_df_and_pics(pics)
Package: winrtqrabber
winrtqrabberA QRcode webcam scanner for win10 only (no opencv, no pyzbar).
There are many tutorials available that explain how to scan a barcode using your webcam with python.
They all make use of opencv for camera access and pyzbar for decoding the barcode, but windows10 has all these capabilities built-in, and I wanted to use these, assuming this would lead to a cleaner/better (?) solution.This package makes use of the python bindings for winrt (https://pypi.org/project/winrt/), which allows using the "Universal Windows Platform" API directly. For Barcode specific info:https://docs.microsoft.com/en-us/uwp/api/windows.devices.pointofservice.barcodescanner?view=winrt-19041Installationpip install winrtqrabberDemoClone the repo or copy thedemo.pyandrequirements.txtfile.From inside a virtual environment install the requirements:pip install -r requirements.txtRun the demo:python demp.py
Package: winrt-sdk
winrt-sdkThis package provides PyWinRT header files for the Windows SDK.This package is a build time dependency, not a runtime dependency.Example use in apyproject.tomlfile:[build-system]requires=["setuptools","setuptools-scm","winrt-sdk"]build-backend="setuptools.build_meta"Then in yoursetup.py:fromsetuptoolsimportsetupfromwinrt_sdkimportget_include_dirssetup(...include_dirs=get_include_dirs())For the runtime package, usewinrt-runtimeand the various namespace packages
instead.
Package: winrt-WindowsAppSDK
winrt-WindowsAppSDKThis package provides PyWinRT header files for WindowsAppSDK.This package is a build time dependency, not a runtime dependency.Example use in apyproject.tomlfile:[build-system]requires=["setuptools","setuptools-scm","winrt-sdk","winrt-WindowsAppSDK"]build-backend="setuptools.build_meta"Then in yoursetup.py:fromsetuptoolsimportsetupfromwinrt_sdkimportget_include_dirssetup(...include_dirs=get_include_dirs())For the runtime package, usewinrt-runtimeand the various namespace packages
instead.
Package: winsay
winsaySay command in windowssay -h
usage: say [-h] [-i INPUT] [text [text ...]]

Say in windows

positional arguments:
  text                  sentence to speak

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Text File to speakBack StoryRead the backstory for this projecthereInstallpip install winsayDemo
Package: winscppasswdextractor
WinSCP Password ExtractorWinSCP stores ssh session passwords in an encoded format in either the registry or a config file called WinSCP.ini.This python script searches in the WinSCP default locations to extract stored credentials for the current user, when executed locally on the target. If a WinSCP.ini config file is already present the script can decode stored credentials as seen below. To gather WinSCP credentials from a remote target or a range of targets there is a module present for the pentesting ToolCrackMapExeccalled "winscp_dump".These default locations are:registry%APPDATA%\WinSCP.ini%USER%\Documents\WinSCP.iniInstallationWinSCPPasswdExtractor is available on pypi.org. Therefore it is recommended to install this tool with pipx:pipxinstallWinSCPPasswdExtractorAlternatively you could install it with pip or simply download the file and run it.UsageYou can either specify a file path if you know the exact path to an existing WinSCP.ini file or you let the tool itself look if any credentials are stored in the default locations.With pipx:WinSCPPasswdExtractorWinSCPPasswdExtractor<path-to-winscp-file>Manually downloaded:pythonWinSCPPasswdExtractor.pypythonWinSCPPasswdExtractor.py<path-to-winscp-file>AboutThis Tool is based on the work ofwinscppasswd, the ruby winscp parser fromMetasploit-Frameworkand the awesome work fromwinscppassword.They did the hard stuff
Package: winsdk
Python Windows SDKPython bindings for the Windows SDK.This is a community-supported version of the unmaintainedwinrtpackage.InstallationThis package is distributed on PyPI as thewinsdkpackage.# use your favorite environment manager
poetry add winsdk
pipenv install winsdk
pip install winsdkDocumentationhttps://python-winsdk.readthedocs.io/en/latest/
Package: winsdk-toast
winsdk_toastA simple package for displaying Windows Toast Notification based onwinsdk.Sometimes, after starting my data processing python script, I may surf the Internet.
It chokes my happiness that to frequently check whether the script stops,
or suddenly realize the script has stopped for a long while.It'll be reassuring that the script can stop with a friendly gesture.Featureswinsdk_toast can pop up Windows Toast Notifications that containTextImageInputTextSelectionAudioBuit-inCustomProgressStillLiveGroupEventMinimal Examplefromwinsdk_toastimportNotifier,Toastnotifier=Notifier('程序名 applicationId')toast=Toast()toast.add_text('第一行 1st line')notifier.show(toast)More examples and documents are on the way.
Package: winshell
The winshell module is a light wrapper around the Windows shell functionality.It includes convenience functions for accessing special folders, for using
the shell’s file copy, rename & delete functionality, and a certain amount
of support for structured storage.winshell is tested on all versions of Python from 2.4 to 3.2 (2.5+ for context
management).Code is hosted at:https://github.com/tjguk/winshellDocs are hosted at:http://winshell.readthedocs.org/
Package: winshlex
WinshlexAlternative to shlex for easy split of windows path. Inspired by astack overflow post.Python package for multi-platform variant of shlex.split() for command-line splitting.
For use with subprocess, for argv injection etc. Using fast REGEX.Build with: Python 3.7.2InstallationIn your terminal executepip install -i https://test.pypi.org/simple/ winshlexUsageOn windows with shlex>>> import shlex 

>>> to_split = "C:\Users\samsung\Desktop\Dev2\package-winshlex"

>>> shlex.split()

>>> ['C:UserssamsungDesktopDev2package-winshlex']On windows with winshlex>>> import winshlex 

>>> to_split = "C:\Users\samsung\Desktop\Dev2\package-winshlex"

>>> winshlex.split()

>>> ['C:\\Users\\samsung\\Desktop\\Dev2\\package-winshlex']