Questions tagged as 'python'

3
answers

if-else structure does not work

#!usr/bin/env python def vocales(string): if "A" or "a" or "E" or "e" or "I" or "i" or "O" or "o" or "U" or "u" in string: nvocalesami = (string.count("a")) nvocalesama = (string.count("A")) nvocalesemi = (string.count...
asked by 13.12.2016 / 22:55
1
answer

like def importing turtle

I am working on a program to make figures using turtle in python , but I want to define a function so that when invoking it I make the figure, I previously made this code but when I try it nothing happens. import turtle def cuadrado():...
asked by 13.11.2016 / 21:31
1
answer

Pass arguments including them in the file with python

Hello, I'm checking a small program in python which I'm going through a series of arguments from the console. But now what I wanted to do was to be able to put these arguments from the .py. I give an example about the code: Edited code: # P...
asked by 18.11.2016 / 18:40
3
answers

How can I implement a graphical interface in the programming language python 2.7?

I'm new to the python language, the project I have to do is the pascal triangle, which I have already done but I still need to implement the graphical interface to the modules that I have in the project.     
asked by 17.11.2016 / 02:23
2
answers

How to Divide Folder? in python

Good afternoon.  I have a folder (directory) with many files (more than 25000) and I need to divide that folder into sub-folders that contain 500 files each. -the criteria for dividing the files can be by alphabetical order, by size, by date...
asked by 17.11.2016 / 16:10
2
answers

Show only the first element of a list in templates

I have a table in which I show an object of sight, these are vaccines, what I want is that, for example, if they already put that vaccine, I will not get the name of the vaccine, only the dates in those who got the vaccines. template.html &...
asked by 09.11.2016 / 20:01
2
answers

Run Python script in the background or as a service

Hi, I have programmed a HIDS (Host Intrusion Detection System) which is in fichero.py , I need to run this fichero.py as a WINDOWS service or in the background permanently WITHOUT BEING ACCESSED TO THE CODE OF fichero.py ....
asked by 09.02.2017 / 21:19
1
answer

Semantic Error in Python

It happens that to make my program safer, I ask for a password at the beginning of the program, and this password is also customizable (using the ConfigParser library), to make it even more secure, the config.ini file is encrypted using the Pyde...
asked by 05.12.2016 / 22:01
1
answer

single data type string in python3

Pythonist friends, as a newbie and trying to learn about programming in python, I would like help on how to get only data string (name) in a function, and not allow me to continue if I do not type text. my code is: class Nomina: def __init...
asked by 02.06.2017 / 19:09
3
answers

I want to bring the date of all the records and compare it with the current date?

Hi! I want to be able to bring the date of all my records to compare it with the current date to know how many days a certain product has been registered but I do not know how to do it, please help me. I do not know if I make myself understoo...
asked by 28.09.2016 / 16:29