RSS

Tag Archives: Python

How to install pip for python in Windows


pip install might be the most frequently used module in python. However, in the past it is not easy to install that in windows, see my previous post. Now in the latest update, it is very trivial to get this done.

  • If you have installed Python 3.4, the pip is already installed, no need to do anything!
  • If you are still using Python 2.x, the simplest way is to download get_pip.py, and run this command

image

Read the rest of this entry »

Advertisements
 
Leave a comment

Posted by on April 9, 2014 in Programming, Python

 

Tags: , , , , ,

Getting maya path programmatically: Python and C# Code


In automating maya to do some custom job, the maya installation folder is usually needed. Though one can hard code this as, for example, path=”C:\\Program Files\\Autodesk\\Maya2014\\”, this is not the best way as users may not install maya to the default directory.

To extract the maya installation folder, one can use registry in windows platform, as shown below:

image

Given this fact, it is not very hard to get the maya root folder, either in Python or C#:

Read the rest of this entry »

 
Leave a comment

Posted by on August 17, 2013 in CAD, Python

 

Tags: , , ,

Install python setuptools (easy install) on windows


It is very easy but you need to have a look at the documentation. Below are the quick steps to install “setuptools” for python.

  • Download this ez_setup.py and save it to hardisk.
  • Open a cmd window, and type “ez_setup.py”
  • Add “C:\Python27\Scripts” to enthronement “Path” variable

image

image

That is it. Enjoy.

 
1 Comment

Posted by on August 17, 2013 in Python

 

Tags: , , , , ,

2012 in review


The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

19,000 people fit into the new Barclays Center to see Jay-Z perform. This blog was viewed about 69,000 times in 2012. If it were a concert at the Barclays Center, it would take about 4 sold-out performances for that many people to see it.

Click here to see the complete report.

 
Leave a comment

Posted by on January 9, 2013 in General

 

Tags: , , , , , , , , , , , , , , , , , ,

Python Socket example: the simplest example


The python socket component is extremely easy to use, and this simplest example demonstrated its typical use. This is simplest, since both the server and client are the local machine:

On the Server Side:

image

On the Client Side:

image

 

 

 

  • First run the SocketServer.py, and make sure the server is ready to listen/receive sth
  • Then the client send info to the server;
  • After the server received sth, it terminates

That is it.

results

Downloads source files: SocketClient.py | SocketServer.py.

 
7 Comments

Posted by on May 23, 2012 in Programming

 

Tags: , , ,