def hello():
print('Hello, World!')
v = 'hello()'
eval(v)
v = 'hello'
eval(v)()
xxx.xxx.xxx.xxx demo
<VirtualHost *:9000>ServerName demoWSGIDaemonProcess demo python-path=/home/user/PycharmProjects/mysite/venv/lib/python3.6/site-packagesWSGIProcessGroup demoWSGIScriptAlias / /home/user/PycharmProjects/mysite/mysite/wsgi.py process-group=demo<Directory /home/user/PycharmProjects/mysite/mysite><Files wsgi.py>Require all granted</Files></Directory>Alias /media/ /home/user/PycharmProjects/mysite/media/<Directory /home/user/PycharmProjects/mysite/media>Require all granted</Directory>Alias /static/ /home/user/PycharmProjects/mysite/.static_root/<Directory /home/user/PycharmProjects/mysite/.static_root>Require all granted</Directory><Directory /home/user/PycharmProjects/mysite/venv/lib/python3.6/site-packages>Require all granted</Directory><Directory /home/user/PycharmProjects/mysite>Require all granted</Directory><Directory /home/user/PycharmProjects/mysite/demo>Require all granted</Directory>ErrorLog /home/user/PycharmProjects/mysite/logs/error.logCustomLog /home/user/PycharmProjects/mysite/logs/access.log combined</VirtualHost>
SET PYTHONHOME=%OSGEO4W_ROOT%\apps\Python37
PATH %OSGEO4W_ROOT%\apps\Python37\Scripts;%PATH%2. pyQgis-PyCharm.bat
SET OSGEO4W_ROOT=C:\Program Files\QGIS 3.4
SET QGIS_HOME=%OSGEO4W_ROOT%
CALL "%OSGEO4W_ROOT%\bin\o4w_env.bat"
CALL "%OSGEO4W_ROOT%\bin\qt5_env.bat"
CALL "%OSGEO4W_ROOT%\bin\py3_env.bat"
set PATH=%OSGEO4W_ROOT%\apps\qgis-ltr;%PATH%
set PATH=%OSGEO4W_ROOT%\apps\qgis-ltr\bin;%PATH%
set PATH=%OSGEO4W_ROOT%\apps\qgis-ltr\python;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%/apps/qgis-ltr
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis-ltr\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
set PYTHONPATH=%OSGEO4W_ROOT%\apps\qgis-ltr\python
SET PYCHARM="C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.2\bin\pycharm64.exe"
start "PyCharm aware of QGIS" /B %PYCHARM% %*3. PyCharm
# -*- coding:utf-8 -*- import sys from PyQt5 import QtCore from PyQt5.QtWidgets import QCalendarWidget, QLabel, QDialog class CalendarDialog(QDialog): def __init__(self, _parent): super(CalendarDialog, self).__init__(_parent) self.setModal(True) self.cal = QCalendarWidget(self) self.initUI() self.adjustSize() self.setFixedSize(self.width(), self.height()) self.selectedDate = None def initUI(self): self.cal.setGridVisible(True) self.cal.move(20, 20) self.cal.clicked[QtCore.QDate].connect(self.showDate) self.lbl = QLabel(self) date = self.cal.selectedDate() self.lbl.setText(date.toString()) self.lbl.move(20, 200) self.setWindowTitle('Calendar') self.show() def showDate(self, date): self.lbl.setText(date.toString()) self.close() def main(): app = QApplication(sys.argv) ex = Example() sys.exit(app.exec_()) if __name__ == '__main__': main()
# -*- coding: utf-8 -*- import sys from PyQt5.QtWidgets import QMainWindow, QApplication, QWidgetAction, QMenu class Example(QMainWindow): def __init__(self): super().__init__() self.toolbar = self.addToolBar('Toolbar') self.widgetAction = QWidgetAction(self.toolbar) self.menu = QMenu(self.toolbar) self.action1 = self.menu.addAction('action1') self.action2 = self.menu.addAction('action2') self.widgetAction.setText('demo') self.widgetAction.setMenu(self.menu) self.toolbar.addAction(self.widgetAction) self.action1.triggered.connect(self.onAction1) self.action2.triggered.connect(self.onAction2) self.widgetAction.triggered.connect(self.triggered) self.setGeometry(300, 300, 300, 200) self.setWindowTitle('Toolbar') def triggered(self, e): if self.widgetAction.text() == 'onAction1': self.action1.trigger() elif self.widgetAction.text() == 'onAction2': self.action2.trigger() def onAction1(self): print('onAction1') self.widgetAction.setText('onAction1') def onAction2(self): print('onAction2') self.widgetAction.setText('onAction2') if __name__ == '__main__': app = QApplication(sys.argv) ex = Example() ex.show() sys.exit(app.exec_())
docker-composer.yml version: '3.1' services: redmine: image: redmine restart: always container_na...