Monday, September 15, 2014

python environment setup-001 : pip and path configure



1  Starting from version Python 3.4, pip is already included in the regular install.

2 The Windows version is provided as an MSI package.

3 You can have multiple versions of Python on the same system without conflics.

4 only one interpreter can be the default application for Python file types.

5  It also does not automatically modify the PATH environment variable,
so that you always have control over which copy of Python is run.

my pc path :
E:\p27\;E:\p27\Lib\;

E:\devLW\Python32;

E:\devLW\Python32\Scripts;

3 download the get-pip.py

4 python get-pip.py

5 pip install virtualenv

6  virtualenv venv

e virtualenv kit provides the ability to create virtual Python environments that do not interfere with either each other, or the main Python installation. If you install virtualenv before you begin coding then you can get into the habit of using it to create completely clean Python environments for each project. This is particularly important for Web development, where each framework and application will have many dependencies.

To set up a new Python environment, change the working directory to wherever you want to store the environment, and run the virtualenv utility in your project’s directory


To use an environment, run the activate.bat batch file in the Scripts subdirectory of that environment. Your command prompt will change to show the active environment. Once you have finished working in the current virtual environment, run the deactivate.bat batch file to restore your settings to normal.

Each new environment automatically includes a copy of pip in the Scripts subdirectory, so that you can setup the third-party libraries and tools that you want to use in that environment. Put your own code within a subdirectory of the environment, however you wish. When you no longer need a particular environment, simply copy your code out of it, and then delete the main directory for the environment.

=============================
Reference list :

http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows

https://pip.pypa.io/en/latest/installing.html

http://docs.python-guide.org/en/latest/starting/install/win/




QTP VBS Excel SaveAs: how to save 2003 excel files (.xls) in the compatibility mode (2007 office Excel)



I have one qtp script and the come out result is default 2007 format .xlsx files and today I want to convert it to 2003 :


Just change the file name is xls and add number 56 or -4134 in the SaveAs codeline: see the below snippet:

          file_name=p_string&".xls"
            file_path="c:\1234\"
            new_file_location=file_path&file_name
            'obj_excel.ActiveWorkbook.SaveAs  new_file_location
           
            obj_excel.ActiveWorkbook.SaveAs  new_file_location,-4143
             

These are the main file formats in Excel 2007-2013, Note: In Excel for the Mac the values are +1

51 = xlOpenXMLWorkbook (without macro's in 2007-2013, xlsx)
52 = xlOpenXMLWorkbookMacroEnabled (with or without macro's in 2007-2013, xlsm)
50 = xlExcel12 (Excel Binary Workbook in 2007-2013 with or without macro's, xlsb)
56 = xlExcel8 (97-2003 format in Excel 2007-2013, xls)

Reference : 

http://stackoverflow.com/questions/17464698/open-an-excel-file-and-save-as-xls
http://www.rondebruin.nl/win/s5/win001.htm

Tuesday, September 2, 2014

09042014 Daily Enlgish video : Unit 4 I like your style


Unit 4
I like your style

just the shirt

where did you get it ?

I got it from the weekend market
How much did it cost ?
it cost about 12 dollars
do you like to wear jewelry ?
Do u have a pierced ear ?
Do u have a tattoo ?
yes, I do

//from the youtube video

https://www.youtube.com/watch?v=mSc5THUz4lw