[15:26:47] gigimon is now online
[15:29:14] ink08 is now away
[15:31:08] xa4a is now online
[15:34:05] ink08 is now away
[15:34:05] ink08 is now online
[15:34:05] ink08 is now online
[15:34:17] ink08 is now online
[15:34:36] Typhon is now away
[15:35:52] Typhon is now online
[15:39:19] ink08 is now online
[15:44:22] ink08 is now online
[15:47:28] xa4a is now away
[15:47:29] xa4a is now away
[15:49:24] ink08 is now online
[15:54:27] ink08 is now online
[15:59:30] ink08 is now online
[16:04:32] ink08 is now online
[16:09:28] best is now xa
[16:09:35] ink08 is now online
[16:10:41] Typhon is now away
[16:10:56] Typhon is now online
[16:11:09] xa4a is now away
[16:11:13] xa4a is now online
[16:14:38] ink08 is now online
[16:18:17] ink08 is now away
[16:18:17] ink08 is now away
[16:18:17] ink08 is now away
[16:19:02] ink08 is now away
[16:19:02] ink08 is now online
[16:19:03] ink08 is now online
[16:47:24] mishok13 is now online
[16:47:24] blw0rm is now away
[16:47:24] emese is now online
[16:47:24] best is now xa
[16:47:24] gigimon is now online
[16:47:24] deisler is now away
[16:47:24] bliznezz is now online
[16:47:24] Typhon is now online
[16:47:24] lollo is now online
[16:47:24] ink08 is now online
[16:47:24] Tony is now online
[16:47:24] xa4a is now online
[16:47:24] magic_pony is now online
[16:47:24] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[16:49:46] blw0rm is now xa
[16:49:55] ink08 is now online
[16:54:05] bliznezz is now away
[16:54:05] bliznezz is now away
[16:54:57] ink08 is now online
[16:55:01] xa4a is now online
[16:55:42] xa4a is now online
[16:55:56] gigimon is now offline
[17:00:00] ink08 is now online
[17:00:34] blw0rm is now online
[17:05:03] ink08 is now online
[17:05:42] gigimon is now online
[17:08:56] Typhon is now away
[17:09:35] bliznezz is now away
[17:09:35] bliznezz is now online
[17:10:05] ink08 is now online
[17:11:26] emese is now offline
[17:13:09] dicos is now online
[17:14:31] py_two is now away
[17:15:08] ink08 is now online
[17:15:22] dicos is now offline
[17:16:00] Typhon is now online
[17:20:10] ink08 is now online
[17:25:13] ink08 is now online
[17:29:32] Typhon is now away
[17:30:15] ink08 is now online
[17:30:17] Typhon is now online
[17:30:36] Typhon is now away
[17:35:18] ink08 is now online
[17:36:23] bliznezz is now away
[17:36:23] bliznezz is now away
[17:39:54] lollo is now online
[17:39:55] lollo is now away
[17:40:09] lollo is now online
[17:40:20] ink08 is now online
[17:40:36] Typhon is now away
[17:41:49] xryun is now online
[17:42:39] Typhon is now away
[17:42:42] Typhon is now online
[17:45:23] ink08 is now online
[17:46:24] xryun is now offline
[17:46:36] xryun is now online
[17:50:26] ink08 is now online
[17:52:46] xa4a is now away
[17:52:47] xa4a is now away
[17:53:56] xa4a is now away
[17:53:59] xa4a is now away
[17:54:06] xa4a is now away
[17:54:12] xa4a is now online
[17:55:02] py_two is now offline
[17:55:29] ink08 is now online
[18:00:10] xryun is now offline
[18:00:12] xryun is now online
[18:00:13] xryun is now online
[18:00:14] xryun is now online
[18:00:15] xryun is now online
[18:00:15] xryun is now online
[18:00:32] ink08 is now online
[18:04:14] xa4a is now online
[18:05:30] lollo is now away
[18:05:34] ink08 is now online
[18:05:42] bliznezz is now away
[18:05:42] bliznezz is now online
[18:09:14] xa4a is now online
[18:10:38] ink08 is now online
[18:15:30] lollo is now xa
[18:15:40] ink08 is now online
[18:19:08] lollo is now online
[18:20:42] ink08 is now online
[18:23:50] xryun is now offline
[18:23:53] xryun is now online
[18:23:55] xryun is now online
[18:23:57] xryun is now online
[18:23:58] xryun is now online
[18:24:00] xryun is now online
[18:25:46] ink08 is now online
[18:30:48] ink08 is now online
[18:34:08] gigimon is now offline
[18:35:51] ink08 is now online
[18:40:54] ink08 is now online
[18:43:30] obivan is now online
[18:45:57] ink08 is now online
[18:46:49] xa4a is now online
[18:47:01] xryun is now offline
[18:47:45] ink08 is now away
[18:47:45] ink08 is now away
[18:47:45] ink08 is now away
[18:47:49] obivan: Вроде как запили многопоточность, но все равно интерфейс остается недоступен и уже на проверке 200-го сообщения зависает.
[18:47:52] obivan: -_-
[18:47:59] obivan: запилил*
[18:50:39] ink08 is now online
[18:50:40] ink08 is now online
[18:51:00] ink08 is now online
[18:51:55] obivan: а у меня надо проверить почти тысячу сообщений
[18:52:14] obivan is now offline
[18:53:05] obivan is now online
[18:53:50] lollo is now away
[18:56:04] ink08 is now online
[18:56:05] Typhon is now away
[18:56:06] xa4a: почему зависает?
[18:56:10] xa4a: что происходит на 199-м?
[18:56:10] lollo is now online
[18:56:28] Typhon is now online
[18:56:49] xa4a is now online
[18:59:02] obivan is now offline
[19:01:00] obivan is now online
[19:01:05] ink08 is now online
[19:01:32] livevil is now online
[19:02:05] obivan: получаю сообщения с мыла через pop3, проверяю их на определенный адрес. Интерфейс может зависнуть и раньше, не обязательно на 200-том
[19:02:50] obivan: Думаю интерфейс просто не успевает угнаться за выполнением функции проверки
[19:03:07] obivan: думал вынести в отдельный поток
[19:04:09] obivan: теперь обычно зависает позже
[19:04:21] obivan: =/
[19:04:38] xa4a: ты определись, что именно зависает
[19:04:44] xa4a: и почему
[19:04:50] xa4a: тогда будет просто решить
[19:05:57] obivan: одну минуту
[19:06:05] livevil is now offline
[19:06:08] ink08 is now online
[19:10:42] ink08 is now away
[19:10:42] ink08 is now away
[19:10:43] ink08 is now away
[19:11:00] obivan: Зависает интерфейс PyQt программы
[19:11:11] ink08 is now away
[19:11:41] Typhon is now away
[19:12:21] ink08 is now away
[19:12:21] ink08 is now online
[19:12:22] ink08 is now online
[19:13:06] obivan: Не успеваеет за функцией проверки писем.
[19:13:25] Typhon is now online
[19:14:56] Typhon is now offline
[19:16:14] ink08 is now online
[19:19:19] ink08 is now away
[19:19:20] ink08 is now away
[19:21:13] ink08 is now away
[19:21:13] ink08 is now online
[19:21:14] ink08 is now online
[19:21:16] ink08 is now online
[19:22:14] lollo is now away
[19:26:19] ink08 is now online
[19:28:01] xa4a: а почему они связаны?
[19:28:37] xa4a: когда у тебя qt-приложение, то у тебя есть один главный поток - поток интерфейса
[19:28:50] xa4a: ты в нём не должен делать ничего, кроме изменения интерфейса
[19:29:06] xa4a: и должен эти свои изменения делать как можно быстрее и отдавать управление обратно интерфейсу
[19:29:23] xa4a: а изменения делать - не когда тебе захочится из других поток, и тем более не ждать другие потоки
[19:29:28] xa4a: а только в ответ на Qt сигнал
[19:29:29] xa4a: ы
[19:29:44] xa4a: тогда ничего зависать не будет
[19:31:21] ink08 is now online
[19:32:14] lollo is now xa
[19:34:12] plz is now online
[19:36:10] plz: Приветствую. Подскажите по данному вопросу - http://python.su/forum/topic/21379/
[19:36:24] ink08 is now online
[19:36:32] lollo is now online
[19:37:22] plz: задача тривиальная, но после усиленного изучения django в голове полная каша, и никак не могу придти к решению сам =(
[19:38:34] widg is now online
[19:38:54] obivan: 404
[19:39:43] obivan: ???
[19:39:44] obivan: https://github.com/f4nt/django-yaba%2C
[19:40:22] plz: https://github.com/f4nt/django-yaba
[19:40:48] plz: запятая в урл попала
[19:41:22] obivan: https://github.com/f4nt/django-yaba/blob/master/README
[19:41:27] ink08 is now online
[19:41:44] plz: я читал это, но там ничего вразумительго по подключению и запуску нет
[19:41:56] plz: установил через pip
[19:42:03] plz: но как запустить?
[19:43:02] widg is now питоню
[19:43:04] obivan: runserver???
[19:43:38] plz: и?
[19:44:07] obivan: переходишь в блог
[19:44:14] plz: через пайп оно ставиться как пакет
[19:44:22] plz: как его к джанго подключить в виде приложения?
[19:46:30] ink08 is now online
[19:46:38] obivan: http://kamedov.ru/razvertyvanie-django-proekta-s-pomoshyu-buildout/
[19:46:43] obivan: не это случаем?
[19:48:42] plz: хм, попробую, спасибо
[19:49:57] Tony is now offline
[19:50:06] Tony is now online
[19:51:32] ink08 is now online
[19:52:10] mishok13 is now offline
[19:52:41] widg: Добрый вечер
[19:53:07] widg: подскажите с кодировкой плиз
[19:53:23] widg: # -*- coding: utf-8 -*-
import pymysql
conn = pymysql.connect(host='127.0.0.1', user='root', passwd='Qwe12345', db='tablo', charset='utf8')
cur = conn.cursor()
cur.execute("SELECT nk,floor,nomination,name FROM tablo")
# print cur.description
# r = cur.fetchall()
# print r
# ...or...
for r in cur:
print (r)
cur.close()
conn.close()
[19:53:31] widg: выводит
[19:53:38] widg: >>>
(u'111', u'1', u'\u0412\u0440\u0430\u0447', u'\u0418\u0432\u0430\u043d\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447')
(u'222', u'2', u'\u0412\u0440\u0430\u0447', u'\u041f\u0435\u0442\u0440\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0433\u043e\u0440\u043e\u0432\u0438\u0447')
>>>
[19:53:50] plz: obivan: да ну нафиг, топорная вещь какая-то =)
[19:54:30] obivan: encode/decode('utf-8')?
[19:55:05] widg: база в utf-8
[19:55:51] widg: obivan: или я не понял что ты спрашиваешь
[19:56:15] obivan: ясно
[19:56:16] obivan: попробуй
[19:56:28] obivan: твоя строка.encode('utf-8')
[19:56:35] ink08 is now online
[19:56:44] obivan: или твоя строка.decode('utf-8')
[19:57:33] deisler is now offline
[19:57:40] widg: :-| что то я не догоняю, надо что то дописать?
[19:58:04] ink08 is now away
[19:58:04] ink08 is now away
[19:58:05] ink08 is now away
[19:58:07] xryun is now online
[19:58:38] blw0rm is now dnd
[20:00:13] obivan: хотя...
[20:00:15] obivan: что я несу
[20:00:38] widg: obivan: :-D
[20:00:40] obivan: тут переменная со строкой.decode('unicode_escape')
[20:00:57] obivan: ИвановИванИванович
[20:01:00] obivan: :)
[20:01:32] obivan: Врач
[20:01:39] ink08 is now away
[20:01:40] obivan: \u0412\u0440\u0430\u0447
[20:01:57] widg: :-)
[20:01:59] obivan: получилось?
[20:02:27] widg: ты мне скажи как мне в програме дописать что?
[20:02:47] obivan: r
[20:02:53] obivan: (r)
[20:03:30] obivan: переменную допиши просто перед .decode('unicode_escape')
[20:03:43] widg: r.decode('unicode_escape').encode('utf8')
[20:03:50] widg: вот так
[20:04:17] obivan: можно без encode
[20:06:42] ink08 is now away
[20:06:51] obivan is now offline
[20:07:36] widg: r = r.decode('unicode_escape')
[20:07:43] obivan is now online
[20:07:49] widg: так можно писать?
[20:08:12] obivan: вроде дожно работать
[20:08:19] widg: Traceback (most recent call last):
File "C:/Users/admin/Desktop/py/sql", line 8, in <module>
r = r.decode('unicode_escape')
NameError: name 'r' is not defined
[20:08:38] widg: # -*- coding: utf-8 -*-
import pymysql
conn = pymysql.connect(host='127.0.0.1', user='root', passwd='Qwe12345', db='tablo', charset='utf8')
cur = conn.cursor()
cur.execute("SELECT nk,floor,nomination,name FROM tablo")
# print cur.description
# r = cur.fetchall()
r = r.decode('unicode_escape')
# print r
# ...or...
for r in cur:
print (r)
cur.close()
conn.close()
[20:08:47] widg: может не туда
[20:11:45] ink08 is now away
[20:12:48] obivan: может
[20:15:57] obivan: питон недавно учишь?
[20:16:10] widg: да
[20:16:18] widg: 2ой день
[20:16:23] widg: :-)
[20:16:24] obivan: )))
[20:16:45] obivan: получается там?
[20:16:47] ink08 is now away
[20:17:27] widg: переставлю строки пока всё тоже самое
[20:18:46] obivan: что пишешь?
[20:19:11] widg: пока пробую
[20:19:46] widg: # -*- coding: utf-8 -*-
import pymysql
conn = pymysql.connect(host='127.0.0.1', user='root', passwd='Qwe12345', db='tablo', charset='utf8')
cur = conn.cursor()
cur.execute("SELECT nk,floor,nomination,name FROM tablo")
# print cur.description
# r = cur.fetchall()
# r = r.decode('unicode_escape')
# print r
# ...or...
r = r.decode('unicode_escape').encode(sys.stdout.encoding)
for r in cur:
print (r)
cur.close()
conn.close()
[20:19:58] widg: Traceback (most recent call last):
File "C:/Users/admin/Desktop/py/sql", line 11, in <module>
r = r.decode('unicode_escape').encode(sys.stdout.encoding)
NameError: name 'r' is not defined
>>>
[20:21:50] ink08 is now away
[20:22:12] lollo is now away
[20:24:16] obivan is now online
[20:25:21] obivan is now offline
[20:25:44] obivan is now online
[20:26:53] ink08 is now away
[20:27:18] lollo is now online
[20:28:31] xryun is now xa
[20:31:56] ink08 is now away
[20:32:14] plz: widg: разобрался?
[20:32:18] lollo is now away
[20:32:29] obivan: почти
[20:32:34] obivan: там кортеж а не строка
[20:32:50] plz: в самом цикле декодируйте
[20:33:12] obivan: да
[20:36:58] ink08 is now away
[20:36:59] widg: ура
[20:37:03] widg: работает
[20:42:01] ink08 is now away
[20:42:18] lollo is now xa
[20:42:46] plz: покажи как сделали
[20:43:27] widg: # -*- coding: utf-8 -*-
import pymysql
conn = pymysql.connect(host='127.0.0.1', user='root', passwd='Qwe12345', db='tablo', charset='utf8')
cur = conn.cursor()
cur.execute("SELECT nk,floor,nomination,name FROM tablo")
# print cur.description
# r = cur.fetchall()
# print r
# ...or...
for r in cur:
print (r)
cur.close()
conn.close()
[20:43:33] widg: ой не то
[20:43:51] widg: # -*- coding: utf-8 -*-
import pymysql
conn = pymysql.connect(host='127.0.0.1', user='root', passwd='Qwe12345', db='tablo', charset='utf8')
cur = conn.cursor()
cur.execute("SELECT nk,floor,nomination,name FROM tablo")
# print cur.description
# r = cur.fetchall()
# r = r.decode('unicode_escape')
# print r
# ...or...
for r in cur:
str_r = str(r)
decode_r = str_r.decode('unicode_escape')
print decode_r
cur.close()
conn.close()
[20:43:55] widg: вот как
[20:45:43] xryun is now offline
[20:46:10] lollo is now online
[20:47:01] plz: for i in cur:
print(unicode(str(i), 'unicode_escape'))
[20:47:04] ink08 is now away
[20:47:42] widg: ещё кароче
[20:47:42] obivan is now offline
[20:48:33] widg: import pymysql
conn = pymysql.connect(host='127.0.0.1', user='root', passwd='Qwe12345', db='tablo', charset='utf8')
cur = conn.cursor()
cur.execute("SELECT nk,floor,nomination,name FROM tablo")
for r in cur:
print(unicode(str(r), 'unicode_escape'))
cur.close()
conn.close()
[20:48:39] widg: тоже работает
[20:50:43] widg: подскажите PyQt в окне новая форма что мне надо выбрать
майн виндовс
виджет
диалог
[20:50:54] bliznezz is now offline
[20:51:02] obivan is now online
[20:51:27] obivan: я всегда выбирал MainWIndow
[20:51:33] xa4a: obivan: перестань глупости советовать
[20:51:42] widg: :-)
[20:52:03] widg: мне табличку надо вывести в гуи
[20:52:07] ink08 is now away
[20:52:21] xa4a: QTableWidget
[20:52:24] obivan: щито такого?
[20:52:24] xa4a is now online
[20:52:43] obivan: в маин виндове?
[20:53:02] obivan is now offline
[20:53:05] xa4a: QT умеет само с базой работать
[20:53:13] xa4a: само подсасывать данные и рисовать их в табличку
[20:53:13] widg: да ну
[20:53:25] obivan is now online
[20:53:41] widg: с MySQL'ем
[20:53:52] xa4a: сирьйозна
[20:53:55] xa4a: http://qt-project.org/doc/qt-4.8/qsqlrelationaltablemodel.html
[20:54:02] widg: QTableWidget таково у меня нету
[20:54:21] widg: QTabWidget есть
[20:54:30] xa4a: тебе остаётся только сделать свой QTableView, куда бы модель смогла данные выплёвывать и вперед!
[20:54:44] xa4a: QTableWidget не нужен.
[20:55:08] xa4a: QTableView + QSqlRelationalTableModel
[20:55:37] widg: дык что мне выбрать то новой форме
[20:56:13] widg: Qt Designer
[20:57:09] ink08 is now away
[20:57:56] obivan: Main Window можешь
[20:58:25] obivan: xa4a, похоже у меня функция выполняется не в отдельной потоке
[20:58:42] obivan: а в потоке интерфейса
[20:58:47] xa4a: obivan: видимо, да
[20:59:06] obivan: хотя все сделал по туториалу
[20:59:16] obivan: ну ладно
[21:02:12] ink08 is now away
[21:07:15] ink08 is now away
[21:10:58] xa4a is now away
[21:11:00] xa4a is now away
[21:12:18] ink08 is now away
[21:17:21] ink08 is now away
[21:22:23] ink08 is now away
[21:25:52] livevil is now online
[21:27:25] ink08 is now away
[21:27:29] obivan: close failed in file object destructor:
[21:27:33] obivan: хм
[21:32:28] ink08 is now away
[21:37:32] ink08 is now away
[21:39:27] RanWise is now ** This message was blocked by the ICQ server **
[21:42:35] ink08 is now away
[21:47:13] best is now offline
[21:47:38] ink08 is now away
[21:48:46] obivan: event_for_wait.wait()
AttributeError: 'int' object has no attribute 'wait'
[21:48:50] obivan: ????
[21:52:41] ink08 is now away
[21:57:44] ink08 is now away
[22:02:04] plz: обновил пост, может у кого-нибудь есть соображения на этот счет? http://python.su/forum/topic/21379/
[22:02:47] ink08 is now away
[22:05:27] plz: блин, чет я поспешил =) нашел. это внутренний тег djago-yaba
[22:07:04] obivan: QPixmap: It is not safe to use pixmaps outside the GUI thread
[22:07:18] obivan: ну да я пытаюсь изменить гуй
[22:07:25] obivan: как игнорить эту ошибку?
[22:07:50] ink08 is now away
[22:08:45] levsha is now online
[22:10:11] obivan is now dnd
[22:10:54] lollo is now away
[22:12:28] lollo is now online
[22:12:53] ink08 is now away
[22:17:56] ink08 is now away
[22:18:37] best is now xa
[22:22:59] ink08 is now away
[22:28:01] ink08 is now away
[22:33:04] ink08 is now away
[22:34:25] livevil is now away
[22:34:47] livevil is now online
[22:38:07] ink08 is now away
[22:40:36] lollo is now away
[22:43:10] ink08 is now away
[22:48:13] ink08 is now away
[22:49:02] lollo is now online
[22:49:44] gigimon is now online
[22:50:00] xa4a is now away
[22:50:05] xa4a is now online
[22:50:28] xa4a: obivan: зачем игнорить
[22:50:34] xa4a: оно же не просто так пишет
[22:50:42] obivan: уже по другому делаю
[22:53:16] ink08 is now away
[22:57:24] lollo is now away
[22:58:19] ink08 is now away
[23:03:21] ink08 is now away
[23:06:55] xa4a is now online
[23:06:57] xa4a is now online
[23:07:24] lollo is now xa
[23:08:24] ink08 is now away
[23:09:37] obivan is now offline
[23:11:36] widg is now offline
[23:13:27] ink08 is now away
[23:15:57] py_two is now away
[23:17:41] xa4a is now online
[23:18:04] py_two is now offline
[23:18:30] ink08 is now away
[23:21:36] py_two is now away
[23:21:50] py_two is now offline
[23:21:53] py_two is now away
[23:21:54] py_two is now offline
[23:22:40] xa4a is now online
[23:23:01] gigimon is now online
[23:23:32] ink08 is now away
[23:24:29] gigimon is now online
[23:24:42] lollo is now online
[23:28:35] ink08 is now away
[23:29:35] py_two is now away
[23:32:55] py_two is now offline
[23:33:38] ink08 is now away
[23:36:38] py_two is now away
[23:38:41] ink08 is now away
[23:43:44] ink08 is now away
[23:48:47] ink08 is now away
[23:53:50] ink08 is now away
[23:58:53] ink08 is now away
[23:59:14] xa4a is now online