コード例 #1
0
from p01 import Student

stu = Student("zhangsan", 20)
stu.say()
コード例 #2
0
# _*_ coding:UTF-8 _*_

# 选择性导入,模块内容
from p01 import Student, sayHello

stu = Student('wujian')
stu.say()
sayHello('BOX')
コード例 #3
0
ファイル: p04.py プロジェクト: zhouzhou0/python_zhou
from p01 import Student, sayhello

stu = Student('xiaoming', 18)
sayhello()
コード例 #4
0
ファイル: p04.py プロジェクト: sczhan/study
from p01 import Student, sayhello

stu = Student("p04", 13)
stu.say()
sayhello()
コード例 #5
0
ファイル: p03.py プロジェクト: zhangchenxin/learn-python
from p01 import Student, sayhello

stu = Student("xiaohong", 23)
stu.Say()
sayhello()
コード例 #6
0
ファイル: p04.py プロジェクト: whs2313/tulingxueyuan2
from p01 import Student, say

stu = Student()
stu.sayHello()
say()
コード例 #7
0
ファイル: p04.py プロジェクト: muGithub/tulingxueyuan
from p01 import Student, sayHello

stu = Student("Guoyou")

stu.say()

sayHello()
コード例 #8
0
from p01 import Student, sayHello

stu = Student("p04")
stu.say()
sayHello()
コード例 #9
0
from p01 import Student, sayHello
stu = Student('xixi', 18)
stu.say()
sayHello()
コード例 #10
0
ファイル: p03.py プロジェクト: pythonkd/python
from p01 import Student
stu = Student("lili", 18)
stu.say()
コード例 #11
0
ファイル: p03.py プロジェクト: rarkzy/learn_python
from p01 import Student, Sayhello

stu = Student("小强", 22)
stu.say()
Sayhello()
コード例 #12
0
ファイル: 02.py プロジェクト: CcCc1996/myprogram
# -*- coding: utf-8 -*-
# Author: IMS2017-MJR
# Creation Date: 2019/5/5
import p01  # 导入这个模块,就相当于将模块中的代码粘贴到了这里并执行一遍,所以其中print等代码会直接执行,最好不要有。
stu = p01.Student("cjx", 22)
stu.say()
p01.sayHello()

print("#" * 50)

import p01 as p
stu = p.Student("anran", 22)
stu.say()
p.sayHello()

print("#" * 50)

from p01 import Student, sayHello
stu = Student("cwy", 0)  # 此时p01.的前缀都不需要,否则会报错
stu.say()
sayHello()
コード例 #13
0
from p01 import Student, sayHello

stu = Student("Jim", 28)

print(stu.age)
stu.say()

sayHello()
コード例 #14
0
ファイル: p05.py プロジェクト: libzhu/learnPython
# coding=utf-8

from p01 import Student, sayHello

stu = Student("xiaoxiao", 28)
stu.say()

sayHello()
コード例 #15
0
from p01 import Student, sayHello
stu = Student("Zhou", 55)
stu.say()
sayHello()
コード例 #16
0
from p01 import Student, sayHello

stu = Student("wtj")
stu.say()

sayHello()
コード例 #17
0
from p01 import Student, sayhello

stu = Student()
stu.into()

sayhello()
コード例 #18
0
ファイル: p04.py プロジェクト: tianzfssq/Python
from p01 import Student, sayHello

stu = Student("xiaojing", 20)

stu.say()

sayHello()

print(__name__)
コード例 #19
0
ファイル: p04.py プロジェクト: zhoutianjiang/startLearnPython
from p01 import Student, sayHello

stu = Student("yuyu", 11)
stu.say()

sayHello()
コード例 #20
0
ファイル: p04.py プロジェクト: xp1978594666/python-
from p01 import Student, sayHello


stu = Student()

stu.say()


sayHello()
コード例 #21
0
from p01 import Student, sayhello

stu = Student()
stu.say()

sayhello()
コード例 #22
0
ファイル: p02.py プロジェクト: Lkamanda/rccode
'''
调用模块 p01
'''

import p01

stu = p01.Student("xiaolin", 22)
stu.say()
p01.sayHello()

print('*' * 10)

# 对命名错误的包借助于工具 importlib 导入
import importlib

# 相当于导入一个包为01 的包,并把导入的模块赋值给了xiaolin
xiaolin = importlib.import_module('01')

stu1 = xiaolin.Student('kaka', 25)
stu1.say()
xiaolin.sayHello()

from p01 import Student
stu2 = Student()
stu2.say()