This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .zopeskel configuration file for Buildout projects | |
# This file can contain preferences for zopeskel. | |
# To do so, uncomment the lines that look like: | |
# variable_name = Default Value | |
[DEFAULT] | |
# Expert Mode? (What question mode would you like? (easy/expert/all)?) | |
expert_mode = easy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the package name | |
name = 'collective.mypackage' | |
# get packages from the package name: '1.2.3' -> ['1','1.2','1.2.3'] | |
>>> packages = [name.rsplit('.',x)[0] for x in reversed(range(len(name.split('.'))))] | |
>>> packages | |
['collective', 'collective.mypackage'] | |
>>> # all except the last are treated as namespace_packages | |
>>> namespace_packages = packages[:-1] | |
>>> namespace_packages | |
['collective'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
print "Insisting on fixing user input" | |
first = 1 | |
second = 2 | |
third = 3 | |
while 1: | |
try: | |
extra = input("What is the extra value? ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
def menu(): | |
''' Main menu to choose an item ''' | |
chosen_element = 0; | |
print "#############################################################################" | |
print "######## ########" | |
print "######## My Company Super Client Number 1' ########" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
def cls(): | |
''' Python script main function ''' | |
print "\n" * 100 | |
if __name__ == '__main__': | |
''' Python script main function ''' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
import sys | |
sys.exit() |
NewerOlder