code
stringlengths
1
1.72M
language
stringclasses
1 value
#!/usr/bin/env python #Boa:App:BoaApp import wx,signal,os,sys import frm_gestion_Repertoires modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']} class BoaApp(wx.App): def OnInit(self): self.main =frm_gestion_Repertoires.create(None) self.main.Show() ...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx,signal,os,sys import frm_gestion_Repertoires modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']} class BoaApp(wx.App): def OnInit(self): self.main =frm_gestion_Repertoires.create(None) self.main.Show() ...
Python
#Boa:Dialog:Dialog1 import wx def create(parent): return Dialog1(parent) [wxID_DIALOG1, wxID_DIALOG1TXT_MDP, ] = [wx.NewId() for _init_ctrls in range(2)] class Dialog1(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', ...
Python
#!/usr/bin/python # -*- coding: UTF-8 -*- #Boa:Frame:Frame1 #----------------------------------------------------------------------------- # Name: Class_Serv_IHM # Purpose: Creation d'un socket a chaque lancement de ABC IHM # Permet de controler le nombre de programme lancer a 1 # ...
Python
# -*- coding: UTF-8 -*- ''' Name: Class_XML_ABC.py Purpose: Classe de gestion des XML de config Author: ABCPro Created: 2007/04/12 Copyright: (c) 2007 Licence: <your licence> ''' import os,sys import xml.dom.minidom as m class XML_ABC : Path ...
Python
#Boa:Frame:Frame1 # -*- coding: utf-8 -*- ''' # -*- coding: iso-8859-15 -*- ''' import wx,os,os.path,sys,threading,time,shutil,base64,signal import gettext, Class_Serv_Ihm,dlg_infos_serveur from wx.lib.wordwrap import wordwrap from Class_ABC_XML import XML_ABC from Class_ABC_Crypt import ABC_Crypt from...
Python
#Boa:Dialog:Dialog1 # -*- coding: UTF-8 -*- import wx,base64 import wx.lib.buttons from subprocess import Popen def create(parent): return Dialog1(parent) [wxID_DIALOG1, wxID_DIALOG1BTN_VALIDER, wxID_DIALOG1LBL_GROUPE, wxID_DIALOG1LBL_SERVEUR, wxID_DIALOG1TXT_GROUP, wxID_DIALOG1TXT_SERVEUR, ] = [w...
Python
# -*- coding: UTF-8 -*- import os,sys,gettext,warnings from Class_ABC_XML import XML_ABC # ------------------------------------------------------------------------------ # --- Internationalisation # --- la langue par défaut est le français # ----------------------------------------------------------------------------...
Python
# -*- coding: UTF-8 -*- #----------------------------------------------------------------------------- # Name: Class_ABC_Crypt.py # Purpose: Classe de cryptage des logs # # # Author: ABCPro # # Created: 2007/04/18 # Copyright: (c) 2007 # Licence: <your licence> #-------------...
Python
#!/usr/bin/python # -*- coding: UTF-8 -*- #Boa:Frame:Frame1 #----------------------------------------------------------------------------- # Name: Class_Serv_IHM # Purpose: Creation d'un socket a chaque lancement de ABC IHM # Permet de controler le nombre de programme lancer a 1 # ...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx,signal,os,sys import frm_gestion_Repertoires modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']} class BoaApp(wx.App): def OnInit(self): self.main =frm_gestion_Repertoires.create(None) self.main.Show() ...
Python
#Boa:Dialog:Dialog1 import wx def create(parent): return Dialog1(parent) [wxID_DIALOG1, wxID_DIALOG1TXT_MDP, ] = [wx.NewId() for _init_ctrls in range(2)] class Dialog1(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', ...
Python
#!/usr/bin/python # -*- coding: UTF-8 -*- #Boa:Frame:Frame1 #----------------------------------------------------------------------------- # Name: Class_Serv_IHM # Purpose: Creation d'un socket a chaque lancement de ABC IHM # Permet de controler le nombre de programme lancer a 1 # ...
Python
# -*- coding: UTF-8 -*- ''' Name: Class_XML_ABC.py Purpose: Classe de gestion des XML de config Author: ABCPro Created: 2007/04/12 Copyright: (c) 2007 Licence: <your licence> ''' import os,sys import xml.dom.minidom as m class XML_ABC : Path = '/usr/share/NBS...
Python
#Boa:Frame:Frame1 # -*- coding: utf-8 -*- import wx,os,os.path,sys,threading,time,shutil,base64,signal import gettext, Class_Serv_Ihm,dlg_infos_serveur from wx.lib.wordwrap import wordwrap from Class_ABC_XML import XML_ABC from Class_ABC_Crypt import ABC_Crypt from subprocess import PIPE from subprocess import Popen...
Python
#Boa:Dialog:Dialog1 # -*- coding: UTF-8 -*- import wx,base64 import wx.lib.buttons from subprocess import Popen def create(parent): return Dialog1(parent) [wxID_DIALOG1, wxID_DIALOG1BTN_VALIDER, wxID_DIALOG1LBL_GROUPE, wxID_DIALOG1LBL_SERVEUR, wxID_DIALOG1TXT_GROUP, wxID_DIALOG1TXT_SERVEUR, ] = [wx.NewId() fo...
Python
# -*- coding: UTF-8 -*- #----------------------------------------------------------------------------- # Name: Class_ABC_Crypt.py # Purpose: Classe de cryptage des logs # # # Author: ABCPro # # Created: 2007/04/18 # Copyright: (c) 2007 # Licence: <your licence> #-------------...
Python
# -*- coding: UTF-8 -*- ''' Name: Class_XML_ABC.py Purpose: Classe de gestion des XML de config Author: ABCPro Created: 2007/04/12 Copyright: (c) 2007 Licence: <your licence> ''' import os,sys import xml.dom.minidom as m class XML_ABC : Path = '/usr/share/NBS...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx,signal,os,sys import frm_gestion_Repertoires modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']} class BoaApp(wx.App): def OnInit(self): self.main =frm_gestion_Repertoires.create(None) self.main.Show() ...
Python
from distutils.core import setup import py2exe class Target: def __init__(self, **kw): self.__dict__.update(kw) # for the versioninfo resources self.version = "1.0" self.company_name = "NumeriPlus" self.copyright = "copyright 2008" self.name = "NBS synchr...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx import NBS_Backup_IHM modules ={u'NBS_Backup_IHM': [1, 'Main frame of Application', u'NBS_Backup_IHM.py']} class BoaApp(wx.App): def OnInit(self): self.main = NBS_Backup_IHM.create(None) frameicon = wx.Icon("./img/icone.ico", wx.BITMAP_...
Python
from distutils.core import setup import py2exe """ setup( options = {"py2exe": {"compressed": 1, "optimize": 0, "bundle_files": 1, } }, zipfile = None, windows=["ABC_ihm.py"] ) """ setup(zipfile = None, windows = [{"script": "NBS_ihm.py", "icon_resources": [(1, "icone.ico")]...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx import NBS_Backup_IHM modules ={u'NBS_Backup_IHM': [1, 'Main frame of Application', u'NBS_Backup_IHM.py']} class BoaApp(wx.App): def OnInit(self): self.main = NBS_Backup_IHM.create(None) frameicon = wx.Icon("./img/icone.ico", wx.BITMAP_...
Python
from distutils.core import setup import py2exe """ setup( options = {"py2exe": {"compressed": 1, "optimize": 0, "bundle_files": 1, } }, zipfile = None, windows=["ABC_ihm.py"] ) """ setup(zipfile = None, windows = [{"script": "NBS_ihm.py", "icon_resources": [(1, "icone.ico")]...
Python
# -*- coding: UTF-8 -*- import os,sys,gettext,warnings from Class_ABC_XML import XML_ABC # ------------------------------------------------------------------------------ # --- Internationalisation # --- la langue par défaut est le français # --------------------------------------------------------------------...
Python
from distutils.core import setup import py2app py2app_options=dict( iconfile='icone.icns', ) setup( app=["NBS.py"], setup_requires=["py2app"], options=dict( py2app=py2app_options, ) )
Python
# -*- coding: UTF-8 -*- #----------------------------------------------------------------------------- # Name: Class_ABC_Crypt.py # Purpose: Classe de cryptage des logs # # # Author: ABCPro # # Created: 2007/04/18 # Copyright: (c) 2007 # Licence: <your licence> #-...
Python
#!/usr/bin/python # -*- coding: UTF-8 -*- #Boa:Frame:Frame1 #----------------------------------------------------------------------------- # Name: Class_Serv_IHM # Purpose: Creation d'un socket a chaque lancement de ABC IHM # Permet de controler le nombre de programme lancer a 1 # ...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx,signal,os,sys import frm_gestion_Repertoires modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']} class BoaApp(wx.App): def OnInit(self): self.main =frm_gestion_Repertoires.create(None) self.main.Show() ...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx,signal,os,sys import frm_gestion_Repertoires modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']} class BoaApp(wx.App): def OnInit(self): self.main =frm_gestion_Repertoires.create(None) self.main.Show() ...
Python
#Boa:Dialog:Dialog1 import wx def create(parent): return Dialog1(parent) [wxID_DIALOG1, wxID_DIALOG1TXT_MDP, ] = [wx.NewId() for _init_ctrls in range(2)] class Dialog1(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', ...
Python
#!/usr/bin/python # -*- coding: UTF-8 -*- #Boa:Frame:Frame1 #----------------------------------------------------------------------------- # Name: Class_Serv_IHM # Purpose: Creation d'un socket a chaque lancement de ABC IHM # Permet de controler le nombre de programme lancer a 1 # ...
Python
# -*- coding: UTF-8 -*- ''' Name: Class_XML_ABC.py Purpose: Classe de gestion des XML de config Author: ABCPro Created: 2007/04/12 Copyright: (c) 2007 Licence: <your licence> ''' import os,sys import xml.dom.minidom as m if hasattr(sys,"setdefaultenco...
Python
#Boa:Frame:Frame1 # -*- coding: utf-8 -*- ''' # -*- coding: iso-8859-15 -*- ''' import wx,os,os.path,sys,threading,time,shutil,base64,signal import gettext, Class_Serv_Ihm,dlg_infos_serveur from wx.lib.wordwrap import wordwrap from Class_ABC_XML import XML_ABC from Class_ABC_Crypt import ABC_Crypt from...
Python
#Boa:Dialog:Dialog1 # -*- coding: UTF-8 -*- import wx,base64 import wx.lib.buttons from subprocess import Popen def create(parent): return Dialog1(parent) [wxID_DIALOG1, wxID_DIALOG1BTN_VALIDER, wxID_DIALOG1LBL_GROUPE, wxID_DIALOG1LBL_SERVEUR, wxID_DIALOG1TXT_GROUP, wxID_DIALOG1TXT_SERVEUR, ] = [w...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx import NBS_Backup_IHM modules ={u'NBS_Backup_IHM': [1, 'Main frame of Application', u'ABC_Backup_IHM.py']} class BoaApp(wx.App): def OnInit(self): self.main = NBS_Backup_IHM.create(None) frameicon = wx.Icon("./img/icone.ico", wx.BITMAP_...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx import ABC_Backup_IHM modules ={u'ABC_Backup_IHM': [1, 'Main frame of Application', u'ABC_Backup_IHM.py']} class BoaApp(wx.App): def OnInit(self): self.main = ABC_Backup_IHM.create(None) self.main.Show() self.SetTopWindow(self....
Python
from distutils.core import setup import py2exe """ setup( options = {"py2exe": {"compressed": 1, "optimize": 0, "bundle_files": 1, } }, zipfile = None, windows=["ABC_ihm.py"] ) """ setup(zipfile = None, windows = [{"script": "NBS_ihm.py", "icon_resources": [(1, "icone.ico")]...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx import NBS_Backup_IHM modules ={u'NBS_Backup_IHM': [1, 'Main frame of Application', u'ABC_Backup_IHM.py']} class BoaApp(wx.App): def OnInit(self): self.main = NBS_Backup_IHM.create(None) frameicon = wx.Icon("./img/icone.ico", wx.BITMAP_...
Python
#!/usr/bin/env python #Boa:App:BoaApp import wx import ABC_Backup_IHM modules ={u'ABC_Backup_IHM': [1, 'Main frame of Application', u'ABC_Backup_IHM.py']} class BoaApp(wx.App): def OnInit(self): self.main = ABC_Backup_IHM.create(None) self.main.Show() self.SetTopWindow(self....
Python
from distutils.core import setup import py2exe """ setup( options = {"py2exe": {"compressed": 1, "optimize": 0, "bundle_files": 1, } }, zipfile = None, windows=["ABC_ihm.py"] ) """ setup(zipfile = None, windows = [{"script": "NBS.py"}], name='NBS shell exec', descriptio...
Python
#----------------------------------------------------------------------------- # Name: Class_ABC_Crypt.py # Purpose: Classe de cryptage des logs # # # Author: ABCPro # # Created: 2007/04/18 # Copyright: (c) 2007 # Licence: <your licence> #----------------------------...
Python
#!/usr/bin/python # -*- coding: iso-8859-1 -*- from asyncore import dispatcher import sys, time, socket class Server( dispatcher ): def __init__(self): dispatcher.__init__(self) self.create_socket( socket.AF_INET, socket.SOCK_STREAM ) self.bind( ( '', 50000 ) ) self.listen(1) try: ...
Python
from distutils.core import setup import py2exe """ setup( options = {"py2exe": {"compressed": 1, "optimize": 0, "bundle_files": 1, } }, zipfile = None, windows=["ABC_ihm.py"] ) """ setup(zipfile = None, windows = [{"script": "NBSSurv.py",}], name='NBS Surv', description...
Python
#!/usr/bin/python # -*- coding: iso-8859-1 -*- from asyncore import dispatcher import sys, time, socket class Server( dispatcher ): def __init__(self): dispatcher.__init__(self) self.create_socket( socket.AF_INET, socket.SOCK_STREAM ) self.bind( ( '', 50000 ) ) self.listen(1) try: ...
Python
# This is Python example on how to use Mongoose embeddable web server, # http://code.google.com/p/mongoose # # Before using the mongoose module, make sure that Mongoose shared library is # built and present in the current (or system library) directory import mongoose import sys # Handle /show and /form URIs. def Even...
Python
# Copyright (c) 2004-2009 Sergey Lyubka # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
Python
#!/usr/bin/env python import time t = time.time() u = time.gmtime(t) s = time.strftime('%a, %e %b %Y %T GMT', u) print 'Content-Type: text/javascript' print 'Cache-Control: no-cache' print 'Date: ' + s print 'Expires: ' + s print '' print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
Python
#!/usr/bin/env python import time t = time.time() u = time.gmtime(t) s = time.strftime('%a, %e %b %Y %T GMT', u) print 'Content-Type: text/javascript' print 'Cache-Control: no-cache' print 'Date: ' + s print 'Expires: ' + s print '' print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
Python
import sys, re css = open( sys.argv[1] , 'r' ).read() # remove comments - this will break a lot of hacks :-P css = re.sub( r'\s*/\*\s*\*/', "$$HACK1$$", css ) # preserve IE<6 comment hack css = re.sub( r'/\*[\s\S]*?\*/', "", css ) css = css.replace( "$$HACK1$$", '/**/' ) # preserve IE<6 comment hack # url() doesn't ...
Python
#!/usr/bin/python import unittest import lcm class TestLcmMemq(unittest.TestCase): def test_timeout(self): lcm_obj = lcm.LCM("memq://") # No messages available, timeout 0. self.assertEqual(0, lcm_obj.handle_timeout(0)) # No messages available, short timeout. self.assertEq...
Python
#!/usr/bin/python import os import random import tempfile import unittest import lcm import client class TestLcmFile(unittest.TestCase): def setUp(self): # tempfile.mktemp() is deprecated, so make our own random filename :-/ self.log_filename = os.path.join(tempfile.gettempdir(), "lcm_...
Python
#!/usr/bin/python import unittest import lcmtest class TestBools(unittest.TestCase): def test_bool(self): """Encode a bools_t message, then verify that it decodes correctly. Also check that the decoded fields are all of type bool. """ msg = lcmtest.bools_t() msg.one_bool =...
Python
import sys import time import array import random import select import lcm import lcmtest import lcmtest2 def _lcm_handle_timeout(lc, ms): try: rfds, wfds, efds = select.select([lc.fileno()], [], [], ms * 1e-3) if rfds: lc.handle() return True return False exce...
Python
#!/usr/bin/python import threading import time import unittest import lcm class TestLcmThreads(unittest.TestCase): def test_handle_and_publish(self): """Worker thread calls LCM.handle(), while main thread calls LCM.publish() """ lcm_obj = lcm.LCM("memq://") def on_msg(chan...
Python
#!/usr/bin/python import struct import unittest import lcmtest class TestByteArray(unittest.TestCase): def test_construct(self): """Verify that a message constructed without explicitly setting any fields can be encoded.""" msg = lcmtest.byte_array_t() msg.encode() def test_fi...
Python
#!/usr/bin/env python import sys import subprocess import getopt import time client = "c" server = "c" tests = { \ "c" : ("c/server", "c/client"), "python" : (None, "python python/client.py"), "cpp" : ("cpp/server", "cpp/client"), } def dotest(client_name, server_name): global te...
Python
import sys import lcm from exlcm import example_t if len(sys.argv) < 2: sys.stderr.write("usage: read-log <logfile>\n") sys.exit(1) log = lcm.EventLog(sys.argv[1], "r") for event in log: if event.channel == "EXAMPLE": msg = example_t.decode(event.data) print("Message:") print(" ...
Python
import lcm from exlcm import example_t def my_handler(channel, data): msg = example_t.decode(data) print("Received message on channel \"%s\"" % channel) print(" timestamp = %s" % str(msg.timestamp)) print(" position = %s" % str(msg.position)) print(" orientation = %s" % str(msg.orientat...
Python
import lcm import time from exlcm import example_t lc = lcm.LCM() msg = example_t() msg.timestamp = int(time.time() * 1000000) msg.position = (1, 2, 3) msg.orientation = (1, 0, 0, 0) msg.ranges = range(15) msg.num_ranges = len(msg.ranges) msg.name = "example string" msg.enabled = True lc.publish("EXAMPLE", msg.enco...
Python
# This example demonstrates how to use LCM with the Python select module import select import lcm from exlcm import example_t def my_handler(channel, data): msg = example_t.decode(data) print("Received message on channel \"%s\"" % channel) print(" timestamp = %s" % str(msg.timestamp)) print(" po...
Python
import commands from distutils.core import setup, Extension from distutils import msvccompiler import os sources = [ \ "module.c", "pyeventlog.c", "pylcm.c", "pylcm_subscription.c", os.path.join("..", "lcm", "lcm.c"), os.path.join("..", "lcm", "lcm_udp.c"), os.path.join("..", "lcm", "lcm_fi...
Python
import os from ._lcm import LCM, LCMSubscription class Event(object): """Data structure representing a single event in an LCM EventLog """ def __init__ (self, eventnum, timestamp, channel, data): """ Initializer """ self.eventnum = eventnum """Event number""" ...
Python
#!/usr/bin/python # # Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
Python
#!/usr/bin/python # # Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
Python
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
Python
# This is the version of this source code. manual_verstr = "1.5" auto_build_num = "211" verstr = manual_verstr + "." + auto_build_num try: from pyutil.version_class import Version as pyutil_Version __version__ = pyutil_Version(verstr) except (ImportError, ValueError): # Maybe there is no pyutil insta...
Python
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
Python
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright 2011 Google Inc. All Rights Reserved. """Multi-credential file store with lock support. This module implements a JSON credential store where multiple credentials can be stored in one file. That file supports locking both in a single process and across processes. The credential themselves are keyed off o...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- # # Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
Python
# Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright 2011 Google Inc. All Rights Reserved. """Locked file interface that should work on Unix and Windows pythons. This module first tries to use fcntl locking to ensure serialized access to a file, then falls back on a lock file if that is unavialable. Usage: f = LockedFile('filename', 'r+b', 'rb') f....
Python
__version__ = "1.0c2"
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
import Cookie import datetime import time import email.utils import calendar import base64 import hashlib import hmac import re import logging # Ripped from the Tornado Framework's web.py # http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09 # # Tornado is licensed under the Apache Licen...
Python
# Copyright (C) 2007 Joe Gregorio # # Licensed under the MIT License """MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.o...
Python
# Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
Python
__version__ = "1.0c2"
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
Python
#!/usr/bin/env python # Copyright (c) 2010, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this l...
Python
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
Python
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
Python
from __future__ import generators """ httplib2 A caching http interface that supports ETags and gzip to conserve bandwidth. Requires Python 2.3 or later Changelog: 2007-08-18, Rick: Modified so it's able to use a socks proxy if needed. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright...
Python
#!/usr/bin/env python # # Copyright (c) 2002, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this ...
Python