Data dodania Pytanie
2017-08-09 15:08 How to convert some code Python2 to Python3.x? »
I'm working with animation in my game, but I've got an error.. Can you help me pls?) Or do I need to add all of my code? class Animation: def __...
(1) odpowiedzi
2017-08-08 22:08 YourName Code (Traceback Error) »
I'm trying to find out why I'm getting a Traceback Error on this very simple code. I'm using 2.7.13. # YourName.py name = input("What is your name...
(0) odpowiedzi
2017-08-08 20:08 I need Python 2.6 for a course but when I try to install it says there is nothing to install »
When I try to install python 2.6 it says " The installer could not install the software because there was no software found to install". I need this P...
(1) odpowiedzi
2017-08-07 00:08 How to open a file with a known encoding on both Python2 and 3? »
When opening a file known to be utf-8 on a script that needs to be Py2 & 3 compatible. Is there a nicer way to do it than this: if sys.version_in...
(2) odpowiedzi
2017-08-06 00:08 IndexError: list index out of range, Python »
Traceback (most recent call last): File "outpost.py", line 434, in <module> quee.put((i.split('@')[1],i,p)) IndexError: list index out of ...
(0) odpowiedzi
2017-08-03 21:08 Find execution time for subprocess.Popen python »
Here's the Python code to run an arbitrary command returning its stdout data, or raise an exception on non-zero exit codes: proc = subprocess.Popen( ...
(1) odpowiedzi
2017-08-03 03:08 pyqt passing signals between classes »
I have seen similar questions but none of them seems to work in order to solve my problem. Basically, my intention is very simple. I try to pass the ...
(1) odpowiedzi
2017-08-02 02:08 A number smaller than negative infinity in python? »
This is possible in python2: None < float('-inf') Also, it always returns True However, on python3, this throws TypeError: unorderable type...
(1) odpowiedzi
2017-08-01 02:08 unable to open jupyter notebook due to accent characters »
I just installed Anaconda, which also install jupyter. I'm unable to run jupyter notebook on windows 8.1 command, because it seems to be using the def...
(1) odpowiedzi
2017-07-30 19:07 How looks program's code that send file on FTP server every 2 minutes? (Python 2) »
How looks code that send file text.txt on FTP-server and append text in it every 2 minutes? I am interested in Python 2. Thanks. ...
(0) odpowiedzi
2017-07-27 23:07 Error Packing and Unpacking bytes in Python »
My code has an error(see below code) after I enter in a value. I can pack the bits but the unpacking doesn't work. Any suggestions? I don't fully unde...
(1) odpowiedzi
2017-07-27 15:07 ModuleNotFoundError: No module named 'Scaling' »
I am trying to install pyevolve module in Windows CMD. I tried 3 ways to install it. pip install pyevolve easy_install pyevolve cd C:/xxxx/xxxx/xxx...
(1) odpowiedzi
2017-07-24 22:07 How to install python-tk in my docker image »
I get this error when I run my python script in my docker image ImportError: No module named _tkinter, please install the python-tk package So I tr...
(0) odpowiedzi
2017-07-24 15:07 Dumping unicode with YAML »
I'm creating yaml files from csv's that have a lot of unicode characters in them but I can't seem to get it to dump the unicode without it giving me a...
(1) odpowiedzi
2017-07-24 02:07 counting the number of terms that are not repeated in the python list »
the question was actually like Write a program that says the number of terms to be replaced to get all the numbers same in the list ex a=[1,1,2,1,1,4,...
(4) odpowiedzi
2017-07-21 11:07 How to prevent AttributeError for undeclared variables and methods and fix __getattr__ method call multiple times? »
class Foo(object): def __init__(self): self.a = 1 self.c = 0 def __getattr__(self, name): self.c += 1 pr...
(4) odpowiedzi
2017-07-20 13:07 Airflow - Why is there no trigger rule "One done"? Am i missing something? »
I am trying to do this flow in an airflow dag. Task 1: check if file exists in s3 (s3 sensor). If no new file is found, skip to task 4. Task 2: if t...
(1) odpowiedzi
2017-07-19 15:07 using class attributes function in class method - python »
I'm trying to use this code in python: class A: func = lambda: "go away" @classmethod def apply(cls): cls.func() A.apply() And ...
(2) odpowiedzi
2017-07-19 04:07 Multi-line print statements with variables: Python 2 versus Python 3 »
I'm learning Python from Zed A. Shaw's Learn Python the Hard Way, and the book strongly recommends Python 2 rather than Python 3. So far, however, I'v...
(1) odpowiedzi
2017-07-18 18:07 use elements from a large list till the list becomes empty (python) »
I m new to python , I have looping issue to get chuck of data for a list. I have large list where I need to use chunk of it until it becomes entirely...
(0) odpowiedzi
2017-07-16 11:07 serialwin32.py and serialutil.py error when run Invensense demo python client »
Good days, I'm new to python and trying to run a demo provided by Invensense.(9-axis MPU9250 connects a STM32F407G discovery board, I used code and py...
(1) odpowiedzi
2017-07-15 05:07 Please explain the working of the following code in Python 2. What is the use of end? Also __future__ library »
from __future__ import print_function if __name__ == '__main__': n = int(raw_input()) for n in range(n): print(((n)+1),end='') Also ...
(1) odpowiedzi
2017-07-13 10:07 Iterating and Updating the list in python »
I am not able to understand why the following code goes in indefinite loop(when i am not using the copy list) list = ["Mohit","kumar","sffsfshf...
(6) odpowiedzi
2017-07-12 18:07 Data extraction from a list? »
I have data in the following format: ResultSet({'(u'maxbotix_depth', None)': [{u'value': 7681, u'time': u'2017-07-12T12:15:54.107488923Z'}, {u'value'...
(1) odpowiedzi
2017-07-10 13:07 How to use Anaconda 3 and 2, on linux ubuntu 16.04? »
Good morning, I wonder if there is a way to use python version 3 and 2 of anaconda, without having to create a "mv_env" of any version? I say this, be...
(0) odpowiedzi
2017-07-07 18:07 How to treat a var as both int and string. »
def die(): first = str(randint(1, 6)) second = str(randint(1, 6)) total = first + second print "You have rolled a " + first + " and a ...
(5) odpowiedzi
2017-07-07 01:07 Python - "The system cannot find the file specified" due to special character in filename »
As part of my python script, I'm testing to see if two files are the same size using: os.path.getsize(dir_file) # dir_file = root path + filename joi...
(1) odpowiedzi
2017-07-05 23:07 Conditional won't execute properly »
I wonder if you could help me with the code below: min = None max = None while True: input = raw_input("Please enter number: ") if input == "...
(2) odpowiedzi
2017-07-03 02:07 Python Match Line in File »
I have the following file, input.txt = TITLE = {{{ Leave Alone }}} {{{ Change Me First }}} {{{ Change Me second }}} And Python Code obj = file("...
(1) odpowiedzi
2017-07-02 02:07 OS.system- adding the output of OS .system output command to the command of another os system command »
I can use only python 2.6.6 and subprocess is not working so I need to use only os module Below is the program import os server = raw_input("serve...
(0) odpowiedzi
2017-06-29 19:06 How can I make my email show only one time per email? »
I've been making a Python script which checks for emails since logging in. Here is my code so far: #!/usr/bin/python import imaplib, getpass mail = ...
(2) odpowiedzi
2017-06-29 00:06 How can I elide a function wrapper from the traceback in Python-3? »
The issue The Phantom Menace Say i wrote a function decorator which takes the function, and wraps it in another function like so: # File example-1....
(1) odpowiedzi
2017-06-28 22:06 CONVERSION OF COORDINATES IN UTM TO GEOGRAPHICAL USING PROJ's LIBRARY »
Tengo un problema al momento de ejecutar mi programa. Necesito convertir coordenadas en el sistema utm a geograficas, estoy usando el sistema WGS84 co...
(0) odpowiedzi
2017-06-28 14:06 Convert 2 integers to hex/byte array? »
I'm using a Python to transmit two integers (range 0...4095) via SPI. The package seems to expect a byte array in form of [0xff,0xff,0xff]. So e.g. 1...
(1) odpowiedzi
2017-06-27 21:06 Python 2 vs Python 3 double underscore methods »
So in Python 3, I can use object().__eq__. I'm currently using it as a mappable function, equivalent to lambda x: x is object(). I'm using it as a se...
(1) odpowiedzi