|
Revision 69, 1.2 kB
(checked in by asterix86, 5 years ago)
|
|
- new configuration File management
- bugfix : message from unknown personne
|
-
Property svn:keywords set to
LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
|
| Line | |
|---|
| 1 | #!/usr/bin/env python |
|---|
| 2 | ## common/thread.py |
|---|
| 3 | ## |
|---|
| 4 | ## Gajim Team: |
|---|
| 5 | ## - Yann Le Boulanger <asterix@crans.org> |
|---|
| 6 | ## - Vincent Hanquez <tab@tuxfamily.org> |
|---|
| 7 | ## |
|---|
| 8 | ## Copyright (C) 2003 Gajim Team |
|---|
| 9 | ## |
|---|
| 10 | ## This program is free software; you can redistribute it and/or modify |
|---|
| 11 | ## it under the terms of the GNU General Public License as published |
|---|
| 12 | ## by the Free Software Foundation; version 2 only. |
|---|
| 13 | ## |
|---|
| 14 | ## This program is distributed in the hope that it will be useful, |
|---|
| 15 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | ## GNU General Public License for more details. |
|---|
| 18 | ## |
|---|
| 19 | |
|---|
| 20 | import threading |
|---|
| 21 | import socket |
|---|
| 22 | import sys |
|---|
| 23 | import time |
|---|
| 24 | |
|---|
| 25 | sys.path.append("..") |
|---|
| 26 | |
|---|
| 27 | class GajimThread(threading.Thread): |
|---|
| 28 | def __init__(self, name = None, queueIn = None, queueOut = None): |
|---|
| 29 | self.queueIn = queueIn |
|---|
| 30 | self.queueOut = queueOut |
|---|
| 31 | threading.Thread.__init__(self, target = self.run, \ |
|---|
| 32 | name = name, args = () ) |
|---|
| 33 | self.start() |
|---|
| 34 | # END __init__ |
|---|
| 35 | |
|---|
| 36 | def run(self): |
|---|
| 37 | mod = compile("import plugins.%s" % self.getName(), \ |
|---|
| 38 | self.getName(), "exec") |
|---|
| 39 | res = eval(mod) |
|---|
| 40 | mod = compile("plugins.%s.%s.plugin(self.queueIn, self.queueOut)" % (self.getName(),self.getName()), self.getName(), "exec") |
|---|
| 41 | res = eval(mod) |
|---|
| 42 | # END run |
|---|
| 43 | # END GajimThread |
|---|