import antigravity
That will open your browser with one comics from xkcd website.
The antigravity module was added to Python 3.5.1. I'm not sure but seam working also with python 2.7 version.
Is a blog about python programming language. You can see my work with python programming language, tutorials and news.
import antigravity
class Win32_Process : CIM_Process
{
string Caption;
string CommandLine;
string CreationClassName;
datetime CreationDate;
string CSCreationClassName;
string CSName;
string Description;
string ExecutablePath;
uint16 ExecutionState;
string Handle;
uint32 HandleCount;
datetime InstallDate;
uint64 KernelModeTime;
uint32 MaximumWorkingSetSize;
uint32 MinimumWorkingSetSize;
string Name;
string OSCreationClassName;
string OSName;
uint64 OtherOperationCount;
uint64 OtherTransferCount;
uint32 PageFaults;
uint32 PageFileUsage;
uint32 ParentProcessId;
uint32 PeakPageFileUsage;
uint64 PeakVirtualSize;
uint32 PeakWorkingSetSize;
uint32 Priority = NULL;
uint64 PrivatePageCount;
uint32 ProcessId;
uint32 QuotaNonPagedPoolUsage;
uint32 QuotaPagedPoolUsage;
uint32 QuotaPeakNonPagedPoolUsage;
uint32 QuotaPeakPagedPoolUsage;
uint64 ReadOperationCount;
uint64 ReadTransferCount;
uint32 SessionId;
string Status;
datetime TerminationDate;
uint32 ThreadCount;
uint64 UserModeTime;
uint64 VirtualSize;
string WindowsVersion;
uint64 WorkingSetSize;
uint64 WriteOperationCount;
uint64 WriteTransferCount;
};
Let's make one simple example with wmi python module.import wmi
c = wmi.WMI()
for process in c.Win32_Process ():
name = process.Properties_("Name").Value
pid = process.Properties_('ProcessID').Value
parent = process.Properties_('ParentProcessId')
termination = process.Properties_('TerminationDate')
print (name,' = pid -',pid,'+', parent,'|termination_date-',termination)
And the output of this script it's :firefox.exe = pid - 13788 + 2564 |termination_date- None
explorer.exe = pid - 1048 + 772 |termination_date- None
sublime_text.exe = pid - 11404 + 2564 |termination_date- None
plugin_host.exe = pid - 7432 + 11404 |termination_date- None
cmd.exe = pid - 9568 + 2564 |termination_date- None
conhost.exe = pid - 14124 + 9568 |termination_date- None
conhost.exe = pid - 9700 + 11208 |termination_date- None
Taskmgr.exe = pid - 9424 + 13404 |termination_date- None
WmiPrvSE.exe = pid - 9764 + 772 |termination_date- None
SpfService64.exe = pid - 11908 + 684 |termination_date- None
python.exe = pid - 1308 + 9568 |termination_date- None
C:\Python34\Scripts>pip install wmi
...
Installing collected packages: wmi
Running setup.py install for wmi
warning: install_data: setup script did not provide a directory for 'readme.
txt' -- installing right in 'C:\Python34'
...
Successfully installed wmi
Cleaning up...
C:\Python34>python
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wmi
>>> remote_process = wmi.WMI (computer="home").new ("Win32_Process")
>>> for i in wmi.WMI ().Win32_OperatingSystem ():
... print (i.Caption)
...
Microsoft Windows 10 Home
import wmi
import datetime
c = wmi.WMI()
process_watcher = c.Win32_Process.watch_for("modification")
while True:
new_process = process_watcher()
print (new_process.Caption)