<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Python Tutorial Archives - Indian AI Production</title>
	<atom:link href="https://indianaiproduction.com/python-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>https://indianaiproduction.com/python-tutorial/</link>
	<description>Artificial Intelligence Education Free for Everyone</description>
	<lastBuildDate>Sat, 02 Oct 2021 06:12:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2019/06/Channel-logo-in-circle-473-x-472-px.png?fit=32%2C32&#038;ssl=1</url>
	<title>Python Tutorial Archives - Indian AI Production</title>
	<link>https://indianaiproduction.com/python-tutorial/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">163118462</site>	<item>
		<title>Copy Single or Multiple Files in Seconds Using Python</title>
		<link>https://indianaiproduction.com/copy-single-or-multiple-files-using-python/</link>
					<comments>https://indianaiproduction.com/copy-single-or-multiple-files-using-python/#respond</comments>
		
		<dc:creator><![CDATA[Indian AI Production]]></dc:creator>
		<pubDate>Sat, 02 Oct 2021 06:12:50 +0000</pubDate>
				<category><![CDATA[Python Tutorial]]></category>
		<guid isPermaLink="false">https://indianaiproduction.com/?p=1839</guid>

					<description><![CDATA[<p>In this tutorial, we are going to learn how to copy single or multiple files in a second using the Python shutil library. File extension is any like &#8216;.jpg&#8217;, &#8216;png&#8217;, &#8216;.txt&#8217;. Syntax: shutil.copy(source_file_path, destination_file_path) IInstall Python Shutil Library Enter below command in python environment Import Libraries Copy Single File Copy Multiple Files at once</p>
<p>The post <a rel="nofollow" href="https://indianaiproduction.com/copy-single-or-multiple-files-using-python/">Copy Single or Multiple Files in Seconds Using Python</a> appeared first on <a rel="nofollow" href="https://indianaiproduction.com">Indian AI Production</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this tutorial, we are going to learn how to copy single or multiple files in a second using the <strong>Python shutil library</strong>. File extension is any like &#8216;.jpg&#8217;, &#8216;png&#8217;, &#8216;.txt&#8217;.</p>



<p><strong>Syntax:</strong> <strong><em>shutil.copy(source_file_path, destination_file_path)</em></strong></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="1024" height="576" src="https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/10/copy-files-using-Python.jpg?resize=1024%2C576&#038;ssl=1" alt="" class="wp-image-1841" srcset="https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/10/copy-files-using-Python.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/10/copy-files-using-Python.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/10/copy-files-using-Python.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/10/copy-files-using-Python.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/10/copy-files-using-Python.jpg?w=1920&amp;ssl=1 1920w" sizes="(max-width: 1024px) 100vw, 1024px" data-recalc-dims="1" /></figure></div>



<h3 class="wp-block-heading">IInstall Python Shutil Library</h3>



<p>Enter below command in python environment</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
pip install pytest-shutil
</pre></div>


<h3 class="wp-block-heading">Import Libraries</h3>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
import shutil # copy the file
import glob # get the path of files
</pre></div>


<h3 class="wp-block-heading">Copy Single File</h3>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
img_path = r&quot;C:\Users\kashz\AI Life\AI Projects - IAIP, PTs (Web + Channel)\02 OpenCV\000 opencv tutorial\data\pexels-harsh-raj-gond-1485031.jpg&quot;
dest_img_path = r&quot;C:\Users\kashz\AI Life\AI Projects - IAIP, PTs (Web + Channel)\02 OpenCV\000 opencv tutorial\data\copy\pexels-harsh-raj-gond-1485031.jpg&quot;

shutil.copy(img_path, dest_img_path) # copyt the file
</pre></div>


<h3 class="wp-block-heading">Copy Multiple Files at once</h3>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
dir_path = r&quot;C:\Users\kashz\AI Life\AI Projects - IAIP, PTs (Web + Channel)\02 OpenCV\000 opencv tutorial\data&quot;

img_paths = glob.glob(dir_path + &quot;\\*.jpg&quot;)

dest_img_dir_path = r&quot;C:\Users\kashz\AI Life\AI Projects - IAIP, PTs (Web + Channel)\02 OpenCV\000 opencv tutorial\data\copy&quot;

for img_path in img_paths:
    img_name = img_path.split(&quot;&quot;&quot;\\&quot;&quot;&quot;)&#x5B;-1]
    img_dest_full_path = dest_img_dir_path + &quot;&quot;&quot;\\&quot;&quot;&quot; + img_name
    shutil.copy(img_path, img_dest_full_path) ## copyt the file
</pre></div><p>The post <a rel="nofollow" href="https://indianaiproduction.com/copy-single-or-multiple-files-using-python/">Copy Single or Multiple Files in Seconds Using Python</a> appeared first on <a rel="nofollow" href="https://indianaiproduction.com">Indian AI Production</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://indianaiproduction.com/copy-single-or-multiple-files-using-python/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1839</post-id>	</item>
		<item>
		<title>How print colorful text in Python &#124; Python Tutorial</title>
		<link>https://indianaiproduction.com/print-colorful-text-in-python/</link>
					<comments>https://indianaiproduction.com/print-colorful-text-in-python/#comments</comments>
		
		<dc:creator><![CDATA[Indian AI Production]]></dc:creator>
		<pubDate>Thu, 03 Jun 2021 03:52:38 +0000</pubDate>
				<category><![CDATA[Python Tutorial]]></category>
		<guid isPermaLink="false">https://indianaiproduction.com/?p=1777</guid>

					<description><![CDATA[<p>In Python Tutorial in Hindi, We will Learn how print colorful text in Python using TermColor Library. In this video tutorial going to cover: How do you type in color text? What Colour is a string in Python? How do you change text color in idle Python? What are the colors in python? How do &#8230;</p>
<p class="read-more"> <a class="" href="https://indianaiproduction.com/print-colorful-text-in-python/"> <span class="screen-reader-text">How print colorful text in Python &#124; Python Tutorial</span> Read More &#187;</a></p>
<p>The post <a rel="nofollow" href="https://indianaiproduction.com/print-colorful-text-in-python/">How print colorful text in Python | Python Tutorial</a> appeared first on <a rel="nofollow" href="https://indianaiproduction.com">Indian AI Production</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In Python Tutorial in Hindi, We will Learn how print colorful text in Python using TermColor Library.</p>



<p>In this video tutorial going to cover:</p>



<ol type="1"><li>How do you type in color text?<strong></strong></li><li>What Colour is a string in Python?<strong></strong></li><li>How do you change text color in idle Python?<strong></strong></li><li>What are the colors in python?</li><li>How do you make text bold in Python?</li></ol>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="1024" height="576" src="https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/06/text-color.jpg?resize=1024%2C576&#038;ssl=1" alt="" class="wp-image-1778" srcset="https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/06/text-color.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/06/text-color.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/06/text-color.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/06/text-color.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/indianaiproduction.com/wp-content/uploads/2021/06/text-color.jpg?w=1920&amp;ssl=1 1920w" sizes="(max-width: 1024px) 100vw, 1024px" data-recalc-dims="1" /></figure></div>



<p><strong>Termcolor&nbsp;</strong>: ANSII Color formatting for output in terminal.</p>



<h2 class="wp-block-heading">Termcolor Installation</h2>



<p><strong>$ pip install termcolor</strong></p>



<h2 class="wp-block-heading">Text Properties</h2>



<p>Text colors:</p>



<ul><li>grey</li><li>red</li><li>green</li><li>yellow</li><li>blue</li><li>magenta</li><li>cyan</li><li>white</li></ul>



<p>Text highlights:</p>



<ul><li>on_grey</li><li>on_red</li><li>on_green</li><li>on_yellow</li><li>on_blue</li><li>on_magenta</li><li>on_cyan</li><li>on_white</li></ul>



<p>Attributes:</p>



<ul><li>bold</li><li>dark</li><li>underline</li><li>blink</li><li>reverse</li><li>concealed</li></ul>



<h2 class="wp-block-heading">Terminal properties</h2>



<figure class="wp-block-table"><table><tbody><tr><td>Terminal</td><td>bold</td><td>dark</td><td>underline</td><td>blink</td><td>reverse</td><td>concealed</td></tr><tr><td>xterm</td><td>yes</td><td>no</td><td>yes</td><td>bold</td><td>yes</td><td>yes</td></tr><tr><td>linux</td><td>yes</td><td>yes</td><td>bold</td><td>yes</td><td>yes</td><td>no</td></tr><tr><td>rxvt</td><td>yes</td><td>no</td><td>yes</td><td>bold/black</td><td>yes</td><td>no</td></tr><tr><td>dtterm</td><td>yes</td><td>yes</td><td>yes</td><td>reverse</td><td>yes</td><td>yes</td></tr><tr><td>teraterm</td><td>reverse</td><td>no</td><td>yes</td><td>rev/red</td><td>yes</td><td>no</td></tr><tr><td>aixterm</td><td>normal</td><td>no</td><td>yes</td><td>no</td><td>yes</td><td>yes</td></tr><tr><td>PuTTY</td><td>color</td><td>no</td><td>yes</td><td>no</td><td>yes</td><td>no</td></tr><tr><td>Windows</td><td>no</td><td>no</td><td>no</td><td>no</td><td>yes</td><td>no</td></tr><tr><td>Cygwin SSH</td><td>yes</td><td>no</td><td>color</td><td>color</td><td>color</td><td>yes</td></tr><tr><td>Mac Terminal</td><td>yes</td><td>no</td><td>yes</td><td>yes</td><td>yes</td><td>yes</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Examples:</h2>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
## Termcolor Library: ANSII Color formatting for output in terminal.

# Import Libraries
from termcolor import colored

print(&quot;warning&quot;)
print(&quot;Done&quot;)

### Text colors:

warning = colored(&quot;warning&quot;, &quot;red&quot;)
done = colored(&quot;done&quot;, &quot;green&quot;)

print(f&quot;&#x5B;{warning}] Virus in running&quot;)
print(f&quot;&#x5B;{done}] Virus killed&quot;)

### Text highlights:
warning = colored(&quot;&#x5B;warning]&quot;, &quot;red&quot;, &quot;on_grey&quot;)
done = colored(&quot;&#x5B;done]&quot;, &quot;green&quot;, &quot;on_grey&quot;)

print(f&quot;{warning} Virus in running&quot;)
print()
print(f&quot;{done} Virus killed&quot;)

### Attributes
warning = colored(&quot;&#x5B;warning]&quot;, &quot;red&quot;, &quot;on_grey&quot;, attrs=&#x5B;'reverse'])
done = colored(&quot;&#x5B;done]&quot;, &quot;green&quot;)

print(f&quot;{warning} Virus in running&quot;, end = &quot;\n&quot;)

print(f&quot;{done} Virus killed&quot;, end=&quot;\n&quot;)

done = colored(&quot;&#x5B;done]&quot;, &quot;green&quot;, attrs=&#x5B;'bold'])
print(f&quot;{done} Virus killed&quot;)

done = colored(&quot;&#x5B;done]&quot;, &quot;green&quot;, attrs=&#x5B;'underline'])
print(f&quot;{done} Virus killed&quot;)

done = colored(&quot;&#x5B;done]&quot;, &quot;green&quot;, attrs=&#x5B;'reverse'])
print(f&quot;{done} Virus killed&quot;)


######### Downloading Bar
import time

for j in range(1,101):
    time.sleep(.02)
    
    downloading = colored(&quot;Collecting Data&quot;, 'yellow', 'on_grey', attrs=&#x5B;'reverse'])
    percentage = colored(f&quot;&#x5B;{j}%]&quot;, 'blue')
    bar = colored('|' * j, &quot;green&quot;)
    color = downloading + percentage + bar
    
    print(color, end=&quot;\r&quot;)
    
print(&quot;\n&quot;, end=&quot;\n&quot;)

for j in range(1,101):
    time.sleep(.2)
    
    downloading = colored(&quot;Downloading&quot;, 'red', 'on_grey', attrs=&#x5B;'reverse'])
    percentage = colored(f&quot;&#x5B;{j}%]&quot;, 'blue')
    bar = colored('|' * j, &quot;green&quot;)
    color = downloading + percentage + bar
    
    print(color, end=&quot;\r&quot;)
</pre></div>


<p><strong>REF</strong>: https://pypi.org/project/termcolor/</p>
<p>The post <a rel="nofollow" href="https://indianaiproduction.com/print-colorful-text-in-python/">How print colorful text in Python | Python Tutorial</a> appeared first on <a rel="nofollow" href="https://indianaiproduction.com">Indian AI Production</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://indianaiproduction.com/print-colorful-text-in-python/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1777</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using Disk: Enhanced 

Served from: indianaiproduction.com @ 2026-06-22 13:46:00 by W3 Total Cache
-->