<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Python - උදව්වක් (දෙන ලද කාලයට අනුව function එකක් call කරන්න)]]></title><description><![CDATA[<p dir="auto">Python experts.. උදව්වක් ඕන... මං පොඩි program එකක් ලිව්වා. එකේදි වෙන්නේ define කරපු වේලාවල් වලදි function එකක් call කරන එක. දැනට වෙන්නේ තත්පරෙන් තත්පරෙට check කරනවා දීපු time එකයි, දැන් time එකයි සමානද කියලා. මීට වඩා හොද විදියක් තියෙනවද?</p>
<pre><code>from datetime import datetime

#Times tuple
timesTuple = ("09:37:00 PM", "09:38:00 PM", "09:39:00 PM", "10:33:00 PM", "10:50:00 PM", "11:30:00 PM", "12:10:00 PM", "12:50:00 PM", "01:30:00 PM")

  
# This function is used to  
# display time on the label 
def time(): 
 
    datetime_object = datetime.today()
    now = datetime.strftime(datetime_object,'%l:%M:%S %p')

    for x in timesTuple:
        timeOne = datetime.strftime(datetime.strptime(x, "%I:%M:%S %p"),'%l:%M:%S %p')
        if now == timeOne:
            playSound() 
            print("Fire bell at : " + x)
            print("------------")


#execute timer
time()

</code></pre>
]]></description><link>https://lankadevelopers.lk/topic/333/python-උදව-වක-ද-න-ලද-ක-ලයට-අන-ව-function-එකක-call-කරන-න</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 20:14:36 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/333.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Jul 2019 19:24:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Python - උදව්වක් (දෙන ලද කාලයට අනුව function එකක් call කරන්න) on Tue, 03 Sep 2019 22:01:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/54">@malinga91</a></p>
<p dir="auto">python GUI mama use karala na machan. mama python use karanne automation script liyanna witharai.</p>
]]></description><link>https://lankadevelopers.lk/post/2148</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2148</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Tue, 03 Sep 2019 22:01:54 GMT</pubDate></item><item><title><![CDATA[Reply to Python - උදව්වක් (දෙන ලද කාලයට අනුව function එකක් call කරන්න) on Tue, 03 Sep 2019 11:53:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/54">@malinga91</a><br />
You should try</p>
<pre><code>&gt;&gt; python -u yourscript.py
</code></pre>
<p dir="auto"><strong>Do not</strong> use</p>
<pre><code>&gt;&gt; python yourscript.py
</code></pre>
]]></description><link>https://lankadevelopers.lk/post/2147</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2147</guid><dc:creator><![CDATA[b6]]></dc:creator><pubDate>Tue, 03 Sep 2019 11:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to Python - උදව්වක් (දෙන ලද කාලයට අනුව function එකක් call කරන්න) on Tue, 03 Sep 2019 04:51:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/27">@root</a>  man try kara machan. weda. eth tkinter ekka use karaddi window eka open wenne nehe. :(</p>
]]></description><link>https://lankadevelopers.lk/post/2146</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2146</guid><dc:creator><![CDATA[malinga91]]></dc:creator><pubDate>Tue, 03 Sep 2019 04:51:20 GMT</pubDate></item><item><title><![CDATA[Reply to Python - උදව්වක් (දෙන ලද කාලයට අනුව function එකක් call කරන්න) on Tue, 03 Sep 2019 02:39:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/27">@root</a> Thanks machan. Man try karala balannam</p>
]]></description><link>https://lankadevelopers.lk/post/2145</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2145</guid><dc:creator><![CDATA[malinga91]]></dc:creator><pubDate>Tue, 03 Sep 2019 02:39:42 GMT</pubDate></item><item><title><![CDATA[Reply to Python - උදව්වක් (දෙන ලද කාලයට අනුව function එකක් call කරන්න) on Tue, 30 Jul 2019 10:27:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/54">@malinga91</a> machan me library eken oyage wade lesiyenma karnana puluwan.</p>
<p dir="auto"><a href="https://github.com/dbader/schedule" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/dbader/schedule</a></p>
]]></description><link>https://lankadevelopers.lk/post/2018</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2018</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Tue, 30 Jul 2019 10:27:03 GMT</pubDate></item><item><title><![CDATA[Reply to Python - උදව්වක් (දෙන ලද කාලයට අනුව function එකක් call කරන්න) on Tue, 30 Jul 2019 09:47:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/54">@malinga91</a> said in <a href="/post/2009">Python - උදව්වක් (දෙන ලද කාලයට අනුව function එකක් call කරන්න)</a>:</p>
<blockquote>
<p dir="auto">timesTuple</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/27">@root</a>  will be help to solve this</p>
]]></description><link>https://lankadevelopers.lk/post/2013</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2013</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Tue, 30 Jul 2019 09:47:27 GMT</pubDate></item></channel></rss>