Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Python

Python Discussion forum for Python, a high-level language with simple syntax, but yet powerful.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-09-2008, 10:33 PM
the.anti.9's Avatar   
the.anti.9 the.anti.9 is offline
Newbie
 
Join Date: Jan 2008
Age: 17
Posts: 14
Rep Power: 0
the.anti.9 is on a distinguished road
Send a message via AIM to the.anti.9
Question Getting System Information

Hello, I am new to python and I want to make a python program that will display some statistics about the computer its running on. Some of the stats would include:

  • processor type (intel / amd)
  • processor speed
  • number of cpu cores
  • number of hard drives and their sizes
  • amount of system memory
  • video card name
  • video card ram
  • video card interface type( pci / agp / pci-e)
  • video output interface (dvi / vga / other)
  • network interface speed (54mbps / 100mbps / 1000mpbs)
  • OS
  • logged in user

Probably some other things as well but this is my current list. Is there some sort of library or package I can use to get this information? Is it even possible to gather this information with Python?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 08-10-2008, 02:58 AM
v0id's Avatar   
v0id v0id is offline
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,651
Last Blog:
CherryPy(thon)
Rep Power: 29
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default Re: Getting System Information

This is highly platform-dependent. Python has only some few modules for minor system-related tasks, such as os and sys, so if you need to do what you're looking for you must find a external library, like you suggested yourself. I unfortunately not know about a module with the functionality you're looking for, but here's what you can do:

If you're on Windows, you shall use some of the Win32 API modules for Python, like win32api, win32file, etc. You can find an example on how to use it for finding free space here, and for the other tasks you have, you can check a reference, like MSDN.

On Linux you will most likely have to use some of the terminal commands, such as df and free, to receive the information you're looking for.

Python is a high-level language, so tasks such as the ones you're trying to perform can be harder, than in other low-level languages. If you're experienced in a language like C, you can write your own module for Python, and let the module do whatever you like.
__________________
05-03-2007 - 11-13-2008
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-10-2008, 03:14 AM
the.anti.9's Avatar   
the.anti.9 the.anti.9 is offline
Newbie
 
Join Date: Jan 2008
Age: 17
Posts: 14
Rep Power: 0
the.anti.9 is on a distinguished road
Send a message via AIM to the.anti.9
Default Re: Getting System Information

Alright, Thanks void
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
python, system information



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Code:Show System Information TcM VB Tutorials 30 08-23-2008 05:04 PM
Windows Shortcut List - Saves Time 2stamlers The Lounge 6 04-10-2008 07:58 AM
[Pascal in Delphi]System to system Krad Pascal/Delphi 5 12-27-2007 02:35 PM
Get installed software information IUnknown Software Development Tools 5 10-15-2007 07:29 PM


All times are GMT -5. The time now is 12:30 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads