<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-682151357687327470</id><updated>2024-09-10T16:01:34.230-07:00</updated><category term="demo trace32"/><category term="open python exe"/><category term="pybluez"/><category term="pyserial port scan"/><category term="python"/><category term="python bluetooth"/><category term="python test scripts"/><category term="trace32"/><category term="bluetooth"/><category term="open exe python"/><category term="pyserial data"/><category term="pyserial port usage"/><category term="python 64 bit"/><category term="python HP"/><category term="python bluetooth script"/><category term="python bluetooth testing"/><category term="python download"/><category term="python lauterbach"/><category term="python perl"/><category term="python pyserial example script"/><category term="trace32 wrapper"/><category term="AT commands"/><category term="Android"/><category term="Pybluez AT"/><category term="Python HP QC OTA"/><category term="Python OTA Framework"/><category term="Python Quality"/><category term="Python test case list"/><category term="activesate"/><category term="attribute error"/><category term="bluetooth serial"/><category term="bluetooth serial ports"/><category term="bluetooth serial python"/><category term="bluez"/><category term="config"/><category term="configuring netassist in trace32"/><category term="escape characters in python"/><category term="how to kill process in python"/><category term="kill windows process in python"/><category term="lauterbach API"/><category term="linux"/><category term="matlab python"/><category term="matlab python library"/><category term="matlabpy"/><category term="matplot"/><category term="module"/><category term="module error"/><category term="object error"/><category term="open file in python"/><category term="padnet"/><category term="perl and python"/><category term="perl with python"/><category term="perl with python command prompt"/><category term="process end in python"/><category term="process kill windows python"/><category term="pyauto"/><category term="pybluez device scan"/><category term="pybluez inquiry"/><category term="pybluez inquiry script"/><category term="pybluez inquiry test script"/><category term="pybluez lautherbach"/><category term="pybluez trace32"/><category term="pyhton OTA QC"/><category term="pyluez"/><category term="pyseral test code"/><category term="pyserial"/><category term="pyserial communication"/><category term="pyserial lauterbah"/><category term="pyserial open port"/><category term="pyserial port"/><category term="pyserial port example script"/><category term="pyserial port in use"/><category term="pyserial port read"/><category term="pyserial read"/><category term="pyserial sample"/><category term="pyserial test"/><category term="pyserial trace32"/><category term="pyserial uart"/><category term="pyserial write"/><category term="python DUN"/><category term="python HP QC"/><category term="python OTA"/><category term="python QC"/><category term="python QTP"/><category term="python Quality Center"/><category term="python auto module"/><category term="python bluez scripting"/><category term="python change string"/><category term="python error"/><category term="python escape"/><category term="python escape character"/><category term="python exe"/><category term="python file controls"/><category term="python file operation"/><category term="python file operations"/><category term="python file parsing"/><category term="python file read mode"/><category term="python file test script"/><category term="python hp quality center"/><category term="python open"/><category term="python open file"/><category term="python os"/><category term="python path escape"/><category term="python plot"/><category term="python port scan example"/><category term="python port scan script"/><category term="python process end"/><category term="python process kill"/><category term="python pybluez"/><category term="python replace"/><category term="python replace string"/><category term="python shell"/><category term="python shell execute"/><category term="python simple test"/><category term="python string functionality"/><category term="python string replace"/><category term="python subprocess"/><category term="python test escape"/><category term="python test management"/><category term="python test scripting."/><category term="python test string"/><category term="python use"/><category term="python virtual box"/><category term="python win32api"/><category term="python windows automation"/><category term="python windows script"/><category term="python windows test script."/><category term="python windows testing"/><category term="python with hp OTA"/><category term="python with perl"/><category term="pythonshellk"/><category term="read"/><category term="script"/><category term="script error"/><category term="sdp  pybluez script"/><category term="sdp code"/><category term="sdp code for python"/><category term="sdp port"/><category term="sdp pybluez"/><category term="sdp python"/><category term="sdp script"/><category term="send AT for python."/><category term="serial baud rate"/><category term="serial data"/><category term="serial port scan"/><category term="serial read"/><category term="serial write"/><category term="trace32 Api usage"/><category term="trace32 api testing"/><category term="trace32 config"/><category term="usb serial python"/><category term="usb-serial"/><category term="usb-serial python"/><category term="use os with python"/><category term="using perl with python"/><category term="using python with perl"/><category term="virtual box"/><category term="windows process end python"/><category term="windows7"/><title type='text'>Python Test Scripts</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-8779514563673474379</id><published>2014-03-14T16:23:00.001-07:00</published><updated>2014-03-14T16:28:54.891-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="matlab python"/><category scheme="http://www.blogger.com/atom/ns#" term="matlab python library"/><category scheme="http://www.blogger.com/atom/ns#" term="matlabpy"/><category scheme="http://www.blogger.com/atom/ns#" term="matplot"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port scan"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port usage"/><category scheme="http://www.blogger.com/atom/ns#" term="python plot"/><category scheme="http://www.blogger.com/atom/ns#" term="python pyserial example script"/><category scheme="http://www.blogger.com/atom/ns#" term="read"/><title type='text'>Python libraries</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Long time no c ... :) &amp;nbsp;I know.&lt;/div&gt;
&lt;div&gt;
lets get back to business.&lt;/div&gt;
I have had interesting issues with my python scripting . thought of sharing one of them.&lt;br /&gt;
&lt;div&gt;
I was asked to create a plot for application performance comparison across multiple platforms. this turned out to be a tricky one as I hardly worked on graphs.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To my surprise, i found an easy and interesting library for this.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;matplotlib.pyplot&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
amazing tool. very user friendly. here is the link to the same with few examples.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
http://matplotlib.org/index.html&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
happy scripting :)&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/8779514563673474379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2014/03/python-libraries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/8779514563673474379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/8779514563673474379'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2014/03/python-libraries.html' title='Python libraries'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-7895005636503500939</id><published>2012-04-09T10:26:00.004-07:00</published><updated>2012-04-09T13:18:31.565-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="perl and python"/><category scheme="http://www.blogger.com/atom/ns#" term="perl with python"/><category scheme="http://www.blogger.com/atom/ns#" term="perl with python command prompt"/><category scheme="http://www.blogger.com/atom/ns#" term="python perl"/><category scheme="http://www.blogger.com/atom/ns#" term="python with perl"/><category scheme="http://www.blogger.com/atom/ns#" term="use os with python"/><category scheme="http://www.blogger.com/atom/ns#" term="using perl with python"/><category scheme="http://www.blogger.com/atom/ns#" term="using python with perl"/><title type='text'>perl with python</title><content type='html'>I am not sure how many times i have come across to a point where I had to use a perl script with python. And I realized that this could be a case for few of you guys too. thought why not put a post for this. here is a simple example of how to do it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import os&lt;br /&gt;os.system(&quot;perl ~perlfile~&quot;)&lt;br /&gt;&lt;br /&gt;you could use sys.exit() to see if the execution was a success. This is the way i am using it. could solve problems at least for a few of you guys.</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/7895005636503500939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2012/04/perl-with-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7895005636503500939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7895005636503500939'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2012/04/perl-with-python.html' title='perl with python'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-8511336056702122427</id><published>2012-04-06T12:49:00.003-07:00</published><updated>2012-04-06T12:54:14.710-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyserial read"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial write"/><category scheme="http://www.blogger.com/atom/ns#" term="serial baud rate"/><category scheme="http://www.blogger.com/atom/ns#" term="serial data"/><category scheme="http://www.blogger.com/atom/ns#" term="serial port scan"/><category scheme="http://www.blogger.com/atom/ns#" term="serial read"/><category scheme="http://www.blogger.com/atom/ns#" term="serial write"/><title type='text'>write/read to serial port</title><content type='html'>Well, when you have pyserial installed on your pc writing to serial port is fairly simple. here is the how you do it..&lt;br /&gt;&lt;br /&gt;import serial&lt;br /&gt;ser = serial.Serial(&lt;port number&gt;, &lt;baud rate&gt;,timeout=1)&lt;br /&gt;print ser.portstr&lt;br /&gt;ser.setWriteTimeout(1)&lt;br /&gt;ser.write(&quot;hello&quot; + &quot;\n&quot;)&lt;br /&gt;ser.read(9999)&lt;br /&gt;&lt;br /&gt;the above sample code best describes how to write or read from a serial port using python - pyserial library. This is not the best of the solutions available out there but def simple (probably the simplest :) ). you could do more digging into the serial library too if you would like.&lt;br /&gt;&lt;br /&gt;Like I always say happy scripting !!!</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/8511336056702122427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2012/04/writeread-to-serial-port.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/8511336056702122427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/8511336056702122427'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2012/04/writeread-to-serial-port.html' title='write/read to serial port'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-4972741174585230074</id><published>2012-04-06T12:38:00.004-07:00</published><updated>2012-04-06T12:47:21.838-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bluetooth serial"/><category scheme="http://www.blogger.com/atom/ns#" term="bluetooth serial ports"/><category scheme="http://www.blogger.com/atom/ns#" term="bluetooth serial python"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port scan"/><category scheme="http://www.blogger.com/atom/ns#" term="python port scan example"/><category scheme="http://www.blogger.com/atom/ns#" term="python port scan script"/><category scheme="http://www.blogger.com/atom/ns#" term="usb serial python"/><category scheme="http://www.blogger.com/atom/ns#" term="usb-serial"/><category scheme="http://www.blogger.com/atom/ns#" term="usb-serial python"/><title type='text'>pyserial - usb serial port scan</title><content type='html'>good to be back after a break. I have been using pyserial for performing serial automation on hardware. I faced a peculiar problem . Thought it will be a good idea to post it. I have usb-serial cable connected to pc which is bluetooth capable. Now, when i do a port scan , it also lists the serial ports from bluetooth too. this was causing problems in my script execution. so I had to modify the port scan script to take care of this problem .  the script is below ..&lt;br /&gt;&lt;br /&gt; print &quot;Checking for the Serial Port.....&quot;&lt;br /&gt;    &lt;br /&gt;    for i in range(256):&lt;br /&gt;        try:&lt;br /&gt;            ser = serial.Serial(i, 115200,timeout=1)&lt;br /&gt;            print ser.portstr&lt;br /&gt;            ser.setWriteTimeout(1)&lt;br /&gt;            ser.write(&quot;hello&quot; + &quot;\n&quot;)&lt;br /&gt;            data = ser.read(9999)&lt;br /&gt;            print data&lt;br /&gt;            ser.close()&lt;br /&gt;        except serial.SerialException:&lt;br /&gt;            print &quot;exception&quot;,sys.exc_info()[1]&lt;br /&gt;            pass&lt;br /&gt;&lt;br /&gt;Just copy this code and use it. keep in mind , the true validation can be based on the data in my script or the time it takes to respond to such a request over serial.&lt;br /&gt;&lt;br /&gt;i have also added the exception print info which could turn in handy .&lt;br /&gt;&lt;br /&gt;Happy Scripting</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/4972741174585230074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2012/04/pyserial-usb-serial-port-scan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/4972741174585230074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/4972741174585230074'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2012/04/pyserial-usb-serial-port-scan.html' title='pyserial - usb serial port scan'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-3778644662677630971</id><published>2011-12-28T13:16:00.000-08:00</published><updated>2011-12-28T13:24:44.248-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyserial data"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port example script"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port in use"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port read"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port scan"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial port usage"/><category scheme="http://www.blogger.com/atom/ns#" term="python pyserial example script"/><title type='text'>pyserial port scan</title><content type='html'>if you are using pyserial module to read the communication from your device on UART , you will have to know which port the is your system connected to.&lt;br /&gt;&lt;br /&gt;the following is a simple code to scan through all the COM ports and find out which com port is in opened. at the end of the program , you will see the serial uart that is in use being printed&lt;br /&gt;&lt;br /&gt;import pyserial&lt;br /&gt;for i in range(256):&lt;br /&gt;        try:&lt;br /&gt;            s = serial.Serial(i)&lt;br /&gt;            available.append( (i, s.portstr))&lt;br /&gt;            port = i&lt;br /&gt;            s.close()&lt;br /&gt;        except serial.SerialException:&lt;br /&gt;            pass&lt;br /&gt;&lt;br /&gt;ser = serial.Serial(port, 115200,timeout=1)&lt;br /&gt;print ser.portstr&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;happy scripting!</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/3778644662677630971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/pyserial-port-scan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/3778644662677630971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/3778644662677630971'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/pyserial-port-scan.html' title='pyserial port scan'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-6059690443862392550</id><published>2011-12-27T13:16:00.000-08:00</published><updated>2011-12-27T13:20:45.593-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="how to kill process in python"/><category scheme="http://www.blogger.com/atom/ns#" term="kill windows process in python"/><category scheme="http://www.blogger.com/atom/ns#" term="process end in python"/><category scheme="http://www.blogger.com/atom/ns#" term="process kill windows python"/><category scheme="http://www.blogger.com/atom/ns#" term="python process end"/><category scheme="http://www.blogger.com/atom/ns#" term="python process kill"/><category scheme="http://www.blogger.com/atom/ns#" term="windows process end python"/><title type='text'>Process kill</title><content type='html'>In python if we need to kill a running process we need to run the following command.&lt;br /&gt;&lt;br /&gt;import os&lt;br /&gt;os.system(&quot;taskkill /im &quot;process_name&quot; /f&quot;)&lt;br /&gt;&lt;br /&gt;just give the name of the process that is running and it should kill it. we need this kind of setup when we try to kill all the existing process before launching a one.</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/6059690443862392550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/process-kill.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/6059690443862392550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/6059690443862392550'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/process-kill.html' title='Process kill'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-1396286823904083287</id><published>2011-12-22T16:03:00.000-08:00</published><updated>2011-12-22T16:17:32.215-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="open file in python"/><category scheme="http://www.blogger.com/atom/ns#" term="python file controls"/><category scheme="http://www.blogger.com/atom/ns#" term="python file operation"/><category scheme="http://www.blogger.com/atom/ns#" term="python file operations"/><category scheme="http://www.blogger.com/atom/ns#" term="python file parsing"/><category scheme="http://www.blogger.com/atom/ns#" term="python file read mode"/><category scheme="http://www.blogger.com/atom/ns#" term="python file test script"/><category scheme="http://www.blogger.com/atom/ns#" term="python open file"/><title type='text'>Python File Operations</title><content type='html'>Alright ,it is time for python file operation related examples. there could be a variety of things that you would like to do with a file. I am sharing a simple example below.&lt;br /&gt;&lt;br /&gt;old_file= open (&quot;file_Path&quot;,&quot;r&quot;)&lt;br /&gt;new_file = open (&quot;file_Path&quot;,&quot;w&quot;)&lt;br /&gt;&lt;br /&gt;for line in old_file:&lt;br /&gt;    if &quot;&lt;text&gt;&quot;  in line:&lt;br /&gt;        new_file.write(line.replace(&quot;oldtext&quot;,&quot;newtext&quot;))&lt;br /&gt;    else:&lt;br /&gt;        new_file.write(line)&lt;br /&gt;&lt;br /&gt;In the above example we are opening a file in read and write mode and performing some basic operations. &lt;br /&gt;&lt;br /&gt;Based on a condition we are trying to replace some content in the file and writing the new thing in a different file.&lt;br /&gt;&lt;br /&gt;this code works as is , you just have to give the appropriate values. sys is the only module you will be needing.</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/1396286823904083287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/python-file-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/1396286823904083287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/1396286823904083287'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/python-file-operations.html' title='Python File Operations'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-7572628173774989189</id><published>2011-12-20T16:52:00.000-08:00</published><updated>2011-12-20T17:07:58.432-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyhton OTA QC"/><category scheme="http://www.blogger.com/atom/ns#" term="python HP"/><category scheme="http://www.blogger.com/atom/ns#" term="python HP QC"/><category scheme="http://www.blogger.com/atom/ns#" term="Python HP QC OTA"/><category scheme="http://www.blogger.com/atom/ns#" term="python hp quality center"/><category scheme="http://www.blogger.com/atom/ns#" term="python OTA"/><category scheme="http://www.blogger.com/atom/ns#" term="Python OTA Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="python with hp OTA"/><title type='text'>Python with HP Quality center</title><content type='html'>As promised, check the code below will let you connect to QC &lt;br /&gt;the below walks you through the test tree and updates the status of test cases.&lt;br /&gt;you can use this as a function can call it in python script to update.&lt;br /&gt;this was pretty useful to me , hops is the same case with you.&lt;br /&gt;&lt;br /&gt;import win32com&lt;br /&gt;from win32com.client import Dispatch&lt;br /&gt;&lt;br /&gt;qcServer = &quot;http://xxxxxxxxx/qcbin/&quot;&lt;br /&gt;qcUser = &quot;xxxxx&quot;&lt;br /&gt;qcPassword = &quot;xxxxx&quot;&lt;br /&gt;qcDomain = &quot;xxxx&quot;&lt;br /&gt;qcProject = &quot;xxxx&quot;&lt;br /&gt;&lt;br /&gt;t = win32com.client.Dispatch(&quot;TDApiOle80.TDConnection.1&quot;)&lt;br /&gt;t.InitConnectionEx(qcServer)&lt;br /&gt;t.Login(qcUser,qcPassword)&lt;br /&gt;t.Connect(qcDomain,qcProject)&lt;br /&gt;&lt;br /&gt;print &quot;Logged in&quot;&lt;br /&gt;&lt;br /&gt;mg=t.TreeManager&lt;br /&gt;npath=&quot;Root\xxxxxx&quot;&lt;br /&gt;tsFolder = t.TestSetTreeManager.NodeByPath(npath)&lt;br /&gt;print tsFolder&lt;br /&gt;tfactory=tsFolder.TestSetFactory&lt;br /&gt;td_tsff=tfactory.Filter&lt;br /&gt;td_testset=td_tsff.NewList()&lt;br /&gt;&lt;br /&gt;for otest in td_testset:&lt;br /&gt;    print otest.Name&lt;br /&gt;    td_TSTestSetFactory = otest.TSTestFactory&lt;br /&gt;    td_tstsff = td_TSTestSetFactory.NewList(&quot;&quot;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    for otestitem in td_tstsff:&lt;br /&gt;        print otestitem.Name&lt;br /&gt;        td_RunFactory = otestitem.RunFactory&lt;br /&gt;        obj_theRun = td_RunFactory.AddItem(&quot;testrun&quot;)&lt;br /&gt;        obj_theRun.Status = &quot;Passed&quot;&lt;br /&gt;        otestitem.Status= &quot;Passed&quot;&lt;br /&gt;        obj_theRun.Post()&lt;br /&gt;        print otestitem.Status&lt;br /&gt;    next&lt;br /&gt;next&lt;br /&gt;&lt;br /&gt;tsFolder = None&lt;br /&gt;tfactory = None&lt;br /&gt;td_testset = None&lt;br /&gt;td_TSTestSetFactory = None&lt;br /&gt;td_RunFactory = None&lt;br /&gt;obj_theRun = None&lt;br /&gt;t.logout&lt;br /&gt;t = None&lt;br /&gt;&lt;br /&gt;print &quot;done&quot;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/7572628173774989189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/python-with-hp-quality-center.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7572628173774989189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7572628173774989189'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/python-with-hp-quality-center.html' title='Python with HP Quality center'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-7520318609123692455</id><published>2011-12-19T13:19:00.000-08:00</published><updated>2011-12-19T13:29:20.307-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python HP"/><category scheme="http://www.blogger.com/atom/ns#" term="python QC"/><category scheme="http://www.blogger.com/atom/ns#" term="python QTP"/><category scheme="http://www.blogger.com/atom/ns#" term="Python Quality"/><category scheme="http://www.blogger.com/atom/ns#" term="python Quality Center"/><category scheme="http://www.blogger.com/atom/ns#" term="Python test case list"/><category scheme="http://www.blogger.com/atom/ns#" term="python test management"/><category scheme="http://www.blogger.com/atom/ns#" term="python test scripting."/><title type='text'>Python with Quality center</title><content type='html'>We fall back to the topic of test management . we can use all the scripting languages in the world but it boils down to the point on how will you report the status of the testing to your management . well that is true for almost every testing activity manual or automation. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I was wondering what to use , could it be a custom python script to prepare a report or off the shelf product . after going through a bunch of processes , Proof of concepts I came to a conclusion that we can write something in relatively less time but maintaining it is a problem. when I looked at any test management tool that supports python , I came across Quality Center. they have a OTA framework which makes is relatively simple to access their APIs. I spent time on it and found relatively simple to connect with the com objects. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;my suggestion , if you have access to QC in your company , give it a shot , should be simple and straight forward for you to use. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I will be posting how to connect to QC from a python script pretty soon.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/7520318609123692455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/python-with-quality-center.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7520318609123692455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7520318609123692455'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/python-with-quality-center.html' title='Python with Quality center'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-2531224732177724195</id><published>2011-12-06T11:35:00.000-08:00</published><updated>2011-12-06T11:44:28.332-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyauto"/><category scheme="http://www.blogger.com/atom/ns#" term="python auto module"/><category scheme="http://www.blogger.com/atom/ns#" term="python windows automation"/><category scheme="http://www.blogger.com/atom/ns#" term="python windows script"/><category scheme="http://www.blogger.com/atom/ns#" term="python windows test script."/><category scheme="http://www.blogger.com/atom/ns#" term="python windows testing"/><title type='text'>PyAuto</title><content type='html'>Today , i wanted to share about a module that you can use for testing windows application.&lt;div&gt;you reach a point where , you will have to use windows based application testing and you will run after tools which support them , the good thing about python is it has a pyauto module which you can use for the same . This module helps us running all the ui related tests . you might question &quot;what is the advantage?&quot; the answer is if you are truly comparing it with any ui automation tool  &quot;Nothing&quot; . having said that , we all reach a point where , we will have to use scripting language across the board and you will have to have multiple tools being used. python has it all , so be it ui , embedded or application , this does it all !&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;so before you choose , give it a thought :)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/2531224732177724195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/pyauto.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/2531224732177724195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/2531224732177724195'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/pyauto.html' title='PyAuto'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-538797271581993928</id><published>2011-12-02T18:13:00.000-08:00</published><updated>2011-12-02T18:22:43.792-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="escape characters in python"/><category scheme="http://www.blogger.com/atom/ns#" term="python escape"/><category scheme="http://www.blogger.com/atom/ns#" term="python escape character"/><category scheme="http://www.blogger.com/atom/ns#" term="python path escape"/><category scheme="http://www.blogger.com/atom/ns#" term="python simple test"/><category scheme="http://www.blogger.com/atom/ns#" term="python test escape"/><category scheme="http://www.blogger.com/atom/ns#" term="python test scripts"/><category scheme="http://www.blogger.com/atom/ns#" term="python use"/><title type='text'>Escape characters python</title><content type='html'>The one place everybody who starts scripting gets stuck is escape characters . this is about the point where you will have to give either a absolute or relative path from where you will have to open a file , exe etc. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;one aspect which i was particularly glad about in python is , python has a inbuilt function to do this (kewl right! ) &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;re.escape(string) &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example : print re.escape(&quot;www.example.com&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;www\\.example\\.com is your ouput&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/538797271581993928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/escape-characters-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/538797271581993928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/538797271581993928'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/12/escape-characters-python.html' title='Escape characters python'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-265257251308186351</id><published>2011-11-30T17:09:00.000-08:00</published><updated>2011-11-30T17:17:46.384-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="open python exe"/><category scheme="http://www.blogger.com/atom/ns#" term="python 64 bit"/><category scheme="http://www.blogger.com/atom/ns#" term="python change string"/><category scheme="http://www.blogger.com/atom/ns#" term="python replace"/><category scheme="http://www.blogger.com/atom/ns#" term="python replace string"/><category scheme="http://www.blogger.com/atom/ns#" term="python string functionality"/><category scheme="http://www.blogger.com/atom/ns#" term="python string replace"/><category scheme="http://www.blogger.com/atom/ns#" term="python test string"/><title type='text'>Python String replace</title><content type='html'>I came across a point where the incoming user string had to be replaced with something i desire . Considering the simplicity of the activity i expected python to have some user defined function . might be a simple thing , but really useful...&lt;br /&gt;&lt;br /&gt;replace( old , new, [max count]).&lt;br /&gt;if you have the below&lt;br /&gt;Code : &lt;br /&gt;sample = &quot;this is a test string&quot;&lt;br /&gt;print sample.replace(&quot;test&quot; , &quot;long test&quot;)&lt;br /&gt;the result will look like this&lt;br /&gt;&quot;this is a long test string&quot;&lt;br /&gt;you dont have to import any library in specific.&lt;br /&gt;the &quot;max&quot; from the syntax constitutes to the number of times the string has to be replaced.</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/265257251308186351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/python-string-replace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/265257251308186351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/265257251308186351'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/python-string-replace.html' title='Python String replace'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-7343836632173250301</id><published>2011-11-29T11:00:00.000-08:00</published><updated>2011-11-29T11:05:46.229-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="open exe python"/><category scheme="http://www.blogger.com/atom/ns#" term="open python exe"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez device scan"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez inquiry"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez inquiry script"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez inquiry test script"/><category scheme="http://www.blogger.com/atom/ns#" term="python bluetooth"/><category scheme="http://www.blogger.com/atom/ns#" term="python bluetooth testing"/><title type='text'>Scan for bluetooth devices using python</title><content type='html'>scan for bluetooth devices using a python script. the below script can be used for performing the same. remember , you will have to install pybluez module (it is available for both windows and linux). now for the script , here you go!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;import bluetooth&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;print &quot;performing inquiry...&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;nearby_devices = bluetooth.discover_devices(lookup_names = True)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;print &quot;found %d devices&quot; % len(nearby_devices)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for addr, name in nearby_devices:&lt;/div&gt;&lt;div&gt;    print &quot;  %s - %s&quot; % (addr, name)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;this will print the number of devices , address and name . this can be used as  test script for a variety for reasons .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/7343836632173250301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/scan-for-bluetooth-devices-using-python.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7343836632173250301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7343836632173250301'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/scan-for-bluetooth-devices-using-python.html' title='Scan for bluetooth devices using python'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-7578340370122325069</id><published>2011-11-08T11:14:00.000-08:00</published><updated>2011-11-08T11:19:50.090-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="open exe python"/><category scheme="http://www.blogger.com/atom/ns#" term="open python exe"/><category scheme="http://www.blogger.com/atom/ns#" term="python exe"/><category scheme="http://www.blogger.com/atom/ns#" term="python open"/><category scheme="http://www.blogger.com/atom/ns#" term="python os"/><category scheme="http://www.blogger.com/atom/ns#" term="python shell"/><category scheme="http://www.blogger.com/atom/ns#" term="python shell execute"/><category scheme="http://www.blogger.com/atom/ns#" term="python subprocess"/><category scheme="http://www.blogger.com/atom/ns#" term="python win32api"/><category scheme="http://www.blogger.com/atom/ns#" term="pythonshellk"/><title type='text'>Open EXE with Python</title><content type='html'>I guess we all reach a point in our scripting space when we end up with opening an exe file from the script. Well , here the code for it . just replace the contents with the values you desire&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;import subprocess&lt;/div&gt;&lt;div&gt;import os&lt;/div&gt;&lt;div&gt;from win32api import ShellExecute&lt;/div&gt;&lt;div&gt;ShellExecute(0, &quot;open&quot;,&quot;C:\\XXXX\\XXXX.exe&quot;,&quot;&quot; , &quot;C:\\XXX&quot;, 1)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There might be other ways of doing it , but i believe this one is simple enough for you to try.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/7578340370122325069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/open-exe-with-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7578340370122325069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7578340370122325069'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/open-exe-with-python.html' title='Open EXE with Python'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-7223228456359278812</id><published>2011-11-07T14:51:00.000-08:00</published><updated>2011-11-07T15:25:04.197-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="AT commands"/><category scheme="http://www.blogger.com/atom/ns#" term="padnet"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez"/><category scheme="http://www.blogger.com/atom/ns#" term="Pybluez AT"/><category scheme="http://www.blogger.com/atom/ns#" term="python DUN"/><category scheme="http://www.blogger.com/atom/ns#" term="python virtual box"/><category scheme="http://www.blogger.com/atom/ns#" term="send AT for python."/><category scheme="http://www.blogger.com/atom/ns#" term="virtual box"/><title type='text'>AT Commands Python</title><content type='html'>You can send AT commands to phone when connected to pc via the below progaram . i was able send the commands successfully. Remember most of the phones will have the DUN port open , if you don&#39;t connect the machine to a Linux box and run hciconfig command to see the configurations. if you dont have a linux box , just use a virtual box application and download ubuntu which is free of cost&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;in the case of a android phone , i made use of an application called padNEt 3.02 which helps you turn on the DUN port. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;you can use the below mentioned code to send AT commands over bluetooth too. identify the appropriate profile and sent id accordingly.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#!/usr/bin/env python&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# ATsend.py&lt;/div&gt;&lt;div&gt;# &lt;/div&gt;&lt;div&gt;# Turn the phone bluetooth off and on each time you&lt;/div&gt;&lt;div&gt;# send the At commands to free up the DUN port&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# Requires Pybluez from Google&lt;/div&gt;&lt;div&gt;# http://pybluez.googlecode.com&lt;/div&gt;&lt;div&gt;# PyBluez works on GNU/Linux and Windows XP (Microsoft and Widcomm Bluetooth stacks)&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# Send At commands to mobile device via DUN&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# Some code to show how to dial a number with&lt;/div&gt;&lt;div&gt;# AT commands also shown below&lt;/div&gt;&lt;div&gt;# &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import sys&lt;/div&gt;&lt;div&gt;import bluetooth&lt;/div&gt;&lt;div&gt;from bluetooth import * #Pybluez http://pybluez.googlecode.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;deviceName = []&lt;/div&gt;&lt;div&gt;deviceAddress = None&lt;/div&gt;&lt;div&gt;foundDevices = bluetooth.discover_devices()&lt;/div&gt;&lt;div&gt;if len(foundDevices) == 0:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;No Bluetooth device found&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;exit(0)&lt;/div&gt;&lt;div&gt;count = 0&lt;/div&gt;&lt;div&gt;while count == 0:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;for bdaddr in foundDevices:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;deviceName.append(bluetooth.lookup_name( bdaddr ))&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;deviceAddress = bdaddr&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot;%2d %-16s Address: %s&quot; % (count +1, deviceName[count], deviceAddress) &lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;count += 1 &lt;/div&gt;&lt;div&gt;choice = raw_input(&quot;Choose Device or 0 to repeat scan&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Repeat scan to get more device names&lt;/div&gt;&lt;div&gt;if (choice.isdigit() and int(choice) &amp;lt;= len(foundDevices)):&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;count = int(choice) &lt;/div&gt;&lt;div&gt;else:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Invalid Choice - Please rerun the program&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;exit(0)&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;choice = raw_input(&quot;Choose Device or 0 to repeat scan&quot;)&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;if (choice.isdigit() and int(choice) &amp;lt;= len(foundDevices)):&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;count = int(choice)&lt;/div&gt;&lt;div&gt;#if choice == 0:&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;while count == 0:&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;for bdaddr in foundDevices:&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;deviceName.append(bluetooth.lookup_name( bdaddr ))&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;deviceAddress = bdaddr&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot;%2d %-16s Address: %s&quot; % (count +1, deviceName[count], deviceAddress) &lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;count += 1 &lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;choice = raw_input(&quot;Choose Device or 0 to repeat scan&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;selected = deviceName[count -1]&lt;/div&gt;&lt;div&gt;deviceAddress = foundDevices[count -1]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if deviceAddress is not None:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Identifying the services for the selected devices .....&quot;&lt;/div&gt;&lt;div&gt;else:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Could not find a Bluetooth device&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;exit(0)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;services = bluetooth.find_service(address=deviceAddress)&lt;/div&gt;&lt;div&gt;devicename = bluetooth.lookup_name(deviceAddress, timeout=10)&lt;/div&gt;&lt;div&gt;showProfiles = None&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if len(services) &amp;gt; 0:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Found %d services on %s\n&quot; % (len(services), deviceAddress)&lt;/div&gt;&lt;div&gt;# &lt;/div&gt;&lt;div&gt;else:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;No device found at address: %s&quot; % deviceAddress&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Did you turn on bluetooth?&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Did you accept/authorize the connection?&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;sys.exit(3)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;dunPort = 0 # Not found yet &lt;/div&gt;&lt;div&gt;# Get Service Details&lt;/div&gt;&lt;div&gt;# global showProfiles&lt;/div&gt;&lt;div&gt;showProfiles = raw_input(&quot;Show Bluetooth Profiles supported? y|n&quot;)&lt;/div&gt;&lt;div&gt;for svc in services:&lt;/div&gt;&lt;div&gt;# Look for DUN port&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;if svc[&quot;name&quot;] == &quot;Dial-up networking (DUN)&quot;:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;dunPort = svc[&quot;port&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;if showProfiles == &quot;y&quot;:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot;BT Profile: %s&quot; % svc[&quot;name&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot; Host: %s&quot; % svc[&quot;host&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot; Description: %s&quot; % svc[&quot;description&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot; Provided By: %s&quot; % svc[&quot;provider&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot; Protocol: %s&quot; % svc[&quot;protocol&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot; channel/PSM: %s&quot; % svc[&quot;port&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot; svc classes: %s &quot;% svc[&quot;service-classes&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot; profiles: %s &quot;% svc[&quot;profiles&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print &quot; service id: %s &quot;% svc[&quot;service-id&quot;]&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;print&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if dunPort != 0:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Found Dial-Up Networking port = %d\n&quot; % (dunPort)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;#s = bluetooth.BluetoothSocket(bluetooth.RFCOMM)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;#conn = s.connect((deviceAddress, dunPort))&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;sock=BluetoothSocket( RFCOMM )&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;sock.connect((&quot;78:47:1D:B6:01:B2&quot;, dunPort))&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;socket connected&quot;&lt;/div&gt;&lt;div&gt;# A semicolon &quot;;&quot; at the of the number dialed&lt;/div&gt;&lt;div&gt;# is necessary to make a voice call&lt;/div&gt;&lt;div&gt;# with out the &quot;;&quot; this command will try to&lt;/div&gt;&lt;div&gt;# make a data call&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Example to Dial a number using AT command&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;#s.send(&#39;AT#QAS\r&#39;),&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# This next section has to expect the correct number of returns&lt;/div&gt;&lt;div&gt;# The first command &quot;ATE1&quot; gets a single &quot;OK&quot; response with a carrage return&lt;/div&gt;&lt;div&gt;# The next commands expects 2 lines returned.&lt;/div&gt;&lt;div&gt;# Each line return ends with \r&lt;/div&gt;&lt;div&gt;# The correct send/expect sequence must be followedd or you will get&lt;/div&gt;&lt;div&gt;# a hang or no response.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#s.send(&quot;ATE1\r&quot;)&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;s.send(&quot;AT\r&quot;)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print s.recv(1024)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#s.send(&quot;AT+CMGF=1\r&quot;)&lt;/div&gt;&lt;div&gt;#print s.recv(1024)&lt;/div&gt;&lt;div&gt;#print s.recv(1024)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#s.send(&#39;AT+CMGS=&quot;0784XXXXXXX&quot;\r&#39;)&lt;/div&gt;&lt;div&gt;#print s.recv(1024)&lt;/div&gt;&lt;div&gt;#s.send(&quot;This is freds test!&quot;+chr(26))&lt;/div&gt;&lt;div&gt;#print s.recv(1024)&lt;/div&gt;&lt;div&gt;#print s.recv(1024)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#s.send(&quot;AT+GMI\r&quot;)&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#s.send(&quot;AT+CGMI\r&quot;)&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#s.send(&quot;AT+GMM\r&quot;)&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#s.send(&quot;AT+CGMM\r&quot;)&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;#print s.recv(1024),&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;s.close&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;sys.exit(0) &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;else :&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Could not find Dial Up Networking port.&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Or DUN port is busy.&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;print &quot;Switch the target&#39;s Bluetooth off then on and retry&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;sys.exit(4)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/7223228456359278812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/at-commands-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7223228456359278812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7223228456359278812'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/at-commands-python.html' title='AT Commands Python'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-44232931338815071</id><published>2011-11-04T11:18:00.000-07:00</published><updated>2011-11-04T11:23:14.479-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyluez"/><category scheme="http://www.blogger.com/atom/ns#" term="sdp  pybluez script"/><category scheme="http://www.blogger.com/atom/ns#" term="sdp code"/><category scheme="http://www.blogger.com/atom/ns#" term="sdp code for python"/><category scheme="http://www.blogger.com/atom/ns#" term="sdp port"/><category scheme="http://www.blogger.com/atom/ns#" term="sdp pybluez"/><category scheme="http://www.blogger.com/atom/ns#" term="sdp python"/><category scheme="http://www.blogger.com/atom/ns#" term="sdp script"/><title type='text'>pylbuez SDP</title><content type='html'>&lt;div&gt;We have seen that Bluetooth devices can locate other nearby devices, those that are in discovery mode. Rather than connecting by the address and port of a device and application, devices can discover the address and port by the service names.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The following version performs the same function but using SDP. On the server-side, the primary use of SDP to advertise the helloService as a serial port or RFCOMM protocols.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The client first finds a list of devices that provide the helloService (in reality, more than just helloService is returned). The list is then searched for the helloService, when found, the associated host address and port are used to connect to the service.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Client Code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;from bluetooth import *&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;services=find_service(name=&quot;helloService&quot;, &lt;/div&gt;&lt;div&gt;                            uuid=SERIAL_PORT_CLASS)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for i in range(len(services)):&lt;/div&gt;&lt;div&gt;   match=services[i]&lt;/div&gt;&lt;div&gt;   if(match[&quot;name&quot;]==&quot;helloService&quot;):&lt;/div&gt;&lt;div&gt;      port=match[&quot;port&quot;]&lt;/div&gt;&lt;div&gt;      name=match[&quot;name&quot;]&lt;/div&gt;&lt;div&gt;      host=match[&quot;host&quot;]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;      print name, port, host&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;      client_socket=BluetoothSocket( RFCOMM )&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;      client_socket.connect((host, port))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;      client_socket.send(&quot;Hello world&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;      client_socket.close()&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;      break&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Server Code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import bluetooth&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;server_sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM )&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;server_sock.bind((&quot;&quot;,bluetooth.PORT_ANY))&lt;/div&gt;&lt;div&gt;server_sock.listen(1)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;bluetooth.advertise_service(server_sock, &quot;helloService&quot;,&lt;/div&gt;&lt;div&gt;                     service_classes=[bluetooth.SERIAL_PORT_CLASS],&lt;/div&gt;&lt;div&gt;                     profiles=[bluetooth.SERIAL_PORT_PROFILE])&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;client_sock, address = server_sock.accept()&lt;/div&gt;&lt;div&gt;print &quot;Accepted connection from &quot;,address&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;data = client_sock.recv(1024)&lt;/div&gt;&lt;div&gt;print &quot;received [%s]&quot; % data&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;client_sock.close()&lt;/div&gt;&lt;div&gt;server_sock.close()&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/44232931338815071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/pylbuez-sdp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/44232931338815071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/44232931338815071'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/pylbuez-sdp.html' title='pylbuez SDP'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-7504409264561350180</id><published>2011-11-03T10:59:00.000-07:00</published><updated>2011-11-03T12:25:03.644-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bluetooth"/><category scheme="http://www.blogger.com/atom/ns#" term="bluez"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez lautherbach"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="python bluetooth"/><category scheme="http://www.blogger.com/atom/ns#" term="python bluetooth script"/><category scheme="http://www.blogger.com/atom/ns#" term="python bluez scripting"/><category scheme="http://www.blogger.com/atom/ns#" term="python pybluez"/><title type='text'>pybluez bluetooth inquiry</title><content type='html'>In my yesterday&#39;s blog i was talking about pyserial module . today&#39;s post i wanted to share a test code for pybluez module which is a python wrapper around the Bluetooth stack. in this sample code below , we will perform a inquiry of all the Bluetooth devices nearby and list them.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;from bluetooth import *&lt;/div&gt;&lt;div&gt;print &quot;performing inquiry...&quot;&lt;/div&gt;&lt;div&gt;nearby_devices = discover_devices(lookup_names = True)&lt;/div&gt;&lt;div&gt;print &quot;found %d devices&quot; % len(nearby_devices)&lt;/div&gt;&lt;div&gt;for name, addr in nearby_devices:&lt;/div&gt;&lt;div&gt;     print &quot; %s - %s&quot; % (addr, name)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;don&#39;t forget to download the pybluez module before you try this. this will be an important step.&lt;/div&gt;&lt;div&gt;you will end up getting errors that the bluetooth module is not available if you try to run the program as is.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;happy testing!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/7504409264561350180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/pybluez-bluetooth-inquiry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7504409264561350180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7504409264561350180'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/pybluez-bluetooth-inquiry.html' title='pybluez bluetooth inquiry'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-307804327866311760</id><published>2011-11-02T15:52:00.000-07:00</published><updated>2011-11-02T16:18:32.068-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyseral test code"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial communication"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial data"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial lauterbah"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial open port"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial sample"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial test"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="pyserial uart"/><title type='text'>pyserial</title><content type='html'>pyserial module is really useful . i have been using it for perfroming uart related communication.&lt;br /&gt;there a lot of sites which provides this pyserial downloads.&lt;br /&gt;import serial&lt;br /&gt;ser = serial.Serial(0) # open serial port&lt;br /&gt;print ser.portstr # prints the used port&lt;br /&gt;ser.write(&quot;hello&quot;) # write a string&lt;br /&gt;ser.close()&lt;br /&gt;you can use the above code as a test program for performing a pyserial communication from windows.</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/307804327866311760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/pyserial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/307804327866311760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/307804327866311760'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/11/pyserial.html' title='pyserial'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-6685471830601884763</id><published>2011-10-28T17:25:00.000-07:00</published><updated>2011-10-28T17:49:15.134-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="config"/><category scheme="http://www.blogger.com/atom/ns#" term="configuring netassist in trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="demo trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="python lauterbach"/><category scheme="http://www.blogger.com/atom/ns#" term="python perl"/><category scheme="http://www.blogger.com/atom/ns#" term="trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="trace32 config"/><title type='text'>Trace32 API Config</title><content type='html'>like i posted in my previous blog , we need to have the application up and running . i will detail out the ways of configuring now . once you install the trace on your machine you will notice a c:/t32 folder listed ( if you choose to install it else where , find the t32 folder on your machine) . when you launch the trace32marm.exe it generally picks up the configuration from config file (categorized as t32 file ) . open the file ( any ide is fine or even a notepad ) and enter the below value .&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;RCL=NETASSIST&lt;/div&gt;&lt;div&gt;PACKLEN=1024&lt;/div&gt;&lt;div&gt;PORT=xxxx&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;you can choose to provide any port number available on your computer . this runs a udp port on your computer , you can check the list of open ports to see if it did pick the correct configuration.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;this will be the port number that you will have to use to open a port from scripting language. this will open up the trace32 for subsequent actions&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/6685471830601884763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/10/trace32-api-config.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/6685471830601884763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/6685471830601884763'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/10/trace32-api-config.html' title='Trace32 API Config'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-3351847458584988260</id><published>2011-10-27T15:37:00.000-07:00</published><updated>2011-10-27T16:03:40.770-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="demo trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="lauterbach API"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="trace32 api testing"/><category scheme="http://www.blogger.com/atom/ns#" term="trace32 Api usage"/><category scheme="http://www.blogger.com/atom/ns#" term="trace32 wrapper"/><title type='text'>Trace32 API</title><content type='html'>with Trace32 lauterbach provides a bunch of APIs . These APIs dont provide access to Trace32 directly , rather , it provides access to the trace32 User interface ( i know what you are thinking :)).&lt;div&gt;So , this means that for you to access the trace32 Hardware , you will have to have the trace32 software open on the system . The config file of the trace installation folder is the key . i will share some more code and inputs shortly&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/3351847458584988260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/10/trace32-api.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/3351847458584988260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/3351847458584988260'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/10/trace32-api.html' title='Trace32 API'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-3299368410465534423</id><published>2011-07-15T22:33:00.000-07:00</published><updated>2011-07-15T22:41:52.761-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="demo trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="python lauterbach"/><category scheme="http://www.blogger.com/atom/ns#" term="trace32"/><category scheme="http://www.blogger.com/atom/ns#" term="trace32 wrapper"/><title type='text'>Python - lauterbach</title><content type='html'>it is interesting to notice that with lauterbach you dont get a wrapper for scripting languages.&lt;div&gt;i am not saying that they will have to :) , but i would assume from a testing standpoint it will be great to have a scripting language interface to the same.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lauterbach - trace32 is a really powerful tool . i am going to start using python scrpiting language with latuerbach. fortunately they provide a trace32 api that i can use.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;we will have to see how things go by :) . atleast the idea for now when i am writing this blog is , you dont have python wrapper for lauterbach and i am trying to findout what we can do about it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/3299368410465534423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/python-lauterbach.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/3299368410465534423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/3299368410465534423'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/python-lauterbach.html' title='Python - lauterbach'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-7085870896290177787</id><published>2011-07-13T18:27:00.000-07:00</published><updated>2011-07-13T18:34:35.680-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bluetooth"/><category scheme="http://www.blogger.com/atom/ns#" term="pybluez"/><category scheme="http://www.blogger.com/atom/ns#" term="python bluetooth"/><category scheme="http://www.blogger.com/atom/ns#" term="python bluetooth script"/><category scheme="http://www.blogger.com/atom/ns#" term="python bluetooth testing"/><title type='text'>pybluez - bluetooth</title><content type='html'>For all who have been using python or who wanted to use python,&lt;br /&gt;we can access RFCOMM profile via pybluez.&lt;br /&gt;pybluez is the software supplied at code.google.com is a python wraper for bluetooth testing.&lt;br /&gt;for now all the profiles are not supported ( read bluetooth related books/ postings for you to understand what profiles mean) . it supports only RFCOMM and L2CAP.&lt;br /&gt;you can download it from the below.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://code.google.com/p/pybluez&quot;&gt;http://code.google.com/p/pybluez&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/7085870896290177787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/pybluez-bluetooth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7085870896290177787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/7085870896290177787'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/pybluez-bluetooth.html' title='pybluez - bluetooth'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-495859905603992395</id><published>2011-07-11T12:41:00.000-07:00</published><updated>2011-07-11T12:48:17.060-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="attribute error"/><category scheme="http://www.blogger.com/atom/ns#" term="module"/><category scheme="http://www.blogger.com/atom/ns#" term="module error"/><category scheme="http://www.blogger.com/atom/ns#" term="object error"/><category scheme="http://www.blogger.com/atom/ns#" term="python error"/><category scheme="http://www.blogger.com/atom/ns#" term="script error"/><title type='text'>Python: AttributeError: &#39;module&#39; object has no attribute</title><content type='html'>if you are getting the AttributeError: &#39; Module&#39; object has no attribute do the following.&lt;br /&gt;&lt;br /&gt;1. don&#39;t give the same name to your python script as that of library that you have imported.&lt;br /&gt;python will import your script file instead of the orginal librarby file.&lt;br /&gt;2. check the import file definition (if you are using a ide, just right click and say go to definiton )&lt;br /&gt;to see if it has the attribute that you are trying to use . in simple , just do a ctrl-f and search the parameter that you are looking for.</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/495859905603992395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/python-attributeerror-module-object-has.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/495859905603992395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/495859905603992395'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/python-attributeerror-module-object-has.html' title='Python: AttributeError: &#39;module&#39; object has no attribute'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-4006293871081701369</id><published>2011-07-09T12:35:00.002-07:00</published><updated>2011-07-09T12:52:15.791-07:00</updated><title type='text'>Active state python</title><content type='html'>There are quite a few sites where python downloads are available. &lt;div&gt;one such is activestate  python. you can download the different versions/releases of python . be sure you are downloading the version that suits your operating system and needs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.activestate.com/activepython/downloads&quot;&gt;http://www.activestate.com/activepython/downloads&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;brief note : active state supplies executable for lot of scripting languages. the above url is for python.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, if you are first time user of python , i strongly recommend using one of the editors for python. i have used activate state python komodo ide ( trial version) . looks powerful and simple.&lt;/div&gt;&lt;div&gt;it supports a lot of scripting languages too. i have also used editplus , pythonwin, eclipse too.&lt;/div&gt;&lt;div&gt;i don&#39;t have a preference , it just helps you find flaws with your syntax and easy to check the definitions for the files that you are importing .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.activestate.com/komodo-ide&quot;&gt;http://www.activestate.com/komodo-ide&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if you want more information about other ide just drop me a email. i will reply.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note : i have windows7 (64 bit) and python64 bit did not go well with it , so just download 32 bit python , it works for both 64 bit and 32 bit operating systems as well.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/4006293871081701369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/active-state-python_09.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/4006293871081701369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/4006293871081701369'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/active-state-python_09.html' title='Active state python'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-682151357687327470.post-5352059399229139288</id><published>2011-07-09T12:35:00.001-07:00</published><updated>2011-07-09T12:49:50.350-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="activesate"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="python 64 bit"/><category scheme="http://www.blogger.com/atom/ns#" term="python download"/><category scheme="http://www.blogger.com/atom/ns#" term="python test scripts"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="windows7"/><title type='text'>Active state python</title><content type='html'>There are quite a few sites where python downloads available. &lt;div&gt;one such is activestate  python. you can download the different versions of python available for download. be sure you are downloading the version that suits your operating system and needs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.activestate.com/activepython/downloads&quot;&gt;http://www.activestate.com/activepython/downloads&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;brief note : active state supplies executable for lot of scripting languages. the above url is for python.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, if you are first time user of python , i strongly recommend using one of the editors for python. i have used activate state python komodo ide ( trial version) . looks powerful and simple.&lt;/div&gt;&lt;div&gt;it supports a lot of scripting languages too. i have also used editplus , pythonwin, eclipse too.&lt;/div&gt;&lt;div&gt;i don&#39;t have a preference , it just helps you find flaws with your syntax and easy to check the definitions for the files that you are importing .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.activestate.com/komodo-ide&quot;&gt;http://www.activestate.com/komodo-ide&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if you want more information about other ide just drop me a email. i will reply.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note : i have windows7 (64 bit) and python64 bit did not go well with it , so just download 32 bit python , it works for both 64 bit and 32 bit operating systems as well.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythontestscripts.blogspot.com/feeds/5352059399229139288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/active-state-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/5352059399229139288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/682151357687327470/posts/default/5352059399229139288'/><link rel='alternate' type='text/html' href='http://pythontestscripts.blogspot.com/2011/07/active-state-python.html' title='Active state python'/><author><name>Sg</name><uri>http://www.blogger.com/profile/16074860148583358565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>