Tagged Questions
Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.
0
votes
0answers
8 views
Counting how many specific items exist in a YAML file with Python
I'm attempting to find out how many "usernames" exist. Currently there are 2, and I can loop over users to get this, but that feels clunky. Is there a way to get how many usernames exist in user?
...
0
votes
0answers
4 views
pyinstaller setup failed with “setup.py is not yet supposed to work. Please Use PyInstaller without installation.”
I was trying to "pip install pyinstaller" on my Mountain Lion. It failed with
setup.py is not yet supposed to work. Please Use PyInstaller without installation.
There is a ticket for this ...
0
votes
1answer
24 views
Python SQLite near “?”: syntax error
Another one of those questions. I'm trying to do:
self.table = 'table'
a = 'column'
b = 'value'
c.execute('INSERT INTO ? (?) VALUES (?)', (self.table, a, b))
But I'm getting
<class ...
0
votes
1answer
24 views
Python Read Large Text Files Probelm
I was trying to compare two large text files line by line (10GB each) without loading the entire files into memory. I used the following code as indicated in other threads:
with open(in_file1,"r") as ...
0
votes
0answers
14 views
Remove namespace and prefix from xml in python using lxml
I have an xml file I need to open and make some changes to, one of those changes is to remove the namespace and prefix and then save to another file.
Here is the xml:
<?xml version='1.0' ...
0
votes
1answer
12 views
Python GUI - Insert text to text box
I just got into Python GUIs and I am testing different things, since that seems to help me learn easier (trial and error). One thing I am trying is inserting a message from a different class. I can ...
-1
votes
1answer
23 views
How to make python unittests involved my own TextTestRunner automated
When using the python module unittests, The output is ugly and makes my eyes tired.
So I write my own TextTestRunner,
unfortunately, I don't known how to make unittests involved my own ...
1
vote
0answers
11 views
Elastic Beanstalk not creating RDS Parameters
I'm following this tutorial in an effort to create a Django application on AWS.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html
I was able to get everything ...
0
votes
0answers
10 views
pandas groupby apply on multiple columns
I am trying to apply the same function to multiple columns of a groupby object, such as:
In [51]: df
Out[51]:
a b group
0 0.738628 0.242605 grp1
1 0.411315 0.340703 grp1
2 ...
1
vote
2answers
25 views
ValueError: zero length field name in format
I am trying to convert date to a nice format using below code and runninginto following error..can anyone provide inputs on how to overcome here?
from datetime import datetime
d = ...
1
vote
2answers
21 views
making HTTP request upon class initialization
New to programming, so may be a stupid question. If so, apologies.
I'm writing a class in Python that on initialization makes a get request to an API for a rather large amount of data:
class Foo:
...
1
vote
0answers
13 views
How can I find which tests are running slowly in nosetests?
We've got a test suite of about 2000 tests distributed over 50-60 files, that we run with nosetests. What is the best way to figure out which tests are running slowly? I could add a start/stop timer ...
0
votes
1answer
10 views
Passing variables between two WxPython windows
So im writing a program and i need to get a list from the main GUI window to the pop up window that does an action with the selected options from the main window
the problem is i cant pass a variable ...
0
votes
3answers
32 views
Python function which can transverse a nested list and print out each element
For example if have the list [[['a', 'b', 'c'], ['d']],[['e'], ['f'], ['g']]] the function should print out 'a' 'b' 'c' ...ect. on separate lines.It needs to be able to do this for any variation in ...
0
votes
1answer
18 views
Multithreaded screen scraping help needed
I'm relatively new to python, and I'm working through a screen- scraping application that gathers data from multiple financial sites. I have four procedures for now. Two run in just a couple minutes, ...