Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
""" | |
Inspired by http://code.activestate.com/recipes/578253-an-entry-with-autocompletion-for-the-tkinter-gui/ | |
Changes: | |
- Fixed AttributeError: 'AutocompleteEntry' object has no attribute 'listbox' | |
- Fixed scrolling listbox | |
- Case-insensitive search | |
- Added focus to entry field | |
- Custom listbox length, listbox width matches entry field width | |
- Custom matches function | |
""" |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import math | |
import re | |
# dado um título e lista de listas no formato | |
# ('<variável>', '<tipo>', '<descricao>', '<fórmula>') | |
# pede-se qual variável calcular, pede os valores e dá o resultado | |
# qualquer valor vazio saida da função |
# coding: utf-8 | |
""" | |
Converts Paradox databases to Python objects or CSV. | |
You don't need any dependency (except Python) to make this module work. | |
This module is incomplete but reads most Paradox `.DB` files. | |
If this module is not fast or complete enough for you, consider using pxview. | |
""" |
"Program execution context" | |
import warnings | |
class SwizzleContext(object): | |
"""Type switching context object base class | |
Supports the context manager protocol to switch the instance from a | |
MutableContext to the protected Context. | |
""" |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
SalesOrder.prototype.decorate = function(decorator) { | |
var override | |
for (override in decorator) { | |
if (decorator.hasOwnProperty(override)) { | |
var oldfunc = this[override] | |
var decfunc = decorator[override] | |
var newfunc = function() { | |
var args = Array.prototype.slice.call(arguments) |
This Gist has been moved to https://github.com/lbgists/ttk-progressbar-example.py.
''' expressionString = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 END IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 END ''' | |
def parse_expression(expressionString): | |
expressionStringArray = filter(None,expressionString.split("END")) | |
''' expressionStringArray[0] = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 | |
expressionStringArray[1] = IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 ''' | |
for expression in expressionStringArray: | |
expConditionResult = expression.strip().split("RETURN") |
# coding: utf-8 | |
from weasyprint import HTML, CSS | |
def get_page_body(boxes): | |
for box in boxes: | |
if box.element_tag == 'body': | |
return box |
from webclient import * | |
server = "http://myaccount.erpnext.com/server.py" | |
user = "your user name" | |
password = "your password" | |
login() | |
customer = get_doc("Customer", customer_name) |