Popular recipes tagged "python_scripts"http://code.activestate.com/recipes/tags/python_scripts/2015-07-29T18:28:25-07:00ActiveState Code RecipesPython script to login to a website and convert required html page to pdf (Python)
2015-07-29T18:28:25-07:00Emil george jameshttp://code.activestate.com/recipes/users/4191910/http://code.activestate.com/recipes/579081-python-script-to-login-to-a-website-and-convert-re/
<p style="color: grey">
Python
recipe 579081
by <a href="/recipes/users/4191910/">Emil george james</a>
(<a href="/recipes/tags/bs4/">bs4</a>, <a href="/recipes/tags/pyhon/">pyhon</a>, <a href="/recipes/tags/pyqt4/">pyqt4</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>, <a href="/recipes/tags/urllib2/">urllib2</a>).
</p>
<p>This login script will allow you to login a website with python. After logging in, You now have access to all the pages for “members only” accessed with python and it can convert the required pages to pdf format save automatically in your /home/.</p>
<p>In this script i use anna university official website to get the exam result after that it convert the result page into pdf format and save to /home/.</p>
<p>Modules used :</p>
<ol>
<li><p>urllib2</p></li>
<li><p>BeautifulSoup(bs4)</p></li>
<li><p>requests</p></li>
<li><p>sys</p></li>
<li><p>PyQt4</p></li>
</ol>
<p><a href="https://emilgeorgejames.wordpress.com/2015/07/15/python-script-to-login-to-a-website-and-convert-required-html-page-to-pdf/" rel="nofollow">https://emilgeorgejames.wordpress.com/2015/07/15/python-script-to-login-to-a-website-and-convert-required-html-page-to-pdf/</a></p>
Music Downloader (Python)
2013-05-25T06:52:51-07:00Christian Careagahttp://code.activestate.com/recipes/users/4186639/http://code.activestate.com/recipes/578530-music-downloader/
<p style="color: grey">
Python
recipe 578530
by <a href="/recipes/users/4186639/">Christian Careaga</a>
(<a href="/recipes/tags/download/">download</a>, <a href="/recipes/tags/downloader/">downloader</a>, <a href="/recipes/tags/music/">music</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>, <a href="/recipes/tags/selenium/">selenium</a>, <a href="/recipes/tags/urllib/">urllib</a>, <a href="/recipes/tags/urllib2/">urllib2</a>).
</p>
<p>A Python Program i wrote that downloads music from the web</p>
A small python script to detect .net framwork versions installed on your local windows machine (Python)
2012-05-23T15:33:13-07:00Yong Zhaohttp://code.activestate.com/recipes/users/4182173/http://code.activestate.com/recipes/578143-a-small-python-script-to-detect-net-framwork-versi/
<p style="color: grey">
Python
recipe 578143
by <a href="/recipes/users/4182173/">Yong Zhao</a>
(<a href="/recipes/tags/dotnet/">dotnet</a>, <a href="/recipes/tags/framework/">framework</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>, <a href="/recipes/tags/windows_registry/">windows_registry</a>, <a href="/recipes/tags/_winreg/">_winreg</a>).
</p>
<p>This small script uses the _winreg module to find out the .net framwork versions installed on your local machine. tested using IronPython 2.7.1.</p>
Universal eval to string function (Python)
2011-02-24T10:17:32-08:00Jakub Jankiewiczhttp://code.activestate.com/recipes/users/4028109/http://code.activestate.com/recipes/577585-universal-eval-to-string-function/
<p style="color: grey">
Python
recipe 577585
by <a href="/recipes/users/4028109/">Jakub Jankiewicz</a>
(<a href="/recipes/tags/evaluation/">evaluation</a>, <a href="/recipes/tags/exec/">exec</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>).
</p>
<p>This is a function that evaluate all expressions and statements and return the result as a string. It also return Exceptions as strings. It is used in <a href="http://trypython.jcubic.pl">trypython.jcubic.pl</a></p>
Terminal directory changer (GUI) (Python)
2010-10-21T18:58:04-07:00Anton Vredegoorhttp://code.activestate.com/recipes/users/2667360/http://code.activestate.com/recipes/577435-terminal-directory-changer-gui/
<p style="color: grey">
Python
recipe 577435
by <a href="/recipes/users/2667360/">Anton Vredegoor</a>
(<a href="/recipes/tags/cd/">cd</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>, <a href="/recipes/tags/terminal/">terminal</a>, <a href="/recipes/tags/utility/">utility</a>).
Revision 2.
</p>
<p>Start this script from a terminal to change the terminal itself to a new directory, using a graphical tree view.</p>
sending gmail though python code (Python)
2013-03-23T10:01:02-07:00Raghuramhttp://code.activestate.com/recipes/users/4174757/http://code.activestate.com/recipes/577371-sending-gmail-though-python-code/
<p style="color: grey">
Python
recipe 577371
by <a href="/recipes/users/4174757/">Raghuram</a>
(<a href="/recipes/tags/python_scripts/">python_scripts</a>).
Revision 2.
</p>
<p>sending gmail though your python code</p>
Python Program for Windows domain based machines to collect usefull information (admins- software installed) (Python)
2009-07-16T06:49:00-07:00mgarrana Garranahttp://code.activestate.com/recipes/users/4171135/http://code.activestate.com/recipes/576844-python-program-for-windows-domain-based-machines-t/
<p style="color: grey">
Python
recipe 576844
by <a href="/recipes/users/4171135/">mgarrana Garrana</a>
(<a href="/recipes/tags/group_policy_startup_script/">group_policy_startup_script</a>, <a href="/recipes/tags/know_local_administrators_domain_machines/">know_local_administrators_domain_machines</a>, <a href="/recipes/tags/microsoft_inventory_collection/">microsoft_inventory_collection</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>, <a href="/recipes/tags/software_inventory_domain_machines/">software_inventory_domain_machines</a>).
</p>
<p>this is a python program Python Program for Windows domain based machines to collect usefull information , this can be very customizable to the type of information you'd want to collect.
you can force it to run on all machines using group policy, and each machine would create a file in a specific folder ( for simplicity here , no need to go to a database at this level) with the machine name , and containing such information
for example , this program collects local administrators on the machine( can be very usefull in security assesments or securing the corporate ) , a list of all the software installed on the machine
also other general information like machine name ,current logged on user , system time at script run time and domain that this machine belongs to</p>
<p>i've ran it in practice and i was really amazed by the result , that i couldn't find with any other tool
once you get the idea ... you can go wild with your dreams and do anything you like
i've also written a backend parser which parses the results and prints out a report with the required results
this program needs python for win32 installed
the program uses windows registery , win32 api
if you will run this software by group policy , you don't have to install python and python for windows extenstions onto each clinet machine
there is a tool called py2exe which magically , complies the code into and exe and DLL files , that you can run the exe by group policy as a startup script
please excuse the qualtiy of the code , as i am not a programmer , i am sys admin</p>