Questions tagged as 'python-3.x'

0
answers

Python 3 TFTP client

I'm doing a project in python 3, is to create a client for TFTP protocol. If I write "get 'file'" I just can download the first data block of 512 bytes of this file but I can not acknowledge the server to receive the other parts of the file. PS:...
asked by 09.06.2016 / 01:30
1
answer

How to print page

I want to create a template for printing data but I'm kind of lost in how to do this, I have a print name button, it's in a table that contains the customer's name, phone number, in it it should take the id of this client and the data of the sam...
asked by 10.05.2016 / 00:52
1
answer

PyDev in Eclipse: Unable to get project for the run

I have a problem related to PyDev's interpreter configuration in eclipse, every time I try to run, the following error appears:    "Unable to get project for the run" Has anyone ever had this error using eclipse?     
asked by 05.04.2016 / 03:41
0
answers

Exporting data to a .cfg file

Can anyone give me an example of how to export the data from my models by pk to a .cfg file? I tried to use Mymodel.objects.get(pk=pk) but it did not work very well.     
asked by 18.03.2016 / 00:18
0
answers

Logging module script: using os.getenv

I'm learning Python and am following the book A byte of python. In an exercise talking about the logging module there is the following line of code: if platform.system().startswith('Windows'): logging_file = os.path.join(os.getenv('DIRETORIOIN...
asked by 16.02.2016 / 19:38
1
answer

psycopg2.pool.SimpleConnectionPool, Exception OperationalError takes time to be thrown

I did a test, shut down the server and called the psycopg2.pool.SimpleConnectionPool method, the method is waiting for a response for a very long time, about a minute, only then it raises the OperationalError exception. This is nor...
asked by 21.01.2016 / 20:36
1
answer

Problems with Custom Template Tags in Django 1.8.5

Good evening! First, I would like you to help me improve this topic, if necessary. Well, I work with Django 1.8.5, Python 3.4, virtualenv and other dependencies as well. My problem is. I have two custom template tags, one works, one doe...
asked by 11.02.2016 / 00:55
1
answer

Series using recursion

I'm trying to make a x^(n)/n! string but although it looks simple I have a constraint that is: It must be a recursive function. What I have so far that I do not even know if it is correct is the following: def serie(x,n): if (x and...
asked by 07.01.2016 / 00:30
1
answer

How to work with UpdateView and Forms in the template

I'm trying to render a client's data in the template, but I'd like to do it without using {{ form.as_p }} or {{ form.as_table }} whatever, I'd like to know if there's any way to use the id of the clients in question and use inputs...
asked by 26.01.2016 / 14:46
0
answers

How to read a .kar file in python?

I'm trying to read a .kar file and then print the letters on the screen, how would I do it in Python3? I tried using Karapython, however it does not work in Python3, any help?     
asked by 24.09.2015 / 02:50