obf.py
author Laurent Bessard
Sat, 25 Aug 2012 14:45:44 +0200
changeset 746 963123fb4917
parent 58 39cd981ff242
permissions -rw-r--r--
Fix bug name kept when changing a function block to a function
58
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     1
#!/usr/bin/env python
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     2
# -*- coding: utf-8 -*-
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     3
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     4
#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     5
#based on the plcopen standard. 
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     6
#
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     7
#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     8
#
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
     9
#See COPYING file for copyrights details.
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    10
#
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    11
#This library is free software; you can redistribute it and/or
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    12
#modify it under the terms of the GNU General Public
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    13
#License as published by the Free Software Foundation; either
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    14
#version 2.1 of the License, or (at your option) any later version.
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    15
#
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    16
#This library is distributed in the hope that it will be useful,
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    17
#but WITHOUT ANY WARRANTY; without even the implied warranty of
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    18
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    19
#General Public License for more details.
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    20
#
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    21
#You should have received a copy of the GNU General Public
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    22
#License along with this library; if not, write to the Free Software
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    23
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
39cd981ff242 Changing file headers
lbessard
parents: 5
diff changeset
    24
5
f8652b073e84 GPL->LGPL
etisserant
parents:
diff changeset
    25
from py_compile import compile
f8652b073e84 GPL->LGPL
etisserant
parents:
diff changeset
    26
from commands import getoutput
f8652b073e84 GPL->LGPL
etisserant
parents:
diff changeset
    27
from os import remove,getcwd,rename
f8652b073e84 GPL->LGPL
etisserant
parents:
diff changeset
    28
f8652b073e84 GPL->LGPL
etisserant
parents:
diff changeset
    29
for filename in getoutput("find . -name '*.py'").splitlines():
f8652b073e84 GPL->LGPL
etisserant
parents:
diff changeset
    30
        print "Compilation de :", filename
f8652b073e84 GPL->LGPL
etisserant
parents:
diff changeset
    31
        compile(filename)