Skip to content

Instantly share code, notes, and snippets.

@cjwang
cjwang / dev_setup_macOS
Created May 24, 2023 01:05
Python - Dev Setup on MacOS
Python:
MacOS already has Python 2.x installed. Need to avoid issues when installing the latest Python (3.x in this case)
1. Instsall XCODE. Download it from the APP Store or Apple website
2. Instead of downloading Python installer from the Python website, install the latest Python using Homebrew.
Before dong so, install Homebrew with the script below:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3. Install Python using Homebrew: $ brew install python
4. Use the following commands to verify the new Python has been installed:
Python3 --version
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';