SORU
24 Mart 2010, ÇARŞAMBA


dosya boş kontrol etmek için python ya da değil

Bir metin dosyası var. Nasıl dosya boş veya boş olup olmadığını kontrol edebilir miyim?

CEVAP
24 Mart 2010, ÇARŞAMBA


import os    
os.path.getsize(fullpathhere) > 0

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Chriselle Lim

    Chriselle Li

    26 Ocak 2008
  • LG Mobile Global

    LG Mobile Gl

    2 EYLÜL 2010
  • NextGenWindows

    NextGenWindo

    8 Kasım 2011