Questions tagged as 'python'

1
answer

Convert script to .exe python

Well folks the fact is that I'm starting in this programming by learning python. And I've searched for information about how to make your sript executable on a computer where the interpetre is not installed. I have already read that for that the...
asked by 28.05.2017 / 20:58
1
answer

print os.system () in python

I was practicing a small program in socket that allows access to the shell of the server machine. The case is that the p r int that would have to be sent to the client (which is the answer of os.system() ) are numeric...
asked by 01.06.2017 / 09:52
1
answer

How can I read a certain line of a csv file, keeping in mind that the process was stopped?

This in the dilemma of how to do to read a csv of 1,000,000 records and go back to the line that process previously. This would happen when the process stops in the middle, that is, I need to return it from the last point. I imagined how to w...
asked by 02.06.2017 / 03:40
2
answers

Python failed concatenation error

Hi, I'm new to programming in
asked by 01.06.2017 / 17:15
1
answer

Python command not found in Windows 10 with the subtyme of linux

Well, it turns out that I have installed Python in Windows 10 and recently installed the bash in ubuntu that is now available in these new versions, but when I do the typical python to run it, it gives me the error message when I can not find it...
asked by 14.06.2017 / 16:59
1
answer

Eliminate rows and columns of a matrix, taking into account its elements

I have to create a program that eliminates rows and columns the program has to analyze all the elements of a column and if all are 0, that column and its corresponding row is deleted for example if all the elements in column 6 are 0, colum...
asked by 19.05.2017 / 21:10
1
answer

Restrict access by url

In my application I have the user model that extends AbstractUser and I have added two boolean fields, my question is, how can I make the user not enter certain views by url depending on whether it is validator or is a digitizer? So far I have o...
asked by 25.07.2017 / 02:28
1
answer

From the following code, how can I enter a for and a while? (trinket) [closed]

for i in range(2): print ("Hello") import random def game(): x = int(raw_input("Give me a number")) z = random.randint(1,10) if x==z: print "you won" else: print "I´am sorry the winning number is", z return; def result():...
asked by 18.05.2017 / 21:00
1
answer

Mention user that made the command with Discord.py

I'm trying to use Discord.py to program bots for Discord but I found the slight problem that I can not find any way to mention the user who "called" or performed the command. They told me that it was possible using ctx.message.author...
asked by 27.04.2017 / 09:05
1
answer

'unicode' object has no attribute 'lookup'

I'm trying to add a set of values belonging to id_jovenclub def detalle_jc(request, id_jovenclub ): jc = jovenclub.objects.get(pk=id_jovenclub) datos=ingresos.objects.all() print jc.ingresos_set.all() **ing = ingresos....
asked by 21.04.2017 / 17:41