-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPacketManipulator
executable file
·42 lines (39 loc) · 1.69 KB
/
PacketManipulator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2008, 2009 Adriano Monteiro Marques
#
# Author: Francesco Piccinno <stack.box@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import os
import sys
os.putenv('PM_DEVELOPMENT', '1')
os.putenv('PM_NOPSYCO', '1')
os.putenv('PM_LOGLEVEL', '1')
os.putenv('PM_LOGEXCLUDE', '(register_tab|containers.py|doc.py|mainwindow.py|dump\(\)\:|hook_point|bus.py)')
os.putenv('PYTHONPATH', '%s%s%s' % (os.getcwd(), os.pathsep,
os.getenv('PYTHONPATH', '')))
if os.name == 'nt':
os.chdir('umit/pm')
os.system('python PacketManipulator %s' % ' '.join(sys.argv[1:]))
else:
if '--debug' in sys.argv:
args = sys.argv[1:]
args.remove('--debug')
os.system('gdb --args %s umit/pm/PacketManipulator %s' % (sys.executable,
' '.join(args)))
else:
os.system('%s umit/pm/PacketManipulator %s' % (sys.executable,
' '.join(sys.argv[1:])))