Questions tagged [python-3.4]
The version of the Python programming language released on March 16, 2014. For issues that are specific to Python 3.4. Use the more generic [python] and [python-3.x] tags where possible.
2,587
questions
0
votes
0
answers
35
views
How would I add a glow around the circle below in python turtle?
I have got my code for the circle but I just need the glow to look like a white shining sun but I have tried so many different things and none have worked
This is my code so far and it creates a ...
0
votes
0
answers
41
views
inpython SyntaxError: EOL while scanning string literal using platform.techsmart.codes trying to play a sound while start is pressed
I was trying to play an intro sound when the start button is pressed but no matter what i did the error kept popping up.
This was my code that was getting an error :
def intro():
intro = ['...
0
votes
0
answers
57
views
Python pip not working as expected in 3.4
C:\Python34\lib\site-packages_distutils_hack_init_.py", line 158, in pip_imported_during_build cls.frame_file_is_setup(frame) for frame, line in traceback.walk_stack(None) AttributeError: '...
0
votes
1
answer
54
views
Generic list in NamedTuple in python3.4
I want to define new type which holds list of generic values. For example (simplified as much as possible):
from typing import NamedTuple, TypeVar, List
T = TypeVar('T')
MyType = NamedTuple('MyType', [...
4
votes
1
answer
695
views
Is there a way to use python argparse with nargs='*', choices, AND default?
My use case is multiple optional positional arguments, taken from a constrained set of choices, with a default value that is a list containing two of those choices. I can't change the interface, due ...
0
votes
2
answers
375
views
Python 3.4 ImportError: No module named 'typing' when importing requests
I've been trying to install different versions compatible for the request module for Python 3.4 (I know the python version is outdated, but is the one available for the OS I'm currently using.)
Using ...
-1
votes
1
answer
221
views
How to select a random word from a txt file in python version 3.4?
**
I have a txt file called 'All_Words' and it consist of 2000 words and i'm making a hangman so i needed to choose a random word i've already thought of picking a random number from 0 to 2000 and ...
0
votes
0
answers
191
views
pip install failing with no error on private pypi and normal pypi
with and without a pip.ini file my pip install is failing. when running an individual pip install with -vvv I get this as the trace output, the output is the same when trying to pip install -r req.txt....
-1
votes
1
answer
63
views
Assign a object to the pointer the node is referring
class BinarySearchTree:
def __init__(self, value=None, left=None, right=None):
self.value = value
self.left = left
self.right = right
def insert(self, value) -> ...
0
votes
1
answer
219
views
Python program I wrote in python3.7/Windows 7 won't run in Windows XP
I wrote a python 3.7 script under Windows 7 and compiled it using auto-py-to-exe. I can run the .exe with no problem in my computer but when my co-worker tries to run it under Windows XP there is an ...
1
vote
2
answers
231
views
Python3.4 convert int16_t string to signed float
I apologise if this question has already been answered here. My searches have turned up similar questions but I have been unsuccessful in applying them to my situation.
I receive data via serial ...
-4
votes
2
answers
46
views
Identifying and recording data from screen [closed]
I am new to coding and I might be in over my head. I want to write a program that automatically generates the best optimal in-game choice for me to make. I can manage the calculations, but I need a ...
-4
votes
2
answers
170
views
I can't run a while loop in Python 3.9
So I am a beginner in python and I have found a book about its basics. The book is based on python 3.4. The book is trying to teach me while loops. When I try to enter the code which is:
counter = 5
...
1
vote
2
answers
1k
views
Python3.4 installation erroring out on MacOS Big Sur
After installing python 3.4.3 and on running the command python3.4, it gives an error:
dyld: Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
...
0
votes
3
answers
1k
views
.bat file doesn't work | Shows invalid syntax when .bat file is run | Python 3.4.0
The .bat file:
@py C:\Users\Universal Sysytem\Desktop\Python Scripts (Automate the Boring Stuff)\Automate the Boring Stuff with Python\TestProgram(.bat batch file and shebang line usecase).py %*
@...
0
votes
1
answer
220
views
Why do different python versions have different behaviors on stand output print?
The Python 3.4 and Python 3.8/3.9 are different when I try execute below statement:
print('\u212B')
Python 3.8/3.9 can print it correctly.
Å
Python 3.4 will report an exception:
Traceback (most ...
0
votes
0
answers
216
views
RuntimeError: Python 3.5 or later is required while doing any kind of PIP operation
I am new to python, started to learn a week ago. I installed Python 3.4.
Installed Eclipse and Pydev and configured the environment.
My current task is to communicate to an instrument, I downloaded ...
1
vote
0
answers
956
views
PIP RuntimeError: Python 3.5 or later is required
I have been trying to install PIP on my python 3.4.0 on windows but none of the solutions work. I have tried python get-pip.py pip==19.1 and getting get-pip.py from https://bootstrap.pypa.io/3.4/get-...
1
vote
2
answers
55
views
I defined my funtion but it wont run. why not?
My function that asks the user to input a 7 character number. but when i define it, it wont run. reason why? any help is appreciated.
def eticketNum():
while True:
eTickNum = input('please ...
0
votes
0
answers
985
views
Python3 -- 256 AES decryption and encryption + brute force is what I am attempting to acheive. Why am I running into an error?
The Error Is:
** Traceback (most recent call last): File "256AESKeyCracker.py", line 10, in cipher = AES.new(key,AES.MODE_EAX) AttributeError: module 'Crypto.Cipher.AES' has no attribute '...
2
votes
1
answer
130
views
Python 3.4 Syntax error and how to fix it
While the following line is accepted on Python 3.6, On Python 3.4 I am getting a syntax error:
struct.pack_into('q' * len(GeoFence_lat_list)*2,buff,264,*GeoFence_lat_list, *GeoFence_lon_list)
Where ...
1
vote
3
answers
249
views
Unable to install pip package on Python3.4.0 windows 7 64 bit
I am using the command python -m pip install on the python34 folder but its giving me the following error:
Error while finding specs for 'pip._main_'{<class attribute error'>: 'module' object ...
0
votes
0
answers
392
views
Python3.4 venv - Global packages included
I'm using a project where python3.4 is required for some other dependencies.. Downloaded version 3.4.10 from python.org, installed it and it works fine. Then I'm creating a Pyhthon3.4.10 venv and ...
0
votes
0
answers
175
views
Error when creating new environment with python 3.4 in Anaconda
I'm trying to set up a Anaconda environment with Python=3.4 but I have been having a hard time to do it.
I have tried it with and without default packages
(base) C:\Users\Fabio Diuana>conda create -...
0
votes
1
answer
610
views
Pandas corresponding column values when using min
I am having a dictionary-like below. I want to find the minimum by age and need to find the corresponding first name and last name of it.
[ {
"firstname": "abc",
"...
3
votes
1
answer
162
views
How to play only one music file in pygame?
I've loaded 2 music files as a wav into my program, but when I do pygame.mixer.music.play(-1) it plays both over the top of each other, but I only want one to play, and then the other at another time.
...
0
votes
1
answer
1k
views
Starting a new line of text in pygame
How would I make it so that I can start a new line of text with pygame? For example if I have a variable and it has lots of text that doesn't all fit on the screen, how can I make it so that it ...
1
vote
1
answer
65
views
How to add an object according to a variable?
I was wondering how would I add "thing" (name of object) onto the screen each time the "dodged" (score) increases by 1? So I would want the number of "things" to be equal ...
0
votes
1
answer
320
views
Can't downgrade Python 3.4's sqlite3.sqlite_version on Ubuntu 20.04 via pyenv to run tox test
Setup:
Ubuntu 20.04
Pyenv
libsqlite3-dev v3.31.1
I'm trying to downgrade sqlite3.sqlite_version for Python 3.4 to run some tox tests, and am having no luck. I'm on Ubuntu 20.04. I was able to ...
1
vote
0
answers
139
views
How to handle Spring Security Authentication popup in Robot framework
How to feed the Username and password values in Spring security authentication Popup using Robot framework(python,selenium),as html body is blank and i am unable to inspect the elements of the popup....
1
vote
3
answers
7k
views
How to downgrade Python 3.6.9 to 3.4.x on Ubuntu 18.04?
Ubuntu 18.04 comes with Python 3.6.9 by default. In order to run a project, I need to install Python 3.4.x. Is there a way to downgrade Python 3.6.9 to 3.4.x? Many thanks in advance!
0
votes
1
answer
38
views
Refer output to hashtable : Error Handling
How can i handle the error if the key is not available in eqType
i mean like if its not in the eqType dict then return the equip['type'] value
eqType ={
10023: 'ONT-SFU',
10040: 'OLT1T3',
...
0
votes
1
answer
1k
views
pip doesn't work after upgrade on Python 3.4 (Windows 10). How to downgrade?
I upgraded pip on Python 3.4 to last version (20.1.1) and new pip doesn't work with message
RuntimeError: Python 3.5 or later is required
How to return back old version of pip?
I can't upgrade ...
0
votes
1
answer
432
views
How to get $0 value in Webbot using python
Please find below code am trying to get Seller Proceeds value in Website, but it has $0, when i tried in console $0.value am getting 598.08 but am getting Calculate when i tried using this
sel_proc = ...
0
votes
0
answers
60
views
Can a Python program with a file run on any computer?
I'm at the very start of my journey of Python learning.
We were given a .csv file for an assignment. I wrote the program, it's working fine but I have to send my program to my professor.
The ...
2
votes
6
answers
1k
views
How to print two lists of different size side by side?
I have two lists of different length that I want to print side by side, separated by a tab. As an example:
a_list = ["a","b","c","d","e"]
b_list = ["f","g","h","i","j","k","l","m","n"]
I tried:
...
0
votes
1
answer
94
views
Fetch hourly data
I am calculating the hour delta as below
ct = time.time() * 1000 // milliseconds
pt = ct - (1000*60*60*1) // 1 hour
The above code will give me the hour timestamp. How can I use the above code to ...
0
votes
1
answer
653
views
How to install additional pip for python3.4?
I usually use python 3.7 on my ubuntu but in order to run a brainfuck jupyter notebook (from https://github.com/robbielynch/ibrainfuck) I need to run python3.4. So I installed python3.4 using
wget ...
0
votes
1
answer
3k
views
Ignoring ensurepip failure: pip requires SSL/TLS - Python 3.4.X with pyenv on OS X
I am trying to install python version 3.4.10 via pyenv but I get the error Ignoring ensurepip failure: pip 9.0.1 requires SSL/TLS. For python versions after 3.4.10 (e.g.: 3.5.9), it did succeed ...
0
votes
2
answers
2k
views
builtins.NameError: name 'answer' is not defined
This is the problem that I was getting.
I know I have to define answer globally, and I did it.
I don't know where did I do wrong.
Here is the part of code I wrote.
Please help me with this, I've just ...
0
votes
1
answer
125
views
How to install justext package using Conda install when virtual environment is created?
I created virtual environment for python 3.4 version.I cant able to use pip from my network. I cant able to download files even. So i created virtual environment and started to install packages using ...
0
votes
1
answer
958
views
How would you delete a specific row without using panda in Python 3.4.4?
I've tried to find ways to delete a selected row but the only way I could do so is with panda.
What I want to do is to delete an entire row that matches with the csv library (errors are fine since I'...
1
vote
3
answers
148
views
Create Multiple Python Dictionaries from a List?
I am having a difficult time splitting an LDIF file with thousands of entries into multiple dictionaries. For example, my LDIF file looks like:
dn: value
ou: value
objectClass: value
entryUUID: value
...
-1
votes
1
answer
236
views
tkinter button different command for loop in dictionary not working [duplicate]
I'm using a dictionary to store my buttons as you can see in the main method. The 'self.tables' is a list with the names of tables. Therefore 'i' in the for loop is the name of a table, which is shown ...
1
vote
1
answer
159
views
Iterate dictionary parallelly to reduce processing time and improve performance
I am having a dictionary like this:
{
"ABC": {
"Name": "ABC",
"dates": {
"2019-12-13": [
{
"Status": "P"
},
{
"Status": "A"
}
...
1
vote
1
answer
445
views
Decode cp1252 stdout with umlauts
I want to list the services running on the local Windows machine. For that, I am using this code:
with Popen(["net", "start"], stdout=PIPE, stderr=PIPE) as p:
stdout, stderr = p.communicate() # ...
-2
votes
1
answer
165
views
How to Print a string from a specific line in a text file based off if my input exists in an alternate text file
I am making a program that is almost like a chatbot. That being said, there are 3 modes to it: menu mode, teach mode, and chat mode.
In teach mode, it asks for the user to enter some input (ex. what ...
3
votes
0
answers
588
views
Variable type annotations and default initialization to None
I am refactoring a small codebase from Python 2 to 3 (3.4 specifically), and one of the ways I can make the codebase better and more maintainable is by solving all the little PEP based complaints that ...
0
votes
1
answer
286
views
How do i multiply certain elements in a list by 0?
I am wondering how i would multiply certain items in a list to 0 to make the list blank again. I need to do this because of a round system I have implemented into my code.
totalround1 = [coupleAtotal ...
0
votes
1
answer
61
views
Onekeypress AttributeError?
(Python 3.4, in Windows XP Professional)
In a turtle program that I started recently, Onekeypress doesn´t work. I tried other things like "onekey" or "onekeyrelease", but they don´t work either. It ...