Questions tagged as 'python-2.x'

3
answers

Delete space between two print

How can I eliminate the space between 2 print different in Python? For example: num = raw_input() num = float(num) result="" while num>=1000: result+= "M" num = num - 1000 if num>=900: result+= "CM", num=num-900 if...
asked by 16.05.2018 / 23:49
0
answers

Problem with elifs and local variables

I would like to know why the compiler writes me the following: local variable 'randomindexmother1' referenced before assignmen. I've been looking for i based on what I've seen, I do not need to try randomindexmother1. The problem I have in the e...
asked by 14.05.2018 / 08:20
1
answer

Generate .pyc files in Python 2.6

I want to generate the compiled .pyc from .py scripts in Python 2.6.6. The following line works in Python 2.7: python -m compileall C:\una_ruta\myscript.py If I do the same in Python 2.6.6 (even passing the complete routes): C:\Python26\p...
asked by 28.02.2018 / 15:02
0
answers

Multiprocesses, Threads / threads in pyqt4?

I am trying to enter data in a QListWidget in pyqt4, by means of the keyboard entry raw_input I am entering 5 data but I only want that in the table I get 3, that I already have it, but When I enter the first data round, the GUI is just opened...
asked by 03.02.2018 / 19:41
1
answer

Arguments python as a string

I'm stuck in a script. I try to expose you to see if you can help me. I define the following before entering the loop.    client, date, time, state, name, result, most_repeated = sys.argv [1] .split ()       timestamp = str (date) + '' +...
asked by 08.01.2018 / 16:51
2
answers

How to create database and then consult them in excel through python?

Hello, I am trying to make a program in which I can add data in an excel file and later consult them, for this I must use the libraries openpyxl (for managing the .xlsx file) and tkinter (for the window where they should be enter the data), my p...
asked by 03.10.2017 / 05:52
1
answer

I have an error when trying to open a python program in the cmd

I use sublime text as a text editor, but when I want to run a program that asks for data the user does not leave me and I think it is part of sublime; then following a facilitated code course I am learning to execute my programs with the Cmd; bu...
asked by 15.06.2017 / 05:14
0
answers

The program closes automatically after 2h python

I have a program in python that allows me to read and store values every 10 seconds (to collect data). The program is simple and works well but the problem is that it only works 2h and 24 minutes. Then without knowing why it closes and yo...
asked by 15.05.2017 / 18:31
1
answer

print a rectangle with "-" python

I have the following program, I already made an attempt but it does not work out as they ask, here is the statement and the expected result Perform a program that displays a rectangle formed by height n and base m, where n and m are integer...
asked by 19.05.2018 / 00:05