What is Anaconda?

Anaconda is the leading open data science platform powered by Python. The open source version of Anaconda is a high performance distribution of Python and R and includes over 100 of the most popular Python, R and Scala packages for data science.


Reference : https://www.continuum.io/downloads#osx


Install Anaconda




'Python' 카테고리의 다른 글

[PyQt] Event Handling  (0) 2017.02.02
[PyQt] Make a window with "Hello World"  (0) 2017.02.02
[PyQt] What is PyQt?  (0) 2017.02.02
Install PyCharm IDE  (0) 2017.02.02
[Python] print "Hello world"  (0) 2017.02.02

[PyQt] Event Handling - Mouse clicked

Target

1. Create a button "Click" on window

2. When the button is pressed, display message dialog "Button Clicked"


Source code

import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *

class MyWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("PyQT")
self.setGeometry(100, 100, 300, 400)

btn1 = QPushButton("Click", self)
btn1.move(20, 20)
btn1.clicked.connect(self.btn1_clicked)

def btn1_clicked(self):
QMessageBox.about(self, "Message", "Button clicked")

if __name__ == "__main__":
app = QApplication(sys.argv)
myWindow = MyWindow()
myWindow.show()
app.exec_()


Result



'Python' 카테고리의 다른 글

Anaconda Python  (0) 2017.02.02
[PyQt] Make a window with "Hello World"  (0) 2017.02.02
[PyQt] What is PyQt?  (0) 2017.02.02
Install PyCharm IDE  (0) 2017.02.02
[Python] print "Hello world"  (0) 2017.02.02

[PyQt] Make a window with "Hello World"


Target

1. Create a window

2. print "Hello World" on the window


Source code


import sys

from PyQt5.QtWidgets import *


app = QApplication(sys.argv)

label = QLabel("Hello World")

label.show() 

app.exec_() 



Result


QT library is located in C:\Users\JC\Anaconda3\Lib\site-packages\PyQt5 in my windows machine








'Python' 카테고리의 다른 글

Anaconda Python  (0) 2017.02.02
[PyQt] Event Handling  (0) 2017.02.02
[PyQt] What is PyQt?  (0) 2017.02.02
Install PyCharm IDE  (0) 2017.02.02
[Python] print "Hello world"  (0) 2017.02.02

PyQt - What is PyQt?

About PyQt

PyQt is one of the two most popular Python bindings for the Qt cross-platform GUI/XML/SQL C++ framework (another binding is PySide). PyQt developed by Riverbank Computing Limited. Qt itself is developed as part of the Qt Project. PyQt provides bindings for Qt 4 and Qt 5. PyQt is distributed under a choice of licences: GPL version 2, GPL version 3, or a commercial license.


PyQt Documentation

Current documentation is available for PyQt4 and PyQt5.

The PyQt Wiki contains more actively-updated information and examples:


Developing with PyQt and PyKDE

For more information please see this reference site.

Reference site:

https://wiki.python.org/moin/PyQt

'Python' 카테고리의 다른 글

Anaconda Python  (0) 2017.02.02
[PyQt] Event Handling  (0) 2017.02.02
[PyQt] Make a window with "Hello World"  (0) 2017.02.02
Install PyCharm IDE  (0) 2017.02.02
[Python] print "Hello world"  (0) 2017.02.02

Install PyCharm IDE

Download URL

https://www.jetbrains.com/pycharm/

I have downloaded Community version




Install on Ubuntu 14.04


> tar zxf tar zxf pycharm-community-2016.3.2.tar.gz

Files is extracted in this directory pycharm-community-2016.3.2. Please see Install-Linux-tar.txt for more information


Initial Setup

./pycharm.sh in {installation home}/bin


Create project







'Python' 카테고리의 다른 글

Anaconda Python  (0) 2017.02.02
[PyQt] Event Handling  (0) 2017.02.02
[PyQt] Make a window with "Hello World"  (0) 2017.02.02
[PyQt] What is PyQt?  (0) 2017.02.02
[Python] print "Hello world"  (0) 2017.02.02

[Python] print "Hello World"


Source code

 

print ('Hello World')





Result




'Python' 카테고리의 다른 글

Anaconda Python  (0) 2017.02.02
[PyQt] Event Handling  (0) 2017.02.02
[PyQt] Make a window with "Hello World"  (0) 2017.02.02
[PyQt] What is PyQt?  (0) 2017.02.02
Install PyCharm IDE  (0) 2017.02.02