Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 8bf4da62 authored by hhakim's avatar hhakim
Browse files

Add a python script to filter out exprimental code in pyfaust and matfaust.

parent b6a2cd5a
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
import re, sys
EXP_BLOCK_START="^(#|%) experimental block start"
EXP_BLOCK_END="(#|%) experimental block end"
if(len(sys.argv) >= 1):
for script in sys.argv[1:]:
in_exp_block = False
for line in open(sys.argv[1]):
if(not in_exp_block and re.match(EXP_BLOCK_START,
line)):
in_exp_block = True
elif(in_exp_block and re.match(EXP_BLOCK_END, line)):
in_exp_block = False
elif(not in_exp_block):
print(line,end='')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment