python-3.4

PyInstaller Kivy ClockApp Example Issue

為{幸葍}努か 提交于 2019-12-10 23:59:57
问题 ===Edit End=== Whew! Thanks to the suggestions below & (8) hours of compiling & recompiling I was able to fix my issues doing a combination of things: Understanding how Pyinstaller hooks are required in order to call out the modules correctly. Ensuring that all input file & output file file locations exist on the same drive. At my company, our system environment variables are set to a mapped network drive by default, I had to ensure all user environment variable settings were mapped to 'C:\'

pip in virtualenv gets ConnectTimeoutError

♀尐吖头ヾ 提交于 2019-12-10 23:23:33
问题 I'm current attempting to install packages in a python-3.4 virtualenv and I keep getting these Retry/TimeoutErrors. (backend)root@XXXX:/var/virtualenvs# pip3 install -r backend-freeze.txt Collecting cassandra-driver==2.7.2 (from -r backend-freeze.txt (line 1)) Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4d7faf94a8>, 'Connection to pypi

Tkinter filedialog is stealing focus and not returning it without “Alt-tab” in Python 3.4.1

不问归期 提交于 2019-12-10 22:59:25
问题 First question here, but I've answered a few, so hopefully there'll be enough information here for someone to give me a pointer in the right direction. I have the following code that will form part of an app I'm building. I want users to be able to enter their name and evaluate some images, scoring them using the slider. In order to define the source of the images, I want to select a folder using filedialog.askdirectory so the user can verify the correct folder containing the images. I've

error while installing mysql using pip (python)

自作多情 提交于 2019-12-10 22:09:41
问题 i'm new boy in python, recently i am starting to understand Django, for some basic functonality i have to use pip, while i try to install some package using pip it Give error live Belove. Thank you For Your Kind Responce. C:\Users\Artoon>pip install mysql Collecting mysql Collecting MySQL-python (from mysql) Using cached MySQL-python-1.2.5.zip Building wheels for collected packages: MySQL-python Running setup.py bdist_wheel for MySQL-python ... error Complete output from command c:\paython36

configparser not working in Python 3.4, NoSectionError but works fine in PyCharm

寵の児 提交于 2019-12-10 20:02:04
问题 I worked on a Python 3.4 script in PyCharm 4.5. (repo: https://github.com/Djidiouf/bbot ) In it, I used import configparser without any problem for retrieving some values in a config.cfg: config = configparser.RawConfigParser() config.read('config.cfg') server = config.get('bot_configuration', 'server') channel = config.get('bot_configuration', 'channel') botnick = config.get('bot_configuration', 'botnick') port = config.getint('bot_configuration', 'port') Now, I want to deploy it on a Debian

How to build Python 3.4.6 from source?

旧街凉风 提交于 2019-12-10 19:39:00
问题 I want to install Python 3.4.6 but it is only available in source code format. The install options on the official Python website are Gzip'd source tarball and XZ compressed source tarball. I have never installed Python this way before so I don't know what to do. How do I install Python and what file do I download? https://www.python.org/downloads/release/python-346/ 回答1: Download the source as a .tar.gz Extract the source using a program such as 7-Zip Follow the instructions in PCbuild

How to print non-BMP Unicode characters in Tkinter (e.g. 𝄫)

左心房为你撑大大i 提交于 2019-12-10 19:06:34
问题 So, today I was making shortcuts for entering certain Unicode characters. All was going well. Then, when I decided to do these characters (in my Tkinter program; they wouldn't even try to go in IDLE), 𝄫 and 𝄪, I got a strange unexpected error and my program started deleting just about everything I had written in the text box. That's not acceptable. Here's the error: _tkinter.TclError: character U+1d12b is above the range (U+0000-U+FFFF) allowed by Tcl I realize most of the Unicode characters

How to overcome Python 3.4 NameError: name 'basestring' is not defined

。_饼干妹妹 提交于 2019-12-10 17:14:31
问题 I've got a file called hello.txt in the local directory along side the test.py, which contains this Python 3.4 code: import easywebdav webdav = easywebdav.connect('192.168.1.6', username='myUser', password='myPasswd', protocol='http', port=80) srcDir = "myDir" webdav.mkdir(srcDir) webdav.upload("hello.txt", srcDir) When I run this I get this: Traceback (most recent call last): File "./test.py", line 196, in <module> webdav.upload("hello.txt", srcDir) File "/Library/Frameworks/Python.framework

Django 1.7: serve a pdf -file (UnicodeDecodeError)

倖福魔咒の 提交于 2019-12-10 15:58:05
问题 I'm trying to serve a PDF file with django 1.7, and this is basically the code that "should" work... it certainly works if I change the content_type to 'text' and download a .tex file with it, but when I try it with a binary file, I get "UnicodeDecodeError at /path/to/file/filename.pdf 'utf-8' codec can't decode byte 0xd0 in position 10: invalid continuation byte" def download(request, file_name): file = open('path/to/file/{}'.format(file_name), 'r') response = HttpResponse(file, content_type

PyQt5 + Python 3: passing lists, dicts as signal arguments across threads

这一生的挚爱 提交于 2019-12-10 15:56:30
问题 I am using pyqtSignal to send a python list as an argument from worker thread to main thread. When does qt create a copy of the object being passed as argument. According to: http://www.embeddeduse.com/2013/06/29/copied-or-not-copied-arguments-signals-slots/ the qt should make a copy of the object. However, in the example below the main thread can change the contents of the list being sent from another thread. import sys import time from PyQt5.QtCore import QThread, QObject, pyqtSlot,