i-have-a-dreambox.com | Dreambox - Support

Register Calendar Members List Team Members Galerie to Portal Go to the Main Page

Boardrules Frequently Asked Questions Statistik Statistik Search Pinwand Dreambox Blog Ihad/Gemini Fan-Shop
i-have-a-dreambox.com | Dreambox - Support » ...::: Dreambox Software :::... » Dreambox Plugins (Enigma2) » Festplattenrestdauer in GB und MB » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Add Thread to Favorites
Post New Thread Post Reply
Go to the bottom of this page Festplattenrestdauer in GB und MB
Author
Post « Previous Thread | Next Thread »
ismail.demir ismail.demir is a male
V.I.P.


images/avatars/avatar-9873.gif

Registration Date: 28.06.2005
Posts: 2,113
Which box: siehe Signatur
External Storage: HDD; CIFS
Which Image: Gemini
Welcher Bildschirm: 19" BENQ TFT
Origin: Vorarlberg/AUSTRIA

Text Festplattenrestdauer in GB und MB Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

zeigt festplattenrestdauer im movieplayer in GB und MB an.


php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
from GUIComponent import GUIComponent
from VariableText import VariableText
from os import statvfs

from enigma import eLabel

# TODO: Harddisk.py has similiar functions, but only similiar.
# fix this to use same code
class DiskInfo(VariableTextGUIComponent):
    FREE 0
    USED 1
    SIZE 2
    
    def __init__(selfpathtypeupdate True):
        GUIComponent.__init__(self)
        VariableText.__init__(self)
        self.type type
        self.path path
        if update:
            self.update()
    
    def update(self):
        try:
            stat statvfs(self.path)
        except OSError:
            return -1
        
        if self.type == self.FREE:
            free stat.f_bfree stat.f_bsize
            g,divmod(free,1073741824)
            m,divmod(s,1048576)
            self.setText(("%d GB and %d MB " _("free diskspace")) % (g,m))

    GUI_WIDGET eLabel




Thank the author for this topic

8 Users have thanked for this topic (Schaedelmeister, RWZ, setitup, karl11, takki, CuNoah, mfgeg, max76).


Attachment:
unknown freedisk_1.0.1-r0_mipsel.ipk (1.15 KB, 59 downloads)


__________________


SatLoader (Aktuelle Satellites.xml)


3x DM500HD
1x DM800se
----------------
Kubuntu 11.10 x64
Windows 7 Ultimate x64
Intel i7 950@3200 10GB DDR3
MSI 7522 X58 Platinum SLI
MSI N560GTX-Ti Hawk

This post has been edited 1 time(s), it was last edited by ismail.demir: 01.06.2009 16:09.

01.06.2009 16:04 ismail.demir is offline Send an Email to ismail.demir Search for Posts by ismail.demir Add ismail.demir to your Buddy List View the MSN Profile for ismail.demir
Tree Structure | Board Structure
Jump to:
Post New Thread Post Reply
i-have-a-dreambox.com | Dreambox - Support » ...::: Dreambox Software :::... » Dreambox Plugins (Enigma2) » Festplattenrestdauer in GB und MB

Privacy policy | Team | Suchen | Hilfe


Powered by Burning Board 2.3.6 © 2001-2003 WoltLab GbR