Help yourself in python

October 31st, 2007 mysurface

If your computer science student, you study IT, click with technology, python is not a snake for you. It is a scripting-like programming language that are so famous today. You can type python into google, the first link is not about the reptile but the programming language. There are plenty of apps and scripts written […]

Posted in Developer, python | Hits: 27631 | 3 Comments »

Reverse a string

October 9th, 2006 toydi

python provides a -c option to accept and run a script line. To reverse a string like this one: “toydi deified idiot”. echo ‘toydi deified idiot’ | python -c “print raw_input()[::-1]” echo prints the string to stdout. python run the script line. raw_input() read from stdin (to read from pipe and return the string). [::-1] […]

Posted in python, rev | Hits: 64282 | 12 Comments »

writting executable script

October 8th, 2006 mysurface

Shell script (sh), Bash script (bash), Python and perl are all scripting language. By default, to run a scripting file, for example Python script, you need to do this: python Another example for shell script: sh But we make is executable and can execute by running directly like this ./ If you place […]

Posted in Bash, chmod, Developer, file, python, sh, which | Hits: 103436 | 22 Comments »