Pages

Saturday, July 3, 2010

Some Python Recepies.....

There is one module called " platform" in python,
which displays the information about the platform in which you are running Python....

You people know that Python is available for Windows and Linux.

So find the details about the platform, type the following in  the Python Interpreter....


import platform
platform.platform()

In my system it displayed ,
'Windows-XP-5.1.2600-SP2'

Next, To find the details about the Processor,
type the following in the Python Interpreter....

platform.processor() ...

Next, In Linux we have one command called 'pwd' - > Present Working Directory......

How to find the present working directory in Windows?????


For this we have one module called "os"

So to find the present working directory,

Type,

os.getcwd()

No comments:

Post a Comment