text
stringlengths
226
34.5k
How to pass commands to gdb from python Question: I have launched GDB using subprocess.call methond in python .Can any one help how to pass commands to gdb (like 'info threads') from python script. Answer: It is better to use [Pexpect](https://pexpect.readthedocs.org/en/latest/) module if you want to interact with in...
Parse arbitary date formats in Python (including rfc3164) Question: PHP has the amazing [strtotime()](http://php.net/strtotime) function which takes pretty much anything and turns it into a time. I'm looking for something similar in Python? As an example of why: I'm parsing syslogs which have the dumbest format ever ...
Can voluptuous code pass pylint? Question: I run `pylint -E` as part of the tests on my Python project to ensure that errors don't creep into untested code. Generally this works quite well. But recently I've been running into problems with [voluptuous](https://pypi.python.org/pypi/voluptuous) and pylint. The problem i...
Python scatter - change marker style based on entity Question: I'm struggling for days trying to resolve this problem: I have cartesian coordinates on the y-axis (for depth from 0 to 1) and numbers with different values on the x axis (the numbers are the firing rate of different cells populations at the given depth on ...
Python failing to import module from script Question: If I start python and input `import tables` it works fine but when I run `python m_BlackrockLib.py` (which has `import os, struct, tables, pickle, re, shutil` as it's first line) I get the error `ImportError: No module named tables`. I can see that tables is present...
How to map structured data to schemaRDD in Spark? Question: I've asked this question differently before but there are some changes so I thought asking it again as a new question. I have a structured data which only part of it is in json format but I need to map the entire data to an schemaRDD. The data looks like this:...
How to copy text file in python Question: Here's what I want to do: import copy def printtext(swefile): for row in swefile: print(row) text = open("wordsv.txt","r",encoding="utf-8") text2 = copy.copy(text) printtext(text) print(text2.readlines()) But it is no...
wxPython -- BoxSizers not placing things correctly Question: I can't figure out what I'm doing wrong. I just made the jump from Tkinter to wxPython and I'm trying to figure out BoxSizers. I'd look this question up, but I don't even know what to look up. This panel is filling the space of a Frame, it's supposed to show ...
AttributeError: 'NoneType' object has no attribute 'shape' Question: import numpy as np import cv2 from matplotlib import pyplot as plt img = cv2.imread('AB.jpg') mask = np.zeros(img.shape[:2] , np.uint8) bgdModel = np.zeros((1,65), np.float64) fgdModel = np.zeros((1,65), np.flo...
Python 2.7 writing strings elements (character) to a binary file Question: I am using Python 2.7 to access an API that returns JSON with a single key="ringtone_file" and an associated value that is an mp3 file encoded for transport via HTTP. I created a bogus mp3 file consisting of 256 bytes in order from 0x00 through ...
How to save a list of ojects that contains a list as member to file by using pickle python? Question: I have the following class: class Document: _queryID = "" _name = [] _docId = "" * * * In the code I create a list called listDocuments. I fill the list with objects of type Doc...
How to attribut a different variable to each element of list Question: Watch out I am a beginner. My question is: can I ask Python to attribut a different variable to each element of a list. I created one list of questions and one list of answer lst_questions = ['6+11', '3+3', '9+10', '2+7', '11+8', '9...
Python Tkinter check radio button state before proceed Question: I have this code which is working import Tkinter as tk from Tkinter import * LARGE_FONT= ("Verdana", 12) class ChangePages(tk.Tk): def __init__(self, *args, **kwargs): tk.Tk.__init__(...
Django REST || Python? Class attributes as a key-value pair array Question: I'm currently doing the [Django REST Framework tutorial](http://www.django- rest-framework.org/tutorial/1-serialization/) and I came across something when testing that confused me. >>> snippet =Snippet(code='foo = "bar"\n') >...
Issue with Selenium and Tableau Server Question: Trying to change a filter on tableau dashboard hosted on tableau server through selenium script. Need to know whether there are some restrictions on tableau server or do we have any work around for the same. Here is the code: from selenium import webdriv...
Errors when I start the Python shell, errors from a script I ran a week ago Question: I've been learning python and I there is a problem with my Python interactive shell on one of my systems. It runs a script on every python-interactive-mode start(without arguments). I don't know where to look for a process that does t...
How to append the logs in python Question: There are two files named file1 and file2 in the python project. In file1.py , Iam capturing the log to file 'sample.log' and executing the file2.py through os.system() command. In file2.py, I am opening the sample log file sample.log in appending mode and sending logs to tha...
Why do I have to open my csv twice? Question: Assume I have a csv file where I first need to get the number of rows in order to initialize an array. Then I want to fill the array with the rows from the file (but only some columns): import csv import numpy with open('a_csv_file', 'rb') as f: ...
Redirect with HttpResponseRedirect to another function in python Question: I have a function : def drawback(request,problem_id) and I want in the end of this function to redirect to another page that is called from function def show(request,problem_id) I tried with ...
How to interact with python's subprocess as a continuous session Question: I need to implement a filter in python, which pick out specific outputs from a Linux command-line dictionary tool. I need to: 1. Get a set of words from a file 2. Lookup each word: 1) if word not contains, skip it; 2) else if it is a verb, ...
How do I select a random element from a 2d list Question: I'm trying to select a random element in a 2D list in python. I'm creating a blackjack game. > I'm aware of how long and non-optimized this code is, but I'm new to > programming and I want to make mistakes to learn. > > Here's the initial code that I have set u...
Create a file object from raw binary information in Python Question: ### Question What is a clean way to create a file object from raw binary information in Python? ### More Info The reason I need to do this is because I have the raw binary information comprising a jpeg image stored in ram. I need to put it inside s...
Python Snakefood module import generalized failure Question: I want to run [snakefood](http://furius.ca/snakefood/doc/snakefood-doc.html) (an AST-based dependency graph analyser; source code can be found [here](https://bitbucket.org/blais/snakefood/src/e0a74fa6260dcd44716d40b4eb404ca024323eac/lib/python/snakefood/gende...
How does the code know when to split into a line? Question: So I was learning on how to download files from the web using python but got a bit thrown by one part of the code. Here is the code: from urllib import request def download_stock_data(csv_url): response = request.urlopen(csv_ur...
Failed to run Python script with Conda Question: I tried to install menpo like in [this tutorial](http://www.menpo.org/installation/windows/index.html). After that I installed menpofit, menpo3d and menpodetect: > conda install -c menpo menpofit > > conda install -c menpo menpo3d > > conda install -c menpo menpodetect ...
Python won't advance Question: Question: What would be the issue if python continues to ask for the same input over and over again, and won't advance to the end of the program? Where do you want to go? X And how many days will you be staying in X? 1 And how many days will you be staying in X? 2 ...
Biopython: ImportError: No module named TreeConstruction Question: Someone knows why I get the following error? >>> from Bio.Phylo.TreeConstruction import DistanceCalculator, DistanceTreeConstructor Traceback (most recent call last): File "<pyshell#6>", line 1, in <module> import B...
Counting matches / Comparing two text files in python with utf-8 encoding Question: i'm trying to compare two files in utf-8, gold_standard_1.txt with 2553 lines and output_test1.txt with 2476 lines, both disordered, and count if a line in one file matches with another line in the other text file (not necessary same li...
Python 3.4.3 subprocess.Popen get output of command without piping? Question: I am trying to assign the output of a command to a variable without the command thinking that it is being piped. The reason for this is that the command in question gives unformatted text as output if it is being piped, but it gives color for...
Using python openpyxl, how to skip first several lines? Question: I am using openpyxl, I tried to read from the fifth line for some files. The files' first four lines are the header. then the main content has a different format than the header. And I tried the method: import openpyxl file_name="xxx.x...
Caesar Cipher program was working but now isn't(help please) - Python 3 Question: I'm writing a Caesar Cipher code for a part of a controlled assessment. I built a fully functioning program and I thought I had it sussed but after changing a few things around I went to check back and everything has gone wrong! The code...
Python Pandas - Main DataFrame, want to drop all columns in smaller DataFrame Question: I have a DataFrame ('main') that has about 300 columns. I created a smaller DataFrame ('public') and have been working on this. I now want to delete the columns contained within 'public' from the larger DataFrame ('main'). I've tr...
Headers with Python List Question: Python newbie. I have csv data the looks like the following: Record Name Cur e12mo e24mo e48mo state 3928 Joes 2000 200 400 0 CA,GA 1 Toms 19 1 2 0 AR,KS 1747 Mine 60 5 10 ...
US Census API - Get The Population of Every City in a State Using Python Question: I'm having an issue getting the population of every city in a specific state. I do get the population of cities but if I sum the population in every city I don't get the same number as the population of the state. I got my [API Key](htt...
Unable to start AMS Acomba Connector on Windows Question: I am trying to get a python service to run under Windows 7 however I am unable to start it. I have started by installing the service using c:\amsconnector>amsconnector.py --username domain\admin --password ************ install Installing serv...
How to convert this json string to dict? Question: After executing the following code: import json a = '{"excludeTypes":"*.exe;~\\$*.*"}' json.loads(a) I get: > Traceback (most recent call last): File "", line 1, in File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/pytho...
Why am I getting "UnicodeEncodeError: 'charmap' codec can't encode character" error message Question: I encountered a problem with Python script I wrote while running in a Windows CMD window, and boiled the essence of the problem down to the following [SSCCE](http://sscce.org/): **The Python script (x.py)** ...
Psycopg ppygis select query Question: I'm trying to setup a basic working postgis setup with python ppygis package. >>> import psycopg2 >>> import ppygis >>> connection = psycopg2.connect(database='spre', user='postgres') >>> cursor = connection.cursor() >>> cursor.execute('CREATE TABLE t...
Django finds all static files except one - 404 Question: I had my static files working correctly until I tried to add this library <https://github.com/ierror/django-js-reverse> I followed the instructions from the page, but Django still can't find the new resource. from settings.py STATIC_ROOT = 'stati...
Equivalent Python code for the following Java http get requests Question: I am trying to convert the following Java code to Python. Not sure what I am doing wrong, but I end up with an internal server error 500 with python. Is the "body" in `httplib.httpConnection` method equivalent to Java `httpentity`? Any other tho...
Using scrapy to save files on a web page by extension type Question: I am very new to Python and I am trying to use scrapy to download and save the pdf files in this website: <http://www.legco.gov.hk/general/chinese/counmtg/yr04-08/mtg_0708.htm#hansard> The following is my code: from scrapy.contrib.spid...
Creating a 2d colour gradient plot with 3 1D arrays Question: So i have 3 1D arrays, x_vals, y_vals and z_vals. I would like to plot x_vals against y_vals, with z_vals defining the colour at the point. from everything i have looked up it seems i need to use numpy.meshgrid, however when i try this python just times ou...
Implementing Matlab's weights and bias on Neurolab (Neural Network) Question: I exported weights and bias from Matlab into python to use with neurolab. My network has 8 inputs, 3 arrays of input weights, 4 arrays of layered weights and 4 output neurons. This is my first time of doing this, I'll really need help to get ...
Try block not catching - Am I making inadvertent internet access? Question: I accidentally disconnected my internet connection and received this error below. However, why did this **line** trigger the error? self.content += tuple(subreddit_posts) Or perhaps I should ask, why did the following l...
Get Data from JSON Python? Question: I'm working on doing a live currency converter in Python. I've successfully fetched all the data needed from the URL into Python. However I'm now trying to call a specific string in the url. Here's my current code: import urllib.request import json ##Defi...
Detect the dates from text in text file. And then list them out using python Question: I have a text file that contains dates in the text. these dates are of format ("march 2016" or "march 2, 2016"). I wish to list them out. Can anybody help me with this? this is my attempt import re regex = '\s(\w...
python NameError: name 'memberno' is not defined Question: my code is giving me the error of Destination[index]=inode*dof-dof IndexError: list assignment index out of range I have searched for this error but i cant figure out the problem in this code.Please help me... import nump...
Python: Download CSV file, check return code? Question: I am downloading multiple CSV files from a website using Python. I would like to be able to check the response code on each request. I know how to download the file using `wget`, but not how to check the response code: os.system('wget http://exampl...
Intellij/Pycharm can't debug Python modules Question: I use **PyCharm** /**IntelliJ** community editions from a wile to write and debug Python scripts, but now I'm trying to debug a **Python module** , and PyCharm does a wrong command line instruction parsing, causing an execution error, or maybe I'm making a bad confi...
python picamera OSError: dlopen(libmmal.so, 6): image not found Question: I am trying to use picamera to do a video streaming on my Mac(python 2.7). I have installed picamera by this command: **(venv)55-213:video_streaming mreko$ pip install picamera Requirement already satisfied (use --upgrade to upgrade): picam...
SBCL Run Shell Command Question: I've seen [Executing a shell command from Common Lisp](http://stackoverflow.com/q/6065446/1281433) and its answers, but I'm still not sure whether SBCL provides a way execute shell commands from code. The [SBCL Manual](http://www.sbcl.org/manual/#sb_002dposix) does support POSIX, but I...
Maya, Python, How do i get the name of an object based on vertex selection? Question: I got the code working like this until i realized that the vertex index changes for geometry with over 100 vertices... I assumed i could just split the string and everything would be dandy import maya.cmds as mc se...
Compiling Python script to exe Question: I recently created a script using Python 2.7 and pygame. I have tried using `py2exe`, but when I run the file it created, it gives me this error: G:\Downloads2\GAME\dist\ANNECUTE.exe\zipextimporter.py:82: RuntimeWarning: import display: No module named _view (...
How to normalise unique dates for graphing Question: I've currently got a data-set from an application, but the problem is the data is listed whenever it changes, not on a regular interval. For example I could have 20 entries in one day and then nothing for two days, then one, then one next month. I want to graph the ...
python with app engine error import ndb Question: I have a problem with app engine, I use it with django. I read a lot of thinks about the problem, but I never find a solution. I use Pycharm for the development, I just use app engine in the models.py For import ndb I make this : from google.appengine.ex...
Unable to process python subprocess stderr on windows Question: I am trying to simple file copy operation using `dd` under Windows. The code is simple. Just open the command using subprocess and read `stderr`. Then process the `stderr` to show the progress of the operation. Here is the sample/simple code which I an try...
python - igraph plot not available (cairo already installed) Question: I've installed py2cairo using brew, but keep getting errors when trying to plot with igraph. I get the following error: >>> import igraph as ig >>> from igraph import * >>> UG = ig.Graph() >>> UG.add_vertex('a') >>> UG...
Unit Testing JWT token exipiration: Django REST Question: How do I test the case of attempting to refresh an expired token? Or the case of trying to exceed `JWT_REFRESH_EXPIRATION_DELTA`? I'm looking for the most pythonic/djangotacular way to unit test a token refresh endpoint. AFAICT, my endpoint is working fine-it's...
Open SSH connection on exit Python Question: I am writing a little script which picks the best machine out of a few dozen to connect to. It gets a users name and password, and then picks the best machine and gets a hostname. Right now all the script does is print the hostname. What I want is for the script to find a go...
Python continue for loop after exception Question: I'm trying to create a new version of a file that excludes NULL bytes. I'm using the code below to attempt this however it's still breaking on the NULL byte. How should I structure the `for` statement and `try-catch` block to keep going after the exception? ...
how to make a function work in python Question: I wrote the following code in python and it works fine until I try to make it a function, can anyone help? import random def club(): members=int(input("members")) print (random.randint(1, members)) Answer: You have to use 4 spaces ( o...
Keeping Score in python code Question: What do I have to do in order to have a score board for my code because I need a score board. I tried a while statement but got lost there. Can you help me? So lost. import random def main_menu(): option = input("Play the game (P) , View the game credits...
asking for alternate method apart from eval in python Question: **Problem i am solving:** i am giving liberty to user to make conditions and actions for making rules while inserting data into a database and evaluate these conditions and action, i could not think anything else from using eval , an example of datastructu...
Websocket connection closed with an error "Received unexpected continuation frame." Question: I were just trying to use WebSockets. i wrote server code in python. The server is running fine but when tried to connect to the socket using browser, I'm getting the error > "WebSocket connection to 'ws://localhost:9876/' fa...
Django Sending Email : SMTPServerDisconnected: Connection unexpectedly closed Question: hello i want to sending email activation use django registration redux. this is my setting.py EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' ACCOUNT_ACTIVATION_DAYS = 3 EMAIL_HOST = 'smtp....
How to calculate number of downtimes and Total downtime and average downtime in the below xml file using python Question: How to calculate downtime and average downtime and total down time? Answer: The overallAvailability is an attribute of the tag ServiceAvailabiltyReport, so your code needs to look like this. ...
Django: communicate with TCP server (with twisted?) Question: I have a django application, that needs to talk to a remote TCP server. This server will send packages and depending on what the package is, I need add entries to the database and inform other parts of the application. I also need to actively send requests t...
Color a pixel in python opencv Question: I need to color a pixel in an image. I use opencv and python. I tried `img[x,y]=[255 255 255]` to color a `pixel(x,y)` but it wont work :( Is there is any mistake in this? Can you suggest any method? Thanks in advance. Answer: This works for me, just change it to load yo...
Verifying IP address using regex in Python Question: I am trying to validate an IP address. Following is the code. Can anyone please tell me what is wrong in the code? import re ip = '355.4' m = re.match('^((?:1?\d{0,2}|2[0-4]\d{1}|25[0-5]).){3}(?:1?\d{0,2}|2[0-4]\d{1}|25[0-5])$', ip) ...
Pipe result from subprocess to unix sort Question: I am calling a perl script on an external txt files from python, and printing the output to an outfile. But instead I want to pipe the output to unix's sort. Right now I am not piping, but are writing the output from the perl program first, then doing by combining my c...
Complicated sorting in Python Question: I need to sort a list of strings. However, I do not want to sort it using the first character, so I cannot use `.sort()` I have a list: records = ["Bibble - 1300 / 2000", "Jim Foo - 900 / 2000", "Bibble - 1600 / 2000", "Bibble - 1000 / 2000"] I ...
Ipython notebook 3 disables seaborn settings Question: I just upgraded to IPython Notebook version 3.0 and it's disabling the formatting for seaborn. Here's some sample code that replicates the problem import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import seaborn ...
Convert CSV to well-structured JSON in Python Question: I have a CSV file that is structured as below : `Store, Region, District, MallName, Location` 1234,90,910,MallA,GMT 4567,87,902,MallB,EST 2468,90,811,MallC,PST 1357,87,902,MallD,CST What I was able to accomplish with my iterative ...
check entry inputs in tkinter using a function Question: I trying to create physics calculator using python tkinter but I find it quite difficult. I have done this calculator in Command line interface but I a bit different with tkinter. basically, I have 5 entry boxes and above each one of them a button. the user will ...
How to override the .get() method in requests? Question: I would like the `.get()` method in `requests` to do extra operations beside the `GET` itself: * print out "hello world" (in reality this will be logging) * wait 5 seconds before issuing the actual `GET` (in reality this will be a more complex wait-and-retry...
Django: AttributeError: type object 'MyAppConfig' has no attribute 'rpartition' Question: I am trying to add `view_amodel` permission to my models. I decided to add the permission after migration. So I made following approach. At an_app/**init**.py from an_app.apps import MyAppConfig default_app_con...
Python how to do multiprocessing inside of a class? Question: I have a code structure that looks like this: Class A: def __init__(self): processes = [] for i in range(1000): p = Process(target=self.RunProcess, args=i) processes.append[p] # Start all ...
Issue in reading JSON file in python Question: >>> import json >>> d2 = json.loads(open("t.json").read()) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads return _default_decoder.decode(s) File ...
SQLite select query returns string with a preceeding u in python Question: import sqlite3 #connect to the sqlite database conn = sqlite3.connect('database.db') #create a cursor c = conn.cursor() #select query to return a single row c.execute('SELECT NAME FROM T1') #row contains the retu...
In the context of a buildbot master.cfg file, how do I instantiate a class based on a string using native modules Question: In stock python, I can do the following to instantiate a class based on a string containing its name: #!/usr/bin/env python2.7 import sys class Foo(object): pass cls = g...
How to implement matlab's ismember(A, b) with A being a numpy ndarray and b being a list Question: What is the most efficient way to implement matlab's [ismember(A, b)](http://www.mathworks.com/help/matlab/ref/ismember.html) in python where in A is any numpy ndarray and b is a list of values. It should return a mask as...
Extracting data from webpage using lxml XPath in Python Question: I am having some unknown trouble when using xpath to retrieve text from an HTML page from lxml library. The page url is www.mangapanda.com/one-piece/1/1 I want to extract the selected chapter name text from the drop down select tag. Now I just want the...
Pandas HDF5 store unicode error on select query Question: I have unicode data as read from this file: Mdt,Doccompra,OrgC,Cen,NumP,Criadopor,Dtcriacao,Fornecedor,P,Fun 400,8751215432,2581,,1,MIGRAÇÃO,01.10.2004,75852214,,TD 400,5464282154,9874,,1,MIGRAÇÃO,01.10.2004,78995411,,FO I have two p...
Python: assert call to a list that contains a variable Question: This question follows python 2.7.3 syntax. In unittest framework, suppose I have the following set up: import mock; my_mock = mock.Mock(); my_patch = mock.patch("my_method", my_mock); Now suppose my_method takes on a list argu...
Selenium Connection Error Question: Has anyone run across this error before? I just started getting this error on monday. Why is it having issues with connecting? Selenium will open the browser but will not plug in the url. C:\Python34\python.exe "C:\Program Files (x86)\JetBrains\PyCharm Community Edi...
How to create a combobox that includes checkbox for each item? Question: Fairly new to tkinter and python I was wondering how to achieve a button that would act like this : * Click on button drops down a list (so that's a combobox) * Each line of the list has a checkbox. * Finally if a checkbox is clicked run a...
Using predict() on statsmodels.formula data with different column names using Python and Pandas Question: I've got some regressions results from running `statsmodels.formula.api.ols`. Here's a toy example: import pandas as pd import numpy as np import statsmodels.formula.api as smf examp...
Running remote command with fabric doesn't separate stdout and stderr streams Question: I have a python file like so in my home directory import sys sys.stdout.write('THIS IS STDOUT\n') sys.stdout.flush() sys.stderr.write('THIS IS STDERR\n') sys.stderr.flush() When I run this p...
Is there a way to test correlation between Data X and Binary output Y? Question: I'm trying to find a Python method/library for testing correlation between the independent variables X and the binary output Y.. So for example, lets say I have the following data and output: **X** **Y** 0.65 1 0.11 ...
interpreting bytes as ushorts in Python Question: I need to interpret 16 bytes received over a TCP socket as 8 ushorts. This line correctly receives the data (the 16-bit values of 8 a-d converters), and I can access each byte as an index into a byte array: vals = bytearray(s.recv(16)) And I could ...
How can I monitor a TCP port for packets and timeout if none is received? Question: I'm creating a test client with using python to test my server. It sends TCP data packets to a server, which _should_ send back 1 response to the client in the same TCP connection. If it does not send any response, or sends more than 1 ...
Error writing text into a .txt file in python Question: I am making a program that will 1\. Create a text file 2\. Allow a password to be stored 3\. Allow a password to be changed 4\. Add an additional password 5\. Delete a specific password The problem is in `def delete():`. I put in three passwords on three seperate ...
how do you access rows in tables in html form usibg python mechanize Question: im trying to access the rows in an html form, the html code in the form is as such </script> <form name="calendarForm" method="post" action="/ibook/publicLogin.do" onsubmit="return validateForm(this);"><div><input ty...
Python2: subprocess.Popen() has another output as it runs direct on console Question: When i am running a program in the console, i get some text output. When i am running the same program in Popen(..), with the same parameters, stdout and stderr are empty. I tried everything i could imagine like shell=False and shell...
Using GPXPY to parse gpx file results in not well-formed invalid token error Question: I have a few gpx files which I want to parse and then feed into a GIS format. I've downloaded [gpxpy](https://pypi.python.org/pypi/gpxpy/0.9.8) because I need some of its functions rather than just wanting to extract the lat and lon ...
Can I use SQL to split contents of a table column stored as CSV (comma seperated values) into individual rows in a new table? Question: I see there are a couple of related questions with answers, but not exactly what I need, so I'll ask a new question. I have this CSV file with thousands of rows of store inventories da...
Python 3: Finding word which appears the most times without using import or counter or dictionary, only simple tools like .split() and .lower() Question: I am currently learning Python and trying to solve a free tutorial question. Here is the question. A writer is working on their newest poem, Turing and the Machines...
Copy with Different Memory Address - Python Question: I made a class object I'll call Node. I want to make a copy of an instance of this object. Let's say the original is named "root" and the copy is to be named "start" If I do start = root. When I make any changes to start, it also changes root. This is because the...
Python attribute button error Question: Hey guys im just trying to create a simple button gui (absolute n00b ) but i can seem to figure out whats wrong with my code: ``__author__ = 'Isaac' from Tkinter import * class Application(Frame): """ My smart board application""" def __in...
Fastest way to pack and unpack binary data into list Question: I am writing a script which will read 32 bytes of data from over thousands of files. The 32 bytes consists of 8 pairs of 16-bit integers and I want to unpack them to Python integers to build a list consisting of average numbers. I would then like to print o...