Posts: 4,653
Threads: 1,496
Joined: Sep 2016
is it safe to discard empty lines in Python source code other than a multi-line triple quote? i need to keep source code for EC2 instance userdata as small as possible so i want to have the processing throw out empty lines.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
normally AWS userdata is done in bash. if the AMI expects something different it can do anything. the default is to check the #! and if the command is recognized, run it. unfortunately, python is not recognized. so i am embedding it,, compressed, in a bash script. doing this pre-compiled will be even better.
it turns out i will have the script in memory. is there a way to pre-compile it memory with some python calls? there will be 3 files:
1. the userdata script with places to insert certain data.
2. the user config file with level 2 settings (level 1 are hard coded default in the submit script and level 3 is the command line).
3. the submit script. it merges settings. sets up userdata, submits the instance (spot request if a price is in the settings).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
why would i use
# coding: latin-1
?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.