Difference between revisions of "Translations:RPi/40/de"

From GIMX
Jump to: navigation, search
(Created page with "while True: found = False time.sleep(5) pids = [pid for pid in os.listdir('/proc') if pid.isdigit()] for pid in pids: try: cmd = open(os.path.join('/proc',...")
 

(No difference)


Latest revision as of 16:58, 29 December 2016

Information about message (contribute)

This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.

Message definition (RPi)
while True:  
  found = False
  time.sleep(5)
  pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
  for pid in pids:
   try:
     cmd = open(os.path.join('/proc', pid, 'cmdline'), 'rb').read()
     if "gimx" in cmd:
       found = True
   except IOError: # proc has already terminated
     continue
  if found == True:
   GPIO.output(led, True)
  else:
   GPIO.output(led, False)
</pre>
Translationwhile True:  
  found = False
  time.sleep(5)
  pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
  for pid in pids:
   try:
     cmd = open(os.path.join('/proc', pid, 'cmdline'), 'rb').read()
     if "gimx" in cmd:
       found = True
   except IOError: # proc has already terminated
     continue
  if found == True:
   GPIO.output(led, True)
  else:
   GPIO.output(led, False)
</pre>

while True:

 found = False
 time.sleep(5)
 pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
 for pid in pids:
   try:
     cmd = open(os.path.join('/proc', pid, 'cmdline'), 'rb').read()
     if "gimx" in cmd:
       found = True
   except IOError: # proc has already terminated
     continue
 if found == True:
   GPIO.output(led, True)
 else:
   GPIO.output(led, False)