text stringlengths 226 34.5k |
|---|
How to sort a Python list descending based on item count, but return a list with sorted items only, and not a count also?
Question: I am generating some large lists in python, and I need to figure out the
absolute fastest way to return a sort list from something like this:
myList = ['a','b','c','a','c','... |
python threading wont start in background
Question: this is my class for turn on , turn off , and blink LED in raspberry pi i want
stop thread blink in some time ... but thread wont run in background ...
> class LED:
>
>
> _GPIOPORT=None
> flagstop=0
> flag=threading.Event()
>
>
> def __init__(... |
Speech library installation error
Question: I am new to Python and I installed the
[`speech`](https://pypi.python.org/pypi/speech) library. But whenever I'm
importing `speech` from Python shell it's giving the error
>>> import speech
Traceback (most recent call last):
File "<pyshell#0>", line 1... |
Random number generator in Python on Linux
Question: This is the code that i've written:
import os
import string
import random
def id_generator(size=8, chars=string.digits):
return ''.join(random.choice(chars) for _ in range(size))
b="echo " + id_generator() + "> file.txt"
os.... |
How to add c compiler options to distutils
Question: I want to call Mathematica from C code and C code from Python. I have the
individual parts working, but I can't put everything together.
When I compile the C code that calls Mathematica, then I use the following
command in makefile
$(CC) -O mlcall.c -... |
Python: Aggregate data for different users on different days
Question: I'm a new Python user and learning how to manipulate/aggregate data.
I have some sample data of the format:
User Date Price
A 20130101 50
A 20130102 20
A 20130103 30
B 20130201 40
B ... |
Django CSV export
Question: I want to export the csv file form database, I have the following errors: that
say tuple index out of range, i don't know why
Request Method: GET
Request URL: http://www.article/export_excel/
Django Version: 1.6.2
Exception Type: IndexError
Excep... |
Scatter-plot matrix with lowess smoother
Question: **What would the Python code be for a scatter-plot matrix with lowess
smoothers similar to the following one?** 
I'm not sure about the original source of the graph. I saw it on [this
post](http://stat... |
Process Memory grows huge -Tornado CurlAsyncHTTPClient
Question: I am using Tornado CurlAsyncHTTPClient. My process memory keeps growing for
both blocking and non blocking requests when I instantiate corresponding
httpclients for each request. This memory usage growth does not happen if I
just have one instance of the
... |
Test failures ("no transaction is active") with Ghost.py
Question: I have a Django project that does some calculations in Javascript.
I am using [Ghost.py](http://jeanphix.me/Ghost.py/) to try and incorporate
efficient tests of the Javascript calculations into the Django test suite:
from ghost.ext.djang... |
Problen running python scripts outside of Eclipse
Question: All my python scripts work just fine when I run them in Eclipse, however when
I drage them over to the python.exe, they never work, the cmd opens and closes
immediately. If I try to do it with a command in cmd, so it doesn't close, I
get errors like:
**Import... |
socket error - python
Question: i want to get the local private machine's address, running the following piece
of code:
socket.gethostbyaddr(socket.gethostname())
gives the error:
socket.herror: [Errno 2] Host name lookup failure
i know i can see local machine's address, by usi... |
Python\Numpy: Comparing arrays with NAN
Question: Why are the following two lists not equal?
a = [1.0, np.NAN]
b = np.append(np.array(1.0), [np.NAN]).tolist()
I am using the following to check for identicalness.
((a == b) | (np.isnan(a) & np.isnan(b))).all(), np.in1d(a,b)
... |
Simplegui module for Window 7
Question: Is there any way to install SimpleGUI module in window 7 for python 3.2 with
all other module dependencies or having Linux OS is only the way to have that!
Answer: Yes. Go to: <https://pypi.python.org/pypi/SimpleGUICS2Pygame/>
1. Download whichever Python you use
2. Change... |
Dynamic functions creation from json, python
Question: I am new to python and I need to create class on the fly from the following
json:
{
"name": "ICallback",
"functions": [
{
"name": "OnNavigation",
"parameters": [
{"name"... |
Control line ending of Print in Python
Question: I've read elsewhere that I can prevent print from going to the next line by
adding a "," to the end of the statement. However, is there a way to control
this conditionally? To sometimes end the line and sometimes not based on
variables?
Answer: One solution without fut... |
Creating a gradebook with the pandas module
Question: So I have recently started teaching a course and wanted to handle my grades
using python and the pandas module. For this class the students work in groups
and turn in one assignment per table. I have a file with all of the students
that is formatted like such
... |
calling python from R with instant output to console
Question: I run python scripts from R using the R command:
system('python test.py')
But my print statements in test.py do not appear in the R console until the
python program is finished. I would like to view the print statements as the
python pr... |
cx_Freeze is not finding self defined modules in my project when creating exe
Question: I have a project that runs from GUI.py and imports modules I created.
Specifically it imports modules from a "Library" package that exists in the
same directory as GUI.py. I want to freeze the scripts with cx_Freeze to
create a wind... |
Selenium Webdriver with Firebug + NetExport + FireStarter not creating a har file in Python
Question: I am currently running Selenium with Firebug, NetExport, and (trying out)
FireStarter in Python trying to get the network traffic of a URL. I expect a
HAR file to appear in the directory listed, however nothing appears... |
Extract a number of continuous digits from a random string in python
Question: I am trying to parse this list of strings that contains ID values as a series
of 7 digits but I am not sure how to approach this.
lst1=[
"(Tower 3rd fl floor_WINDOW CORNER : option 2_ floor cut out_small_wood) : GA - ... |
karger min cut algorithm in python 2.7
Question: Here is my code for the karger min cut algorithm.. To the best of my knowledge
the algorithm i have implemented is right. But I don get the answer right. If
someone can check what's going wrong I would be grateful.
import random
from random import rand... |
Django with apache and wsgi throws ImportError
Question: I'm trying to deploy my Django app to an Apache server with no luck. I
succeeded with the WSGI sample application, and tried to host an empty Django
project. While it works properly with the manage.py runserver, it throws the
following error when using apache:
... |
Cannot connect to FTP server
Question: I'm not able to connect to FTP server getting below error :-
vmware@localhost ~]$ python try_ftp.py
Traceback (most recent call last):
File "try_ftp.py", line 5, in <module>
f = ftplib.FTP('ftp.python.org')
File "/usr/lib/python2.6/ftplib.p... |
python abstract attribute (not property)
Question: What's the best practice to define an abstract instance attribute, but not as
a property?
I would like to write something like:
class AbstractFoo(metaclass=ABCMeta):
@property
@abstractmethod
def bar(self):
pass
... |
How to use itertools to compute all combinations with repeating elements?
Question: I have tried to use
[itertools](https://docs.python.org/2/library/itertools.html) to compute all
combinations of a list `['a', 'b', 'c']` using `combinations_with_replacement`
with repeating elements. The problem is in the fact that the... |
DB2 Query Error SQL0204N Even With The Schema Defined
Question: I'm using pyodbc to access DB2 10.1.0
I have a login account named foobar and a schema with the same name. I have a
table named users under the schema.
When I'm logged in as foobar, I can run the following query successfully from
the command line:
... |
Plotting histogram from dictionary Python
Question: I have a dictionary with one value associated to each key.
I would like to plot this dictionary as a bar chart with `matplotlib`, set a
different color for each bar, and find a way to use long strings as legible
labels.
X = np.arange(len(dictionay))
... |
Is there a max image size (pixel width and height) within wx where png images lose there transparency?
Question: Initially, I loaded in 5 .png's with transparent backgrounds using wx.Image()
and every single one kept its transparent background and looked the way I
wanted it to on the canvas (it kept the background of t... |
Using Vagrant and VM with python-django & PostgreSQL
Question: I am trying to make a python-django project on a VM with Python/Django 2.7.6
and PostgreSQL 9.3.4 installed.
I am following [this](https://docs.djangoproject.com/en/1.6/intro/tutorial01/)
tutorial. After making
[changes](https://docs.djangoproject.com/en/1... |
Error with hex encode in Python 3.3
Question: I am trying modify code from [this
question](http://stackoverflow.com/questions/3241929/python-find-dominant-
most-common-color-in-an-image) to use in Python 3.3 (I installed Pillow, scipy
and NumPy):
import struct
from PIL import Image
import scipy
... |
Creating a list of numpy.ndarray of unequal length in Cython
Question: I now have python code to create a list of ndarrays, and these arrays are not
equal length. The piece of code snippet that looks like this:
import numpy as np
from mymodule import list_size, array_length # list_size and array_leng... |
Python: function takes 1 positional argument but 2 were given, how?
Question: I was creating a Sudoku Game in python with Tk.
I got a error about the function on a keypress for a button
from random import randint
from tkinter import *
class sudoku:
global root,result,lb
def ... |
Is this function built in in Python 2.7?
Question: Suppose I have two lists of the same size in Python, the first:
[100, 200, 300, 400]
and I want the other to be:
[0, 100, 300, 600]
which is each element in the 2nd list equals the sum of all previous elements
in the first.
I... |
Why this regular expression pattern matches even an extra character in string?
Question: It is becoming hard for me to learn regular expressions, see the following
python regular expression code snippet.
>>> import re
>>> str = "demo"
>>> re.search("d?mo",str)
<_sre.SRE_Match object at 0x00B6... |
Can't save matplotlib animation
Question: I am trying to get a simple animation saved using ffmpeg. I followed a
tutorial to install ffmpeg, and I can now access it from the command prompt.
Now I run this piece of code:
import numpy as np
from matplotlib import pyplot as plt
from matplotlib impo... |
"Fuzzy" hashtables in Python to replace elif chains?
Question: The Pythonic way to choose one of many execution paths or bits of data
dependent on a variable is to use a hashtable, like so:
mapping = {'bar':"xyzzy", 'foo':"plugh", 'baz':"frobnitz"}
magic = mapping[command]
What do I do in the c... |
Unable to import lib tiff after installing Anaconda on Mac OS X 10.9.2
Question: I have developed some software using Python under Windows 7.
I have given it to a colleague to run on a Mac (OS X 10.9.2). I have never
used a Mac and am having trouble helping them to get started. I have
downloaded and installed [Anacond... |
How to choose which child class to instantiate dynamically
Question: My current project is in as3, but this is something I am curious about for
other languages as well.
I'm attempting to use a factory object to create the appropriate object
dynamically. My `LevelFactory` has a static method that returns a new instance... |
Finding first samples greater than a threshold value efficiently in Python (and MATLAB comparison)
Question: Instead of finding all the samples / data points within a list or an array
which are greater than a particular `threshold`, I would like to find only the
first samples where a `signal` becomes greater than a `th... |
Does Parallel Python PP always get back jobs'results in the order we created them?
Question: We are launching processes using PP and need to aggregate the results of jobs
in the order we sent them to the server. Is there a kind of pile to control
the aggregation of the results?
import pp, numpy
def m... |
max_user_connections after gevent.monkey.patch_all()
Question: I am using gevent-socketio v0.13.8 for a chat application on a django based
web app. My database is MySql and have a max_user_connection = 1500 value. My
socket server is daemonized with python daemon. I was using the socket server
without monkey patching a... |
python array processing: how to generate new values on pixel by pixel basis
Question: My problem is about array manipulation in python. Want I want to do is to
analyze a multiband raster with python and output another raster depending on
the results. Real case example: I have a raster with 3 bands and I want to see
if ... |
python script speed improvements
Question: for my robot I am analyzing laser range data. I need to analyze a lot of
samples per second. So speed is required. I know python is not the right
language based on this - but I don't want to switch for now as I am in the
prototyping phase (will see if I ever get out of it :-) ... |
Log time of execution for each line in Python script?
Question: I have a Python script which executes fairly straightforward from the first to
the last line with plain logic. The script performance is very different on a
couple of machines with different environments, so I am trying to find out
which line of the code g... |
ImportError: Critical packages are not installed in Canopy Python
Question: I trying to install a module called debacl that can be found on
<https://github.com/CoAxLab/DeBaCl> on windows 64.
I am using the install command to install the module:
In [18]: run -i setup.py install
running install
ru... |
ValueError: invalid literal for int() with base 10: '0.00'
Question: I have a string in Python like that:
l = "0.00 0.00"
And I want to convert it in a list of two numbers.
The following instruction does not work:
int(l.strip(" \n").split(" ")[0])
Apparently the function `int(... |
Python : concat arrays of groupped lines
Question: I have the following array:
[
["String 0", [1, 2]],
["String 1", [1, 3]],
["String 2", []],
["String 3", [2]],
["String 1", [1, 2]],
["String 2", [0]]
]
I need to transform it into an array with unique String... |
Python 2.x - References and pointers
Question: I have a question. How can I get "reference-pointer effect" in Python 2.x?
I have a class, containing 2 dictionaries - 1 with character representation
and 1 with integer representation (retrieved with `ord(character)`). Main
problem is I will print them a lot of times, so... |
GUI - tkinter Making a button
Question: I want to make a button that will allow the user to browse and select a file
and assign the choice to a variable, this is what I have, I know it is wrong
but I cant seem to get something that works, please give me tips to improve,
thanks.
import tkinter
#W... |
In Python 3.4, what is best/easiest way to compare paths?
Question: Using this code in Python 3.4 and Ubuntu 14.04 do not return `True`
import pathlib
path1 = pathlib.Path("/tmp")
path2 = pathlib.Path("/tmp/../tmp")
print(path1 == path2)
# gives False
print(path1 is pat... |
Using Python subprocess.call to call bash script and agruments unsucessfully
Question: I'm working on a project for managing blocks of IP addresses in a lab
environment where we have a limited number of address available. For example
users are allowed to create virtual machines in the lab as needed but should
assign an... |
Alternative to Yield in Python
Question: Is there an alternative (even if longer) method of writing the `yield` part of
this code? I'm not very familiar with the function and would rather keep it
simple.
for i in range(0, len(lstInput) - intCount + 1):
if intCount == 1:
yield [lstInpu... |
Calculate time difference using python
Question: I am wondering if there is a way or builtin library available to find the
difference in time from two string input.
What I mean is, if I have 2 input strings:
1. '2013-10-05T01:21:07Z'
2. '2013-10-05T01:21:16Z'
how can I can calculate the difference in time and pr... |
python list modification to list of lists
Question: I am trying to learn python (just finished _Learn Python the Hard Way_ book!),
but I seem to be struggling a bit with lists. Specifically speaking, I have a
list like so:
x = ["/2.ext", "/4.ext", "/5.ext", "/1.ext"]
I would like to operate on this... |
An alternative to os.path.expanduser("~")?
Question: In python 2.7.x, `os.path.expanduser("~")` is broken for Unicode.
This means that you get an exception if the expansion of "~" has non-ascii
characters in it.
<http://bugs.python.org/issue13207>
How can I achieve the same, some other way?
(That is to say, how can... |
Django Exception DoesNotExist
Question: I have a model that has Django's model fields AND python properties at the
same time. Ex:
**Edit2: Updated with actual models (sorry for the portuguese names)**
#On Produto.models.py
from django.db import models
from django.forms import Mode... |
Python catch timeout and repeat request
Question: I'm trying to use the Xively API with python to update a datastream but
occasionally I get a 504 error which seems to end my script.
How can I catch that error and more importantly delay and try again so the
script can keep going and upload my data a minute or so later... |
python : var's namespace code eval compiled ast code
Question: Using python3.4 and test the ast parse . Here is the test code .
import ast
import unittest
class TestAST(unittest.TestCase):
def test_ast(self):
#compileobj = compile(ast.parse("x=42"), '<input>', m... |
Installing M2Crypto 0.20.1 on Python 2.6 on Ubuntu 14.04
Question: I need to compile and install M2Crypto 0.20.1 from source for Python 2.6 on
Ubuntu 14.04. I can't migrate to Python2.7 right now but we're planning so. I
installed Python2.6 from <https://launchpad.net/~fkrull/+archive/deadsnakes>.
I have installed libs... |
Sci-kit Learn PLS SVD and cross validation
Question: The `sklearn.cross_decomposition.PLSSVD` class in Sci-kit learn appears to be
failing when the response variable has a shape of `(N,)` instead of `(N,1)`,
where `N` is the number of samples in the dataset.
However, `sklearn.cross_validation.cross_val_score` fails wh... |
Print results in console of class
Question: I'm pretty new to OOPython and am trying to simply execute the value of
`parse_param_paths()` to get the value of `dictpath`
I have:
class Injection:
def __init__(self):
self.tld_object = None
self.path_object = None
... |
How can I encrypt .docx files with AES & pycrypto without corrupting the files
Question: I've got this bit of python code that I want to use to encrypt various kinds
of files with AES 256. I am using the pycrypto module. It works fine for most
files (exe, deb, jpg, pdf, txt) but when it comes to office files (docx, xls... |
Service endpoint interface for python
Question: I am working on java in which eclipse gives some tools like wsimport which
imports all the java files and class files by specifying the URL of the web
service to the tool. Is there some thing like this for python? How do we work
with python to use any web service. There s... |
Regex to match all new line characters outside of some tag
Question: I need to match all new line characters outside of a particular html tag or
pseudotag.
Here is an example. I want to match all `"\n"`s ouside of `[code] [/code]`
tags (in order to replace them with `<br>` tags) in this text fragment:
T... |
Call Python from Java code using Jython cause error: ImportError: no module named nltk
Question: I'm calling a python code from a java code using jython by PythonInterpreter.
the python code just tag the sentence:
import nltk
import pprint
tokenizer = None
tagger = None
def t... |
django nested_inlines not shown in admin site
Question: I'm trying to use nested_inlines and read that the bug, that the third inline
is not shown was already fixed. But still I have the same problems. I'm using
django 1.6.5 and python 2.7.5. The nested_inlines I downloaded from
<https://pypi.python.org/pypi/django-nes... |
Python: Tkinter to Shutdown, Restart and Sleep
Question: I am currently developing a small but basic applictaion using tkinter to run
on my windows startup so I can have a little menu for the different things I
want to open. For example, I currently have buttons to launch a few games I
play and buttons to launch Skype,... |
Weird arithmetic with datetimes and relativedelta
Question: Is it safe to multiply [`relativedelta`](http://labix.org/python-
dateutil#head-ba5ffd4df8111d1b83fc194b97ebecf837add454) objects? I'm seeing
some weird and inconsistent behaviour, and can't find it documented what sorts
of arithmetic are supported by this cla... |
How to import a module with a dotted path?
Question: I want to import the **paramiko** module located in
**/usr/local/lib/python2.7/dist-packages**. So, I imported it this way:
from usr.local.lib.python2.7.dist-packages import paramiko
I have an error syntax related to python2.7 (It considers 7 a... |
Update YAML file programmatically
Question: I've a Python dict that comes from reading a YAML file with the usual
yaml.load(stream)
I'd like to update the YAML file programmatically given a path to be updated
like:
group1,option1,option11,value
and save the resulting dict again as a yaml file. I'... |
Running many python threads and grabbing the returns values of each
Question: So i've had a look at several questions on SO, and also several webpages, and
the python pages for `thread`, `threading`, and `multiprocessing`, but i can't
seem to find anything that does what i want.
I've seen a few implementations which u... |
Pyocr doesn't recognize get_available_languages
Question: Im using Python and can't load languages from package pyocr.
from PIL import Image
import sys
import pyocr
from pyocr import builders
im=Image.open("Img1.gif")
tool=pyocr.get_available_tools()
lang = tool.get_available_lang... |
How do you read post variables in python-eve?
Question: How do we read post variables in python-eve ?
If I do
curl -d [ {"firstname" : "Barack", "lastname":"Obama"} ] <url>
how would I read post variables[firstname and lastname] inside the program ?
Thanks !
Answer: I post this with the caveat ... |
Use Enthought Canopy to run a python script without specifying its full path
Question: I want to be able to run a python script at the command line using Enthought
Canopy, but I don't want to specify the full path to the script.
As I see it, there are two options.
Option 1: Make the python script an executable, add `... |
grep/zgrep within python using subprocess
Question: I have a set of tsvs that are zipped in *.tsv.gz format and some that are not
zipped, ie, *.tsv in a directory.
I want to grep for a string from these files and print the grep results each
in a new line.
I have a function that looks that takes in the input directory... |
Python Lex-Yacc(PLY): Not recognizing start of line or start of string
Question: I am very new to [PLY](http://www.dabeaz.com/ply/) and a bit more than a
beginner to Python. I am trying to play around with
[PLY-3.4](http://www.dabeaz.com/ply/ply-3.4.tar.gz) and python 2.7 to learn
it. Please see the code below. I am tr... |
Why does multiprocessing work on Django runserver and not on ngnix uwsgi?
Question: I have a Django 1.6 using python3.3 application which receives an http
request, does short term work, starts a new process and returns in a matter of
2 seconds. The process typically takes 50-60 seconds at which time it writes
that the ... |
Python Threading timer not working across suspend
Question: I'm trying to create a program that syncs with a server every 60 seconds. The
code I'm using to do that looks like:
threading.Timer(60, self.sync, [""]).start()
Pretty simple, and works great. The issue is if I decide to suspend the
machin... |
Trouble using add_row with prettytable
Question: I am trying to format an array using the `prettytable` library. Here is my
code:
from prettytable import PrettyTable
arrayHR = [1,2,3,4,5,6,7,8,9,10]
print ("arrayHR:", arrayHR)
x = PrettyTable(["Heart Rate"])
for row in arrayHR:
x.... |
Python : copy directory in another directory
Question: I have a directory "D:/INPUT/test1" that I'd like to copy in another directory
"D:/OUTPUT".
I tried many methods but none of them have worked.
For example I tried the method explained at
_https://stackoverflow.com/questions/15034151/copy-directory-contents-into-a... |
Converting an RGB image to grayscale and manipulating the pixel data in python
Question: I have an RGB image which I want to convert to a grayscale image, so that I
can have one number (maybe between 0 and 1) for each pixel. This gives me a
matrix which has the dimensions equal to that of the pixels of the image. Then
... |
Learn Python the Hard Way exercise 36 while loop
Question: The while loop in the dragon_room is not running and I'm not sure why. I get
the '>>' prompt over and over again and the program never exits or brings me
to another room.
from sys import exit
def food_room():
print "This room is ... |
Removing lines from a text file using python and regular expressions
Question: I have some text files, and I want to remove all lines that begin with the
asterisk (“*”).
Made-up example:
words
*remove me
words
words
*remove me
My current code fails. It follows below:
... |
Python Numerical Integration for Volume of Region
Question: For a program, I need an algorithm to very quickly compute the volume of a
solid. This shape is specified by a function that, given a point P(x,y,z),
returns 1 if P is a point of the solid and 0 if P is not a point of the solid.
I have tried using numpy using... |
Change default options in pandas
Question: I'm wondering if there's any way to change the default display options for
pandas. I'd like to change the display formatting as well as the display width
each time I run python, eg:
pandas.options.display.width = 150
I see the defaults are hard-coded in `p... |
Making Text look like it's being typed in the Python Shell
Question: So far the only method I've come up with is clearing the console then
displaying the string with one more letter. Suggestions?
Current Code:
import os
import time
In=list(input("Text to be displayed: "))
Out=""
Move=[]
... |
CUDA local array initalization modifies program output
Question: I have a program which (for now) calculates values of two functions in random
points on GPU , sends these values back to host, and then visualizes them.
This is what I get, some nice semi-random points:  Now... |
Using certificates in urllib3
Question: I'm a Python newbie. I'm using urllib3 to talk to an api. The reason I'm using
this and not requests is that I'd like to host my app on GAE. My app uses
certicates. When I post data, I get the following error:
TypeError: __init__() got an unexpected keyword argumen... |
How to get Riak 2.0 security working with riak-python-client?
Question: Riak 2.0 is installed on Ubuntu 14.04 with default settings
Riak python client is taken from dev branch: <https://github.com/basho/riak-
python-client/tree/feature/bch/security>
**Steps I made:**
1.Enable security:
> riak-admin se... |
TypeError while running Django tests
Question: im new at Django or python, but im currently working in a project with both.
Right now im trying to get my tests to work. I wrote these simple tests about
3 months ago and im 100% sure they worked back then. Also, when I run the
server and try different searches manually I... |
Pyalgotrade Tutorial Attribute Error
Question: I have been googling for a while now, but am still unable to find a solution,
or even determine the problem, honestly.
My installation of Python and Pyalgotrade is correct, as verified by the
successful imports.
Nonetheless, I can't manage to run the example code in the ... |
Ipython 2.0 notebook, matplotlib, --pylab
Question: In the past I have run Ipython with the --pylab option. The only way I have
found to get the notebook to work without getting the message about the ill-
effects of --pylab is to open the notebooks and then
> %matplotlib
> import matplotlib.pylab as ... |
RichIPythonWidget import side effect on pkgutil module
Question: Apparently, importing RichIPythonWidget has an impact on module pkgutil.
# Test environment:
IPython version: 2.1.0 python versions: 2.7 & 2.7.6
# Code showing issue:
import os
import pkgutil
print 'Before 1 ... '
pkguti... |
Python/wxPython: How to get text display in a second frame from the main frame
Question: Am new to Python/wxPython, I created a text two frames using `wxFormBuilder`.
The purpose is to add two numbers and display the result on both frames
`OnAdd` button click.
I have done all I could but no success?
My problem is how... |
Searching items of large list in large python dictionary quickly
Question: I am currently working to make a dictionary with a tuple of names as keys and
a float as the value of the form {(nameA, nameB) : datavalue, (nameB, nameC) :
datavalue ,...}
The values data is from a matrix I have made into a pandas DataFrame wi... |
Shared variable in Python Process subclass
Question: I was wondering if it would be possible to create some sort of static set in a
Python Process subclass to keep track the types processes that are currently
running asynchronously.
class showError(Process):
# Define some form of shared set that ... |
Getting data iterating over wtform fields
Question: I've got a form, and number of dynamically adding fields,
class EditBook(Form):
title = TextField('title', validators = [Required()])
authors = FieldList(TextField())
that's how I append them
$('form').append('<input... |
Kivy Canvas redrawing after touch event
Question:
I wanna make a small game, but I need some help...
I'm pretty newbie both in python and in kivy. I'm using python 3.4 and kivy
1.8.0.
The game will have some drawn elements which will be draggable and/or
disappering:
-if you click on a point you could dra... |
How to stop Python program compiled in py2exe from displaying ImportError: No Module names 'ctypes'
Question: I was wondering if this might be a compilation error or if there is something
I can do to stop it from displaying. I have made an argparse program for cmd.
I compiled it with py2exe and when I run it, it exacut... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.