Questions tagged as 'python'

1
answer

error with matrix in python (method of gauss-jordan) (numpy)

Good day estimated, implement the gauss-jordan method in python in the following way and it is working: #La idea de este metodo es que el usuario ingrese una matriz MxM y un vector de tamano M import numpy def gaussJordan(m): #creamos una...
asked by 30.05.2017 / 12:33
1
answer

Problem uploading file with Django

I just started working with Django 1.11. I am trying to upload a file using a form. I leave some samples of my code below. First my form in forms.py: class UploadFileForm(forms.Form): title = forms.CharField(max_length=50, label='Titulo...
asked by 26.05.2017 / 17:29
1
answer

Can you do a program for MacOs in Python?

First of all I would like to clarify that I am new to programming, but I like it a lot. For a project I have to develop a program for Mac, right now I'm learning Python, but I do not know if you can run a program made in Python on a Mac, I know...
asked by 28.01.2017 / 06:43
1
answer

Obtain user folder for any user in Linux (Ubuntu)

I've recently come across functionality that does not seem to be currently implemented in python. Currently we can obtain the active user's folder in several ways (speaking of linux): import os os.environ("HOME") os.path.expanduser("~/")...
asked by 12.06.2017 / 17:38
1
answer

Send preferred data to MercadoPago with Django

I'm doing a page in Python 3.4 and Django 1.7, using MercadoPago's basic checkout, but I want to send more info from the buyer than what the basic proposes, but I get the error that is not serializable. I need to send the following information:...
asked by 20.01.2017 / 20:25
1
answer

How to use global variables in python

I'm trying to keep the value read in a webhook in the following webhook but the variable that takes the value does not keep it in the next webhook. from flask import Flask from flask import request import os from threading import Thread app =...
asked by 12.06.2017 / 18:43
2
answers

Auntoincrementable in HTML

I have the following html code and what I need is for tb_header1 to increase the values of i , j en 1, and rangos go incrementing 1 the value of a (in each for ). {% for atributo in tb_header %} <td...
asked by 25.11.2016 / 04:53
1
answer

Run a python program

How can I run a python script just by typing in console #run < problem_file.in with problem_file.in any document. I now execute my program with cat input | python a_star_incons.py being input that document that...
asked by 04.10.2016 / 01:13
1
answer

Send FTP files with phyton

I am sending a file via FTP using Phyton. My code: #!/usr/bin/python import ftplib import os filename = "MyFile" ftp = ftplib.FTP("xx.xx.xx.xx") ftp.login("UID", "PSW") ftp.cwd("/Unix/Folder/where/I/want/to/put/file") os.chdir(r"\windows\fo...
asked by 26.04.2017 / 17:18
1
answer

Upload multiples Images in Django

I am trying to upload multiple images in a django form. So far you get to the point of getting this error InMemoryUploadedFile' object has no attribute 'get' indicating that the problem is in line imgform.save() of the view. Thi...
asked by 31.10.2016 / 00:32