Questions tagged as 'python'

1
answer

Problem in the sublime to run code in python

Decode error - output not utf-8] [cmd: [u'python', u'-u', u'C:\Users\Rosangela\Desktop\Leo\Estudo\Exercicios_Python\teste14.py']] [dir: C:\Users\Rosangela\Desktop\Leo\Estudo\Exercicios_Python] [path: C:\Program Files (x86)\CollabNet;C:...
asked by 12.06.2014 / 04:15
2
answers

When generating a letter soup with random letters like putting the words without matching?

I think I was explicit. The size of the grid is given in a .txt file in the first line and then the words that I should put in the generated font soup. The problem is that when I make the soup the words coincide in their positions which is not w...
asked by 18.01.2017 / 21:34
1
answer

Algorithm for popular tables in PostgresSQL

I'm writing an algorithm to populate all tables in a database in Postgres. I already get popular all tables that do not have a relationship , as follows: I get all the tables with the following query: SELECT table_name FROM information_s...
asked by 26.12.2016 / 16:33
1
answer

Importing modules and hierarchies - Python

Personally I have the following question. I am studying importing modules and grabbed the following problem, my directory is configured as follows: Doubt 1 - > I want to import the operation modules to print and vice versa Doub...
asked by 21.01.2017 / 11:17
1
answer

Google App Engine project Python works on localhost but gives server error

My project is running perfectly on localhost but when I do deploy and access it gives the following error: Here is my code: import os import jinja2 import webapp2 import json from google.appengine.ext import db from google.appengine.api i...
asked by 23.12.2016 / 20:37
0
answers

Parameters for a Python executable [closed]

I would like to know how to pass parameters to an executable file in python . I have a python script that will call an executable and I need to pass two parameters to this executable. I can call the executable with os.system o...
asked by 17.01.2017 / 12:27
1
answer

Python / Postgres

Hi, Is it possible to install a localhost server with Python / PostgreSQL? I know it's possible with PHP / MySQL, like XAMPP, WAMPP, etc. I need to run a system that uses Python / PostgreSQL and my server is a shared Hostgator and does not...
asked by 15.02.2017 / 23:26
1
answer

How can I test an exception in my code with unittest?

I'm studying some of Python's unittest and I've packed it. In my code the user must enter a valid value, if an invalid value occurs it should fall into the exception, but how can I test this? My code looks like this: if moeda not in (2, 5, 10,...
asked by 19.12.2016 / 08:01
1
answer

Error pressing Alt + Tab using pyHook

I'm working on a python script that captures user-entered keys. For that, I used the pyHook module. However, using the program, I noticed that every time the user presses Alt + Tab, an error occurs. The simplified version that synthesizes the pa...
asked by 19.12.2016 / 23:26
0
answers

How can I get additional information on the solvers of "scipy.integrate.ode"?

I'm comparing different solvers (dopri5, dop853, vode, etc) of "scipy.integrate.ode" and would like to know if there is any way to get information like: number of iterations, number of steps used, simulation time , ... I know how to get this...
asked by 15.11.2016 / 22:57