xboxscene.org forums

Author Topic: Python Scripting Question  (Read 71 times)

jimity

  • Archived User
  • Newbie
  • *
  • Posts: 2
Python Scripting Question
« on: March 05, 2006, 04:22:00 PM »

Hi guys,
This one should be pretty simple for you. Unfortunately i dont know jack about programing in Python (too many years coding in VB6 for PC has made me too comfortable - and lazy (IMG:style_emoticons/default/smile.gif) )

Anyway. . .Does anyone know if there is a way in XBMC Python to pause the processing of the script temporarily. E.G. - I want to send a data string from XBMC to my PC, make the script wait for like a second while my PC app does its stuff etc, and then send another data string. I know how to send the data string with XBMC Python, just not pause the processing of the script for a second.

Thanks in advance for any help. . .
Logged

alexpoet

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Scripting Question
« Reply #1 on: July 10, 2006, 02:08:00 PM »

In your import statements, import time.

Then use:
time.sleep(1)

That causes your script to do nothing for 1 second. You can also use partial values, so:
time.sleep(.5)
will cause it to pause for half a second.

Hope that helps.
Logged