Skip to content

peterbarraud/pylets

Repository files navigation

Create new py

Open the git bash and type where python

Copy the output line and paste it at the top of your script (very first line) preceeded by a hash (#)

For example:

#!c:/Users/barraud/AppData/Local/Programs/Python/Python35/python.exe

Open the git bash at the py location

To compile the py, enter

chmod +x <name>.py

To run the script, enter

./<name>.py

Code conventions

  1. The #! statement must be at the very first line
  2. import statement There must be a blank line between the first line and the
  3. def statement There must be at least two blank lines before a def statement
  4. There must be no space between a function call and the opening bracket: print('something')
  5. Function call: There must be a single space after a comma: print('something, 'something else')
  6. Function names: use underscore instead of camel case for variable/function names: add_num instead of addNum or even addnum
  7. Semi colon for flow statements: There must be no space before the semi colon in flow statments: if condition: instead of if condition :
  8. The last line of a file must be a blank line. But only one blank line

See also: Intermezzo: Coding Style

Other useful libraries

Config parser

godaddy Django hosting

Eclipse setup

List comprehensions

Collections library

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages