Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main(args):
try:
grid_resolution = int(args[0])
except IndexError:
print('Usage: ./fluid-gui.py GRID_RESOLUTION')
print()
print('Add particles with right click.')
print('Add forces with left click.')
print('Press C to clear all particles and forces.')
print('Press Q/A and W/S to modify diffusion rate and viscosity.')
print()
print('Example: Create a 256x256 fluid simulation.')
print(' ./fluid-gui.py 256')
return 1
f = FluidGUI(grid_resolution=grid_resolution)
f.run()
return 0