0 answers

setuptools python setup.py install not copying all child modules

The package dir structure is this sound/ -------- init.py -------- setup.py -------- MANIFEST.in ---------bin/ ------------- awsm.sh -------- surround/ ------------ init.py ------------ module1.py ...

9 answers

How do I get a decimal value when using the division operator in Python?

For example, the standard division symbol '/' rounds to zero: >>> 4 / 100 0 However, I want it to return 0.04. What do I use?

2 answers

Python-Django module import issue

I have JSON data coming through various external API's into my Django project. I have two apps, one called 'products' and other 'extract'. Through product app, have created the database and rendered ...

2 answers | 1 min ago by Deepak on Stack Overflow stackoverflow.com
1 answer

python3 - broken pipe error when using socket.send()

I am programming a client-server instant message program. I created a similar program in Python 2, and am trying to program it in Python 3. The problem is when the server takes the message and tries ...

0 answers

Deploy Fask app on Apache Server using mod_wsgi and WinSCP

I want to deploy my Flask application on an Apache server. I have an account on the server, and have been told that "The server can be used to run scripts and web apps written in Python (using django ...

4 answers

How can I detect if a user tries to upvote once again?

I'm currently in the process of implementing an upvoting system ( no down voting system will be used in the app). I managed to create an upvote property to the Post model in my app. The default for ...

4 answers | 7 mins ago by Somnibyte on Stack Overflow stackoverflow.com
4 answers

correct and efficient way to flatten array in numpy in python?

I have: a = array([[1,2,3],[4,5,6]]) and I'd like to flatten it, joining the two inner lists into one flat array entry. I can do: array(list(flatten(a))) but that seems inefficient due to the ...

4 answers | 8 mins ago by user248237dfsf on Stack Overflow stackoverflow.com
0 answers

sqlalchemy filter_rule how to filter multiple conditions

I am using python+sqlalchemy and want to perform a query with filters. I decided to use filter_rule for the same. Assume DB records such as this : ...

0 answers

Python opencv filtering everything outside region of interest

Given an image and a set of points (number of points >= 3), where the set of points would form a polygon which is my region of interest, my aim is to filter everything in this image that is outside ...

0 answers

scrapy: how to get the failed urls

I have two custom middlewares to catch the failed urls: DOWNLOADER_MIDDLEWARES={ 'soufang.misc.middleware.CustomRecordMiddleware':860, ...

1 answer

Iterate over groups of rows in Pandas

I am new to pandas and python in general - grateful for any direction you can provide! I have a csv file with 4 columns. I am trying to group together rows where the first three columns are the same ...

1 answers | 14 mins ago by forgot_my_towel on Stack Overflow stackoverflow.com
3 answers

Python - suds - no module

I've installed Python 2.7.1, setuptools and suds 0.4. When running my script, I'm having the following error: Traceback (most recent call last): File "C:\Python27\test.py", line 5, in from ...

3 answers | 16 mins ago by Olivier on Stack Overflow stackoverflow.com
1 answer

pg_dump password in python

I have a ubuntu remote server say 172.123.342.12. I want to take backup of a postgresql database on my local machine via a python script. My Script is: def backUp(self): Pass = 'fb2024d4' ...

1 answer

Using Mechanize (Python) to fill form

I want to fill the form on this page using python mechanize and then record the response. How should I do it? When I search for forms on this page using the following code, it shows the form only for ...

0 answers

Reading a sequence file with LzoCodec in Python

I have a sequence file(see first few lines of the file below) with LzoCodec, that I am unable to read through both protobuf and python-hadoop module . Here's what I tried - Method 1 & Method 2 . ...

1 answer

Create object which methods are deferred to a different object for execution [Python]

To explain it and for simplicity, I will use the power domain example. Imagine that you have more than one equipment. All plugged in one power strip with multiple plugs. The power strip can be ...

1 answers | 27 mins ago by flamenco on Stack Overflow stackoverflow.com
0 answers

“Request Should Have succeeded, but was ”400 Bad Request" error on Robotframework-httpLibrary

I am using Robotframework-httplibrary for automating my webservice API, which has Header and Request body. Manually If I test these APIs using REST Client ..The APIs works fine.. but from my Robot ...

0 answers

How add rows to treeview in odoo?

I have a tree view and I want to fill this tree view Module Architecture is: init.py (where I import module.py) openerp.py (dependencies: Base) _module.py (where I've got the main code and everything ...

0 answers

create_user() takes at least 3 arguments (2 given) Django Social Auth use Costom User Model

i want to make login social auth and i use userprofile to login, but i getting error. This is error: Exception Type: TypeError at /complete/facebook/ Exception Value: create_user() takes at least 3 ...

2 answers

Fresh database and Django manage.py shell and syncdb are not running

MY Django Project is running Good and I want to remove my DB and create new one to test Some Functionalities in my Code.After Creating a fresh Postgre SQL DB .I run the ./manage.py syncdb and shell , ...

5 answers

Python: Differentiating between row and column vectors

Is there a good way of differentiating between row and column vectors in python? So far I'm using numpy and scipy and what I see so far is that If I was to give one a vector, say from numpy import * ...

5 answers | 36 mins ago by 447xpro on Stack Overflow stackoverflow.com
0 answers

wxPython Paint Damaged, Clipped area

I have the following simple code (click the pink box and you can move it around with your mouse while holding down the left mouse button). import wx class AppPanel(wx.Panel): def ...

1 answer

UnRARing files in Python in OSX

This is driving me nuts, I've looked at & tried a number of the answers here for solving this problem but nothing is working out so far. The basic problem is that I have some 1300+ rar files ...

1 answers | 40 mins ago by PixelThis on Stack Overflow stackoverflow.com
0 answers

Using Google Picasa API with Python

I have been using Google's Picasa API successfully from last 6 months or so. Today I have started getting an error raise GooglePhotosException(e.args[0]) GooglePhotosException: (403, ...

1 answer

Passing array from Flask to Javascript to create options for drop down menu

I am new to Flask and Javascript. I am trying to upload a file and use one of its columns as options in the drop down menu. Please correct me where I am wrong. Here are the codes: Flask: from flask ...

2 answers

variable in source code - python programming

Currently I am having a problem to avoid "don't repeat yourself". This is my code - I want to rephase to be exact my situation now: if foo == 1: for node in content.findAll('a'): link = ...

2 answers | 41 mins ago by gaixixon on Stack Overflow stackoverflow.com
1 answer

Using a separator while building a string

I'm relatively new to python and need a hand with using a separator while building a string with a for loop. I've defined this function: def to_string(my_list, sep = ', '): string = '' for ...

1 answers | 41 mins ago by Anthony Belperio on Stack Overflow stackoverflow.com
0 answers

SQLAlchemy quoting of table names - Can't redefine 'quote' or 'quote_schema' arguments

Whilst upgrading from sqlalchemy 0.8 to 1.0.4 my ORM has broken with the error Can't redefine 'quote' or 'quote_schema' arguments I connect to a sybase db, and use a declarative_base Base = ...

3 answers

Getting top biggest values from each column of the `pandas.DataFrame`?

Here is my pandas.DataFrame: import pandas as pd data = pd.DataFrame({'first':[40,32,56,12,89], 'second':[13,45,76,19,45], 'third':[98,56,87,12,67]}, ...

2 answers

Python script to run a visual studio C++ program multiple time with different arguments

I have a C++ Visual Studio program called Test which takes two arguments. I have to run this program with large number of different arguments like: ./test -a -b (a is arg1, b is arg2) ./test -c ...

2 answers | 47 mins ago by user3027732 on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3