Thursday, June 28, 2012

Windows Environment Variable

Setting Up Windows Environment Variable

Following steps are for Windows 7.

  1. Open system properties either by using shortcut WinKey + Pause or right click on My Computer -> Properties.
  2. Open Advanced System Setting
  3. Go to the Advanced  tab.
     
  4. Open Environment Variable. by using the button at the bottom right with the same name.
  5. Now depending on your requirement either add a new variable or use the existing one.
      
And that's done. 


Cheers,
fLiCkEr.

Tuesday, June 26, 2012

Python in Eclipse [PyDev plugin for Eclipse]

While learning python, one question I had was, which python IDE to use? There are many options but being a Java developer I wanted to have something like Eclipse and it turned out that there is a plugin for eclipse which can be used for Python development with the auto-suggest, run, debug and many other features.

The plugin for eclipse is called PyDev and it's very easy to configure. 
Note: I work on a windows machine, so all the instructions are around a windows machine. 
  • Get Python:
    • Download the recent version of python from python.org.
    • Run the setup file (python-.msc) and follow the install insrtuction. 
    • Once the installation is complete, set the windows environment variable to point to the python installation folder.
      • Right click on "My Computer".
      • Select "properties". 
      • Click on the button "Environment Variables" under the tab "Advanced".


      • Add the path of python installation to the PATH variable, in my case its "D:\Python27\".


    • Go to dos command line and type the command ">python", if it takes you to the python command line, then it works.


  • Get Eclipse and install the PyDev plugin.
    • Download a version of Eclipse IDE from here do the setup you need for other dev. 
    • Now from Eclipse menu go to Help -> Install New Software
    • Add the PyDev update site http://pydev.org/updates.


    • Install the plugin. 
  • Configuration of Eclipse. 
    • From eclipse menu, open Window -> Preferences.
    • Look for PyDev -> Interepreter - Python.
    • Click on new and add the python.exe.
      • For windows, it was under the python installation i.e. d:\python27.
      • For linux, find it by running the command >which python






And all done, you are good to go... Play with python in eclipse.


Also check out my new post on Python-pip tool. 

Thursday, June 21, 2012

Django - Overview


DJango

Overview

What is Django ?

Django is high-level Python Web framework that was released under BSD license in 2005. It emphasizes re-usability, rapid development and DRY (don’t repeat yourself) principle. There are a lot of great web development frameworks available, like Ruby on rails and Codeigniter for PHP that follow same principles so we could say that Django is just another fast development web framework but with different flavor. With the help of Django, a developer can build and maintain high-quality Web applications with minimal effort.

Why use Django?

  • Django is fast and stable.
  • It’s very scalable.
  • Let’s you work outside the scope of the framework as required.
  • Fast development and code readability.
  • Very well documented.
  • And the list goes on about Django’s pros over other web development frameworks.

Required Knowledge

  • Should have the basic understanding of procedural and object-oriented programming: control structures (e.g. if, while, for), data structures (lists, hashes/dictionaries), variables, classes, objects, etc.
  • At least hands on experience with programming in Python and understanding of how libraries work. If you don’t know python, click here.

Follow by Email