Getting time data from user using Python to schedule task 10 mins into the future
<p>Im trying to get Python to check if time given is at least 10 minutes into the future. when entering data, I am always getting back the 'else' clause; <code>The scheduled time must be at least 10 minutes from now</code><br>
Here is the code im working with so far:</p>

<pre><code>while len(schedTime) == 0:
        schedTime = raw_input('Scheduled Time (hh:mm): ')

        schedHr = schedTime.split(':')[0]
        schedMi = schedTime.split(':')[1]

        try:
            testTime = int(schedHr)
            testTime = int(schedMi)
        except:
            print 'The scheduled time must be in the format hh:mm)'
            schedTime = ''
            continue

        if int(self.hr) &lt;= int(schedHr) and int(self.mi) + 10 &lt;= int(schedMi):
            pass
        else:
            print 'The scheduled time must be at least 10 minutes from now'
            schedTime = ''
</code></pre>

<p>Second part of the script a little(lot) further down:</p>

<pre><code> ### Get the current time
    now  = datetime.datetime.now()
    yrF = now.strftime('%Y')
    moF = now.strftime('%m')
    dyF = now.strftime('%d')

    then = now + datetime.timedelta(minutes=10)
    self.hr = then.strftime('%H')
    self.mi = then.strftime('%M')
</code></pre>
