Always start python via shebang lines.
This is preparation for supporting using Python 3 in production. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
		
							parent
							
								
									c748962855
								
							
						
					
					
						commit
						fe99695210
					
				
					 4 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -30,7 +30,7 @@ Here is an example of running the "follow-up" bot from
 | 
			
		|||
inside a Zulip repo:
 | 
			
		||||
 | 
			
		||||
    cd ~/zulip/contrib_bots
 | 
			
		||||
    python run.py lib/followup.py --config-file ~/.zuliprc-prod
 | 
			
		||||
    ./run.py lib/followup.py --config-file ~/.zuliprc-prod
 | 
			
		||||
 | 
			
		||||
Once the bot code starts running, you will see a
 | 
			
		||||
message explaining how to use the bot, as well as
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										5
									
								
								contrib_bots/run.py
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										5
									
								
								contrib_bots/run.py
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
#!/usr/bin/env python
 | 
			
		||||
from __future__ import print_function
 | 
			
		||||
 | 
			
		||||
import importlib
 | 
			
		||||
| 
						 | 
				
			
			@ -71,9 +72,9 @@ def run_message_handler_for_bot(lib_module, quiet, config_file):
 | 
			
		|||
 | 
			
		||||
def run():
 | 
			
		||||
    usage = '''
 | 
			
		||||
        python run.py <lib file>
 | 
			
		||||
        ./run.py <lib file>
 | 
			
		||||
 | 
			
		||||
        Example: python run.py lib/followup.py
 | 
			
		||||
        Example: ./run.py lib/followup.py
 | 
			
		||||
 | 
			
		||||
        (This program loads bot-related code from the
 | 
			
		||||
        library code and then runs a message loop,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue