Atom Python Setup

Posted Leave a commentPosted in Code, Python

Install Atom https://atom.io/ Install Python Linter Atom -> Preferences -> Install https://atom.io/packages/linter-flake8 If you have trouble getting the linter to be on your pythonpath: Add this to your init script: Atom -> Open Your Init Script process.env.PATH = [‘/usr/local/bin/’, process.env.PATH].join(‘:’) I also don’t want the linter to freak out every time a line is longer […]

Python Tutorial 3: Modules, Classes & OOP

Posted 2 CommentsPosted in Code, Python

This Python tutorial covers Python modules, classes and object-oriented programming principles. This includes: Modules: The Big Picture Module Import Syntax Packages Inheritance Classes Exceptions   Modules In Python a Module is the highest-level program organization unit, modules correspond to Python program files. Each file is a module, and modules import other modules to use the […]

Python Tutorial 2: Statements, Syntax & Functions

Posted Leave a commentPosted in Code, Python

This Python tutorial covers basic Python statements, syntax and functions. This includes: Introducing Python Statements Assignment, Expressions and print if Tests while and for loops Function Basics Scope Advanced Function Topics   Print We have already encountered this statement before; it is used simply to display objects. >>> print ‘hello’ hello >>> print 4 4 […]

Re-select bootbox.js modal and close

Posted 1 CommentPosted in Code

Let’s say that you have instantiated a bootbox.js modal or dialog somewhere else in your code like this: bootbox.dialog({ title: ‘Some Title’, message: ‘Hey a popup!’, className: “hey-modal” }); Now you want to take some action on it, like closing it for example. In order to re-select the object you can either use the class […]