본문 바로가기

Python 배우기50

변수_정의 variable_definition.py a = b = 2 # 이것을 "chained assignment"라 하며, 값(value) 2를 변수 "a"와 "b"에 할당합니다. print("a = " + str(a)) # str(a)는 변수 "a"를 문자열(string)로 변환합니다. print("b = " + str(b)) greetings = "greetings" print("greetings = " + str(greetings)) greetings = "Good Morning" print("greetings = " + str(greetings)) 산출물(Output) a = 2b = 2greetings = greetingsgreetings = Good Morning 2016. 3. 6.
Python Object and Classes 파이썬 객체와 클래스 파이썬 객체와 클래스 Python Object and Classes객체 및 클래스 만들기 Creating object and classes파이썬은 객체-지향 언어입니다. 파이썬에서, 모든 것은 객체인데, 즉, int , str , bool even modules, functions도 또한 객체입니다. 객체 지향 프로그래밍은 프로그램을 만들기 위하여 객체들을 사용하며, 이들 객체는 데이터와 동작을 저장합니다. Python is an object-oriented language. In python everything is object i.e int , str , bool even modules, functions are also objects.Object oriented programming use obje.. 2016. 3. 5.
Running phython programs 파이썬 프로그램은 2가지 방식으로 가동되는데, 첫 째 방식은 파이썬 shell에 명령을 직접 타이핑하는 것이고 두 번째 방식은 파일에 저장된 프로그램을 가동하는 것입니다. 대부분은 파이일 저장된 프로그램을 가동합니다. You can run python programs in two ways, first by typing commands directly in python shell or run program stored in a file. But most of the time you want to run programs stored in a file.notepad (또는 다른 text editor)를 사용하여, 문서 디렉토리(C:\Users\YourUserName\Documents)에 hello.py란 이름.. 2016. 3. 5.
Applications for Python 파이썬 적용 파이썬 적용 Applications for Python파이썬은 많은 적용 영역에서 사용됩니다. 아래 예제가 있습니다. Python is used in many application domains. Here's a sampling.수 천 가지의 제3자의 파이썬용 모이 Python Package Index에 있습니다. The Python Package Index lists thousands of third party modules for Python.웹 및 인터넷 개발 Web and Internet Development파이썬은 웹개발에 관한 많은 선택기회를 제공합닝다. Python offers many choices for web development:Django 및 Pyramid와 같은 프레임웍Flask .. 2016. 3. 5.
PyQt5 Beginner tutorial PyQt5 Beginner tutorial Introduction 이것은 PyQt5 초보자 교본입니다. 이 교본은 가장 짧은 기간 안에 PyQt를 이해하고 실행하는 것을 도울 것입니다. 파이썬에 대한 기초 지식을 갖고 있는 것으로 가정합니다.PyQt는 크로스 플랫폼 GUI 툴킷 Qt의 파이썬 바인딩 입니다. 이것은 GUI 프로그래밍에 대한 파이썬의 옵션 중 하나입니다. 대안으로는 PySide, PyGTK, wxPython 및 Tkinter가 있습니다.PyQt는 비 상업용 응용 프로그램 (GPL 라이센스)의 개발에 가장 적합합니다. 상업적 응용 프로그램을 개발하려면, PySide가 매우 인기가 있으며, LGPL 라이센스하에 배포됩니다.This is a PyQt5 beginner tutorial. It wi.. 2016. 3. 4.
First Steps 6. 첫 번째 단계 First Steps 파이썬으로 전통적인 'Hello World' 프로그램을 실행하는 방법을 볼 수 있습니다. 이 방법을 통하여 파이썬 프로그램을 작성하고, 저장하고, 가동하는 방법을 배울 수 있습니다. 프로그램 실행을 위한 파이썬 사용 방법으로는 대화형 인터프리터 프롬프트를 사용하는 방법과 소스파일을 사용하는 방법 두 가지가 있습니다. 지금 이러한 방법을 모두 사용하는 방법을 볼 수 있습니다. We will now see how to run a traditional 'Hello World' program in Python. This will teach you how to write, save and run Python programs. There are two ways of usin.. 2016. 1. 5.