重新格式化所有的代码,并且导入需要的内容
This commit is contained in:
parent
4378401bbf
commit
27e4ac217a
|
@ -0,0 +1,23 @@
|
||||||
|
# for n in range(2, 10):
|
||||||
|
# for x in range(2, n):
|
||||||
|
# if n % x == 0:
|
||||||
|
# print(n, 'equals', x, '*', n // x)
|
||||||
|
# break
|
||||||
|
# else:
|
||||||
|
# # loop fell through without finding a factor
|
||||||
|
# print(n, 'is a prime number')
|
||||||
|
#
|
||||||
|
# #
|
||||||
|
# for num in range(2, 10):
|
||||||
|
# if num % 2 == 0:
|
||||||
|
# print("Found an even number", num)
|
||||||
|
# continue
|
||||||
|
# print("Found a number", num)
|
||||||
|
|
||||||
|
# alphabet = ["A", "B", "C"]
|
||||||
|
# for x in alphabet:
|
||||||
|
# print(x)
|
||||||
|
|
||||||
|
strOssez = "ossez.com"
|
||||||
|
for x in strOssez:
|
||||||
|
print(x)
|
|
@ -0,0 +1 @@
|
||||||
|
from .core import hmm
|
|
@ -0,0 +1,12 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from . import helpers
|
||||||
|
|
||||||
|
def get_hmm():
|
||||||
|
"""Get a thought."""
|
||||||
|
return 'hmmm...'
|
||||||
|
|
||||||
|
|
||||||
|
def hmm():
|
||||||
|
"""Contemplation..."""
|
||||||
|
if helpers.get_answer():
|
||||||
|
print(get_hmm())
|
|
@ -0,0 +1,7 @@
|
||||||
|
def get_answer():
|
||||||
|
"""Get an answer."""
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
print("Hello Python")
|
|
@ -0,0 +1,25 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Learn more: https://github.com/kennethreitz/setup.py
|
||||||
|
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
|
||||||
|
with open('README.rst') as f:
|
||||||
|
readme = f.read()
|
||||||
|
|
||||||
|
with open('LICENSE') as f:
|
||||||
|
license = f.read()
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='sample',
|
||||||
|
version='0.1.0',
|
||||||
|
description='Sample Package Python Tutorials',
|
||||||
|
long_description=readme,
|
||||||
|
author='Kenneth Reitz',
|
||||||
|
author_email='me@kennethreitz.com',
|
||||||
|
url='https://github.com/kennethreitz/samplemod',
|
||||||
|
license=license,
|
||||||
|
packages=find_packages(exclude=('tests', 'docs'))
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||||
|
|
||||||
|
import sample
|
Loading…
Reference in New Issue