Questions tagged as 'python'

2
answers

Python: Read by file and implement in a list

I process my problem: I want to read a file in which some features are stored. The file to read has this structure such that: First line: Number of total levels ... (20) Line with the number of cars (8) The following lines indicate...
asked by 22.03.2017 / 19:37
2
answers

Alchemy Flask error in Python

I've been doing the tutorial link to learn Python but I have not managed to get the import to sqlalchemy generating the following error:    $ python app.py Traceback (most recent call last): File "app.py", line   2, in from flask_sqlalchemy...
asked by 06.03.2017 / 19:38
1
answer

No Django settings specified [closed]

Good afternoon, I'm trying to create my project in Django but when I run the command "django-admin createproyect project_name" it gives me the following error:    No Django settings specified.   Unknown command: 'createproyect'   Type 'djang...
asked by 15.03.2017 / 20:18
1
answer

Create setup.py to install python package

I have this project link and I'm trying to create a setup.py so that the functions and classes of xmppbot.py are available for other developments but I do not give with it. I have rewritten the setup.py thousand times t...
asked by 14.03.2017 / 22:16
1
answer

I can not import library from .py but from terminal

I have installed a couple of libraries ( Piexif , pyexiv2 ) from terminal with the following commands: sudo pip install piexif sudo apt-get install python-pyexiv2 Therefore, your imports are like this import piexif import pye...
asked by 03.03.2017 / 17:24
1
answer

When referencing a variable of a class: it does not save data

When I create my class, I create a variable called self.canvas_height= self.canvas.winfo_height() in which I store the result number of a method I invoke. So much the better but after that same class I create a function dibujar where...
asked by 17.02.2017 / 17:33
1
answer

I create a list from another one but the changes in one affect me both ... What do I do wrong?

I am a pithon enthusiast and self-taught and I find myself with the following problem: In a method I create a list from another one where I have to make some changes within a loop, to each cycle I want the second created list to be copied from t...
asked by 24.02.2017 / 18:29
2
answers

ImportError: No module named urls, Creating view in django

Good evening I'm trying to create a view in Django and doing the runserver gives me the following error:    Performing system checks ...       Unhandled exception in thread started by Traceback (most recent call last): File   "C: \ Python27...
asked by 18.03.2017 / 00:04
1
answer

update a single record with submit in index.html and function in views.py

I have a code which should allow me to update the field = status, by 'delivered' this is the index.html where the button is: <form action="/some/url/mapped/to/pedido_sub/view/"> <input type="submit" name="Aprobar" class="btn btn...
asked by 14.02.2017 / 16:20
2
answers

How to update values contained in Radiobutton to use them in a Python Tkinter function?

I am trying to place three options using the Radiobutton widget to later use the value of the option selected in a function when a button is pressed. I have found scripts where a variable of type IntVar is defined and then the method...
asked by 07.03.2017 / 20:50