WTF *Nix

Just another *nix Blog

Archive for the ‘WTF Quick Cards’ Category

ClientExec MAIN Tab Manual

May-8-2009 By WTF *Nix

Well, well, well, I guess it’s time to release yet another helping hand to the Newedge Community!!! WOOHOO they say? Heck no! I say WTF Get ‘r Done!

Here you have a release of a full fledged “by the book” (HAHA NOT REALLY) manual by I myself from the Newedge Community Forums epctechno

I would like you to know, I’m not wanting you to read this off my website, I have uploaded the the PDF which is 9.1+ MB BIG in low compression in zip, tar.gz, .rar, and .7z here:

zip

tar.gz

rar

7z

You pick the format to download, it’s up to you. :)

Hope you enjoy this and if you find it in your heart to donate, please do! Took sometime on putting all of this together in a two-day span of time.


Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg

Python is an extremely extensible language in that you can add new capabilities by importing modules.

Here are just a slim few, but a widely used all throughout the day to day process of programming within python, so here’s for anyone that needs a WTF Quick Card…

sys – Allows interaction with the Python system:

  • exit() – exit!
  • argv – access command line arguments
  • path – access the system module search path
  • ps1 – change the ‘>>>’ python prompt!

os – Allows interaction with the operating system:

  • name – the current operating system, useful for portable programs
  • system – execute a system command
  • mkdir – create a directory
  • getcwd – find the current working directory

re – Allows manipulation of strings with Unix style regular expressions

  • search – find pattern anywhere in string
  • match – find at beginning only
  • findall – find all occurences in a string
  • split – break into fields separated by pattern
  • sub,subn – string substitution

math – Allows access to many mathematical functions:

  • sin,cos etc – trigonometrical functions
  • log,log10 – natural and decimal logarithms
  • ceil,floor – ceiling and floor
  • pi, e – natural constants

time – time(and date) functions

  • time – get the current time (expressed in seconds)
  • gmtime – convert time in secs to UTC (GMT)
  • localtime – convert to local time instead
  • mktime – inverse of localtime
  • sleep – pause program for n seconds

random – random number generators – useful for games programming!

  • randint – generate random integer between inclusive end points
  • sample – generate random sublist from a bigger list
  • seed – reset the number generator key

Remember this is just a SLIM bit of what’s instore for you that Python has, there are literally dozens of modules given too you with Python, then plenty more you can download!

Remember that using these within your code, you need to first IMPORT them as such:

>>>import SimpleXMLRPCServer as s

>>>s.SimpleXMLRPCRequestHandler()

Notice the above example is a shorter way of calling this module rather than typeing out the FULL SimpleXMLRPCServer :) Just saves us time in typing, unless you have an IDE that does it all for you by autocompletion… I prefer VIM for my IDE… So WTF, get it done and >>>import WTFNix.com

Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg