Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(9)  |  Derive(0)  |  Import(4)

src/l/a/lalf-3.0a0/lalf/ocruser.py   lalf(Download)
import time
 
from lalf.util import month, clean_filename, path
from lalf.user import User
from lalf import ocr
                    # the email is replaced by an image, get it
                    r = session.get(e("td a img").eq(0).attr("src"))
                    with open(path(self.img), "wb") as f:
                        f.write(r.content)
 
                    # Pass it through the OCR
                    self.mail = ocr.totext(path(self.img))
                    if ocr.toolong(path(self.img)):

src/l/a/lalf-3.0a0/lalf/__init__.py   lalf(Download)
import sys
 
from lalf.util import path
from lalf.bb import load, BB
from lalf import config
def main():
    # File output
    filehandler = logging.FileHandler(path('debug.log'))
    filehandler.setLevel(logging.DEBUG)
    logger.addHandler(filehandler)
 
    config.read(path("config.cfg"))
 
    logging.info("Génération du fichier SQL")
    with open(path("phpbb.sql"), "w") as f:
        bb.dump(f)
 

src/l/a/lalf-3.0a0/lalf/forum.py   lalf(Download)
from pyquery import PyQuery
 
from lalf.util import clean, path
from lalf.node import Node
from lalf.forumpage import ForumPage
                os.makedirs("images/forums")
            self.icon = "images/forums/{id}{ext}".format(id=self.newid, ext=ext)
            with open(path(self.icon), "wb") as f:
                f.write(r.content)
        else:

src/l/a/lalf-3.0a0/lalf/bb.py   lalf(Download)
from lalf.smileys import Smileys
from lalf.config import config
from lalf.util import path
from lalf import phpbb
from lalf import sql
    def save(self):
        logger.info("Sauvegarde de l'état courant.")
        with open(path("save.pickle"), "wb") as f:
            pickle.dump(self, f)
 
    """
    try:
        with open(path("save.pickle"), "rb") as f:
            bb = pickle.load(f)
    except FileNotFoundError: