Questions tagged as 'python-2.7'

1
answer

Connect SQL Server database with Python

I have this code that I started, to be able to connect to my server of SQL Server by means of Python in Ubuntu , all the components of: server, user, password, base already make sure they are correct. But when I ru...
asked by 25.07.2017 / 22:16
1
answer

Add all the values and add the value at the end

I have the following code in Python: import numpy as np from math import pi t = np.linspace(-2*pi,2*pi,16300) #Creo un vector de 16300 puntos de -2*pi a 2*pi x = np.sinc(t) print(x) I want to algebraically add all the points of x and add t...
asked by 25.07.2017 / 18:38
1
answer

Problems with the pip install

I wanted to install the ttk libraries but it does not let me, the same to install Tkinter, try pip and did not find anything, I also tried to download them with Pycharm but it does not leave me anyway. I'm trying with Python 2.7 and 3.6     
asked by 06.03.2017 / 02:01
1
answer

Simplify and optimize a simulator of a game in python

In recent weeks, with the help of the community, I have developed this program that simulates a signal game during two rounds with four participants. The game that simulates is that in each round each participant shows a signal and observes anot...
asked by 30.12.2016 / 17:56
2
answers

Copy a word right next to another

I'm starting with python and I'm trying to make a script that takes a txt file with a list of words vertically and copied the same word next to it this automatically, it would be something like that. dictionary.txt: casa123 per...
asked by 23.08.2016 / 13:03
2
answers

Parsear string ip class c python

Hi, I'm trying to separate each of the octets from any ip address but I can not get it. I have this, it does not work: j = 0 ip = "a.b.c.d" for i in ip: j = j + 1 if str(i)==".": l = ip[:j] print l     
asked by 30.08.2016 / 18:55
1
answer

Tkinter, continue using program while executing a while

Good afternoon, I do a program where two dates are taken by the user and then a comparison with a While, I would like to continue using the program while the While is running, is there any way? def callback(): var=OpenHour.get() var1=C...
asked by 16.11.2016 / 19:46
2
answers

transform dates in words to numeric dates

I have to turn dates into words into dates into numbers 21-MARZO-2017 09-FEBRERO-2017 16-MAYO-2017 Which should look like this 21-03-2017 09-02-2017 16-05-2017 I tried to make an fix with the months and then compare them and replace...
asked by 15.02.2017 / 15:01
1
answer

How to delete characters in python console? [closed]

Something like in java that I think is with a \b but in python     
asked by 30.10.2016 / 18:24
1
answer

Compatibility of Python and Mac OS

I have installed version 2.7 of python on a Macbook Pro mid 2012, and it looks something like this: WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit http://www.python.org/download/mac/tcltk/ for current information. The...
asked by 31.10.2016 / 22:00