• 01-03-2023, 22:26:22
    #1
    işletim sistemi komutu ile bir cmd komutu çalıştırmak istiyorum ve terminaldeki yazıları okumak istiyorum işlem bitmese bile.
    Örnek:
    çalıştırmak istediğim program 50 den geriye sayıyor ve 0 olunca bitiyor, ben python ile os.popen(programcalistir) yazıp bunun sonucunu aldığımda programın bitmesini bekleyip bana bittiğindeki sonucu dönüyor, ben istiyorum ki daha bitmeden, terminaldeki şeyleride yazsın
  • 01-03-2023, 22:28:56
    #2
    https://chat.openai.com/chat
    chatgpt ile denediniz mi? Python ile çalışmıyorum ama
  • 01-03-2023, 22:29:39
    #3
    Misafir adlı üyeden alıntı: mesajı görüntüle
    https://chat.openai.com/chat
    chatgpt ile denediniz mi? Python ile çalışmıyorum ama
    direkt kodu atabilir misiniz, deniyim
  • 01-03-2023, 22:30:15
    #4
    satrancali adlı üyeden alıntı: mesajı görüntüle
    direkt kodu atabilir misiniz, deniyim
    import subprocess
    
    p = subprocess.Popen('cmd.exe /c dir', stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    
    while True:
        output = p.stdout.readline().decode()
        if output == '' and p.poll() is not None:
            break
        if output:
            print(output.strip())
    
    rc = p.poll()
  • 01-03-2023, 22:32:45
    #5
    Misafir adlı üyeden alıntı: mesajı görüntüle
    import subprocess
    
    p = subprocess.Popen('cmd.exe /c dir', stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    
    while True:
        output = p.stdout.readline().decode()
        if output == '' and p.poll() is not None:
            break
        if output:
            print(output.strip())
    
    rc = p.poll()
    Çok teşekkür ederim, çalıştı.
  • 01-03-2023, 22:38:45
    #6
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Misafir adlı üyeden alıntı: mesajı görüntüle
    https://chat.openai.com/chat
    chatgpt ile denediniz mi? Python ile çalışmıyorum ama
    Harika ✅ bende geçen 4 farklı bot yazdırdım zehir gibi çalışıyor. Eminim o botu buralarda yaptirsam 2K öderdim. 15 dakika da hallettim.