text
stringlengths
226
34.5k
Syntax error with a simple Python import Question: My GF is trying to follow the [Udacity's Web Development course](https://www.udacity.com/course/cs253) but she ran into a problem. And I can't solve it. It's just at the start when one has to create a "hello world" Python script that runs on AppEngine. So, the files: ...
Ignore certificate validation with urllib3 Question: I'm using urllib3 against private services that have self signed certificates. Is there any way to have urllib3 ignore the certificate errors and make the request anyways? import urllib3 c = urllib3.HTTPSConnectionPool('10.0.3.168', port=9001) ...
Python: Export Messages as .msg using pywin32.client Question: I am hitting a road block with exporting outlook messages as .msg files. I'm not sure on how to accomplish this task. I have a program that currently reads the email and exports the attachments and once it completes it moves the message to a processed folde...
xmlns namespace breaking lxml Question: I am trying to open an xml file, and get values from certain tags. I have done this a lot but this particular xml is giving me some issues. Here is a section of the xml file: <?xml version='1.0' encoding='UTF-8'?> <package xmlns="http://apple.com/itunes/importe...
Write bitarray to file in python? Question: I am trying to write a pit array to a file in python as in this example: [python bitarray to and from file](http://stackoverflow.com/questions/6266330/python-bitarray-to-and-from- file) however, I get garbage in my actual test file: test_1 = ^@^@ test_2 = ...
Python File IOError When Trying to Create File In "w" Mode Question: Python version: 2.6.6 I'm trying to use Python to create a file that doesn't exist by using `open('file/path/file_name', 'w')`. However, I can't hard code the file path in like that since I need to pass it in as a variable containing a path specified...
AttributeError: 'HTTPResponse' object has no attribute 'type' Question: So, I am trying to build a program that will retrieve the scores of the NHL's season through the use of yahoo's RSS feed. I am not an experienced programmer, so some things haven't quite gotten into my head just yet. However, here is my code so fa...
OperationError on first query to django sqlite3 database Question: The beginning of my `settings.py` has the following. import os, sys PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) CURRENT_DIR = os.path.dirname(__file__) TEMPLATE_DIRS = (os.pa...
The flow of a Recursive Call Question: I looked for answers for this question but most were given in programming languages other than Python. Now in this code: def f(n): if n==0: return 1 else: m = f(n-1) s = n * ...
How to get a phone's azimuth with compass readings and gyroscope readings? Question: I wish to get my phone's current orientation by the following method: 1. Get the initial orientation (azimuth) first via the `getRotationMatrix()` and `getOrientation()`. 2. Add the integration of gyroscope reading over time to it...
Adding counter to my Python Web Crawler Question: I've made a web crawler which gives a link and text from link for all sites in given addres it looks like this: import urllib from bs4 import BeautifulSoup import urlparse import mechanize url = ["http://adbnews.com/area51"] ...
finding _collections in python source Question: I wanted to have a look at the python deque class. When I checked [the source code](http://hg.python.org/cpython/file/791034a0ae1e/Lib/collections/__init__.py) , I found the following at line 10 from _collections import deque, defaultdict where exact...
Read from text file and assign data to new variable Question: Python 3 program allows people to choose from list of employee names. Data held on text file look like this: **('larry', 3, 100)** (being the persons name, weeks worked and payment) I need a way to assign each part of the text file to a new variable, so tha...
Import Module CSRF issue: Django Question: Short Notes - I'm trying to call `from django.middleware import csrf` at python shell. its throwing/showing a message. See shell code: C:\>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyr...
Using hebrew on python Question: I have a problem printing hebrew words. i am using the counter module in order to count number of words in my given text (which is in hebrew). the counter indeed counts the words, and identifies the language because i am using `# -*- coding: utf-8 -*- ` The problem is, when i print my ...
Python: Too many values to unpack (dictionary) Question: I'm trying to add key-value pairs to a dictionary by pairing two and two lines from a text file. Why does this not work? newdata = {} os.chdir("//GOLLUM//tbg2//tbg2//forritGB") f = open(filename) for line1, line2 in f.readlines(): ...
Python argparser. List of dict in INI Question: I have a following list in my python module: couples = [("somekey1", "somevalue1"), ("somekey2", "somevalue2"), ("somekey3", "somevalue3"),....] I am storing configurations for my app in "configs.ini" and i use **configparser** tor read it. I checked ...
Fast relational Database for simple use with Python Question: for my link scraping program, written in python3.3, i want to use a database where i want to store the following thing: * around 100.000 websites, just the url, a timestamp and for each website a list with several properties I dont have any knowledge in ...
Python having trouble accessing usb microphone using Gstreamer to perform speech recognition with Pocketsphinx on a Raspberry Pi Question: So python is acting like acting like it can't hear ANYTHING from my microphone at all. Here's the problem. I have a **Python** ( 2.7 ) script that is suppose to be using **Gstreame...
python calculate table without (numpy) Question: Hi i have a quick question about finding line # from my text and use this line# to calculate something (this is not hw question and i just start learning about python) ex~ if my text looks like 100 200 300 400 500 600 700 800 900 120 130...
Forking python, defunct child Question: I have some troubles with Python child processes so I wrote a very simple script: import os import sys import time pid = os.fork() if pid: #parent time.sleep(30) else: #child #os._exit(0) sys.exit() ...
Cannot json dump a python dictionary with id key Question: json.dump({'id' : '3'}) File "/Library/Python/2.7/site-packages/simplejson/__init__.py", line 354, in dumps return _default_encoder.encode(obj) File "/Library/Python/2.7/site-packages/simplejson/encoder.py", line 262, in encode ...
Exporting Python List into csv Question: So I am trying to create a truth table that I can export out into either a csv or excel format. I am a newbie to Python, so please bear with me if my code is horrible. I started with this as my code for the truth table after some research: import itertools t...
increase insertion speed in python Question: I have a script in django which i am running on terminal to update the field values in database , there is about 3000 records to be updated , it updated but it takes so much time. Here is the code: getAge = myplayer.objects.all() for i in getAge: ...
Unit test for only root user in python Question: Does unit test library for python (especially 3.x, I don't really care about 2.x) has decorator to be accessed only by root user? I have this testing function. def test_blabla_as_root(): self.assertEqual(blabla(), 1) blabla function can only...
Python - a set of one type only Question: I want to create a Set class in Python, but unlike the set class that already implemented in Python, I want my set to contain elements of only one type. For example a set of integers, a set of strings and a set of any other user defined class. Is there any way in Python to pas...
Scrapy run from Python Question: I am trying to run Scrapy from Python. I'm looking at this code which ([source](http://doc.scrapy.org/en/0.16/topics/practices.html)): from twisted.internet import reactor from scrapy.crawler import Crawler from scrapy.settings import Settings from scrapy impo...
How do I run my Flask app remotely using MongoHQ and Heroku (Python) Question: I have a script written in Python that lets me consume tweets from Terminal into a locally hosted mongodb database. To improve uptime, I would like to host this script remotely on Heroku and to shoot the consumed tweets into a database hoste...
keyboard emulation with windows and python Question: I'm trying to achieve the same under Windows as I have achieved in Linux environment. Serial to keyboard input, someone please help or point me in the right direction. I'd should be as simple as possible, I tried but failed. import serial import ti...
How to get the status of spawn process in twisted python? Question: I want to trigger many long running processes continiously. And, based on the status returned of each process executed, I need to perform other tasks. In the below example, I'm able to spawn processes, but I'm not able to capture/get the details of the...
MAXREPEAT issue when running Python 2.7 from MacPorts Question: I'm running into some issues with running python2.7 from MacPorts. Here's a list of the available Python versions: $ sudo port select python Available versions for python: none python25-apple python26-apple ...
Python with etc/Shadow Question: so I'm writing this program that needs to check the password hash in etc/shadow and compare it to the password the user entered. I tried encrypting the password with hashlib.sha512, but the result was not the same. I think it's salted some how, but I don't know if it uses a universal sa...
Python: Catch Ctrl-C command. Prompt "really want to quit (y/n)", resume execution if no Question: I have a program that may have a lengthy execution. In the main module I have the following: import signal def run_program() ...time consuming execution... def Exit_gracefully(signal, fr...
Web App to run Python Scripts - Run as a background process. Question: I have a python script which i want a user to run in the server, with out giving a SSH Login permission. I got a web app from below link. [How to connect a webpage with python to mod_wsgi?](http://stackoverflow.com/questions/16122770/how-to-connect-...
Python heapq not being pushed in right order? Question: util.py import heapq class PriorityQueue: def __init__(self): self.heap=[] def push(self,item,priority): pair = (priority,item) heapq.heappush(self.heap,pair) def pop(self): ...
3dplot scatter points via python Question: I just used `numpy.loadtxt('filename', usecols=(0,))` to load a csv with the following format: x,y,z 1.1,2.2,3.3 5.5,1.45,6.77 (There are ~1M lines). I'd like to make a scatterplot. I searched the web and found `numpy.meshgrid` and `mlab.surf` but ...
Python: Parsing Timestamps Embedded in Filenames Question: I am working on a django project with avatar support and the system (which isn't the greatest but needs to be maintained) requires that we embed a timestamp of the form YYYYMMDDHHMM in the user generated avatar files and concats that with the user_id, for examp...
how to extract all the data between &nbsp; Question: <p align="JUSTIFY"><a href="#abcd"> Mr A </a></p> <p align="JUSTIFY">I </p> <p align="JUSTIFY"> have a question </p> <p align="JUSTIFY">&nbsp;</p> <p align="JUSTIFY"><a href="#mnop"> Mr B </a></p> <p align="JUSTIFY">The </p> <p align="JUS...
install Pycuda 2013.1.1 on Windows 7 64bit Question: I followed instructions [here](http://wiki.tiker.net/PyCuda/Installation/Windows#Windows_7_64-bit_with_Visual_Studio_Professional_2008_.28Strictly_Binary_Versions.29) . I have installed all packages from <http://www.lfd.uci.edu/~gohlke/pythonlibs/> (all the latest on...
Python Installation Location (Windows) Question: I need to find out if there is Python installed on the computer. My specific issue is that I am distributing a program that comes with its own interpreter + standard library (the end-user may not have Python). In the installation, I am giving the option to use the user'...
sql import export command error using pyodbc module python Question: I am trying to run the following db2 command through the python pyodbc module IBM DB2 Command : "DB2 export to C:\file.ixf of ixf select * from emp_hc" i am successfully connected to the DSN using the pyodbc module in python and works fine for selec...
Optimizing a python function with numpy arrays Question: I have been trying to optimize a python script I wrote for the last two days. Using several profiling tools (cProfile, line_profiler etc.) I narrowed down the issue to the following function below. `df` is a numpy array with 3 columns and +1,000,000 rows (data t...
How to use IPython.parallel map() with generators as input to function Question: I am trying to use IPython.parallel map. The inputs to the function I wish to parallelize are generators. Because of size/memory it is not possible for me to convert the generators to lists. See code below: from itertools im...
Don't write final new line character to a file Question: I have looked around StackOverflow and couldn't find an answer to my specific question so forgive me if I have missed something. import re target = open('output.txt', 'w') for line in open('input.txt', 'r'): match = re.sea...
Using session in flask app Question: I'm sure there is something that I'm clearly not understanding about session in Flask but I want to save an ID between requests. I haven't been able to get session to work so I tried a simple Flask app below and when I load it I get an internal server error #!/usr/bin...
Python : How do GTK widget instances work? Question: This is driving me litterally crazy : * Why is the method `the_method(self, button)` referencing two separate instances of `self.button` depending on what object calls it? * How do I reference an object instance explicitly? Thank you for your help * * * ...
python: sort a list of lists by an item in the sublist Question: I have a list of lists that contains users and scores as follows: [["user1", 100], ["user2", 234], ["user3", 131]...] I want to produce a list that sorts the users by score in declining order: [["user2", 234], ["user3",...
Python removing words from strings Question: My desired program has to read a text file like this: EASTS versus WESTS EASTS have scored 25:13 WESTS have scored 26:28 WESTS have scored 40:23 WESTS have scored 42:01 and run the following output: WESTS 3 EASTS 1 ...
Static files are not loaded in a Django website hosted on Bluehost Question: as you can see it live on the website: <http://www.workshopvenues.com> the **static** files that are under /assets/* are not loaded correctly. I expect this url (for example) to be valid: <http://www.workshopvenues.com/assets/ico/apple-touch-...
daemon threads in Python Question: After reading: <http://pymotw.com/2/threading/#daemon-vs-non-daemon-threads> I expect following code to terminate after 2 seconds: from threading import Thread from time import sleep def a(): i = 0 while 1: print i ...
PHP silently fails sending data to graphite over UDP using fsockopen and fwrite Question: ## The code I'm sending metrics to [graphite](https://github.com/graphite- project/graphite-web "graphite") via UDP using both php and python. My **python** client looks like this #!/usr/bin/python import time...
Python: how to setup python-ldap to ignore referrals? Question: how can I avoid getting (undocumented) exception in following code? import ldap import ldap.sasl connection = ldap.initialize('ldaps://server:636', trace_level=0) connection.set_option(ldap.OPT_REFERRALS, 0) connection.p...
HTTPError: HTTP Error 401: basic auth failed. Bing Search Question: I have made a code to get urls from bing search. It gives the error mentioned above. import urllib import urllib2 accountKey = 'mykey' username =accountKey queryBingFor = "'JohnDalton'" quoted_query = urllib.quote(que...
How to get Process Owner by Python using WMI? Question: I tried to get some information about Process Owner, using WMI. I tried to run this script: import win32com.client process_wmi = set() strComputer = "." objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator") objS...
Wrong decimal calculations with pandas Question: I have a data frame (df) in pandas with four columns and I want a new column to represent the mean of this four columns: df['mean']= df.mean(1) 1 2 3 4 mean NaN NaN NaN NaN NaN 5.9 5.4 2.4 3.2 4.225 0.6 0.7 0.7...
SocketServer used to control PiBot remotely (python) Question: this is my first question! (despite using the site to find most of the answers to programming questions i've ever had) I have created a PiBotController which i plan to run on my laptop which i want to pass the controls (inputs from arrow keys) to the raspb...
Python : How can two GTK widgets interact with each other? Question: What is the proper way to interact with a button without actually clicking on it? I have a button "button", that can, upon click : * Call the method "the_method" that will print what argument (here "filename") has been passed to it * toggle its ...
Python, How to extend Decimal class to add helpful methods Question: I would like to extend the Decimal class to add some helpful methods to it, specially for handling money. The problem when I go do this: from decimal import Decimal class NewDecimal(Decimal): def new_str(self): ...
Experiment trying to avoid Python circular dependencies Question: I have a testing environment to try to understand how python circular dependencies can be avoided importing the modules with an `import x` statement, instead of using a `from x import y`: test/ __init__.py testing.py ...
Fix newlines when writing UTF-8 to Text file in python Question: I'm at my wits end on this one. I need to write some Chinese characters to a text file. The following method works however the newlines get stripped so the resulting file is just one super long string. I tried inserting every known unicode line break tha...
Importing a large SQL file into a local Firebird database Question: I'm trying to import a large SQL file (15k+ statements) into a new local Firebird database with Python, through [_fdb_](http://pythonhosted.org/fdb/) module. import fdb db = fdb.create_database("CREATE DATABASE 'test.fdb'") ...
Efficiency of infinite loop to service GPIO Question: I'm using Python on Raspbian (a type of linux) on the Raspberry Pi (an embedded processor board) to monitor GPIO inputs. See simplified version of my code below. I have an infinite loop in the python script waiting for something to happen on a GPIO i/p. Is this the...
Folder organization for easy translation Question: I'm making an application in Python that will be released in different languages. So I'm wondering what is the best way to organize a project so you don't have to look for literal strings in the source code and replace them by hand. Here's what I have so far from som...
Using unittest.mock to patch input() in Python 3 Question: How do you use the @patch decorator to patch the built-in input() function? For example, here's a function in question.py that I'd like to test, which contains a call to input(): def query_yes_no(question, default="yes"): """ Adapted from ht...
Is it possible to concatenate list indices in one statement in Python? Question: I have a list that looks like alist = [a, b, c, d, e] and I want to pass it to a function that looks like def callme(a, b, e): pass So, I would like to do something like call...
Main program variables in side programs (Python) Question: How do I use variables that exist in the main program in the side program? For example, if I were to have Var1 in the main program, how would I use it in the side program, how would I for example, print it? Here's what I have right now: #Main pr...
For Loop Functions in Python Question: I am continuing with a Hangman project, and I have encountered a problem with a for loop and performing a function inside it. For example, if you press in a level named 'CANADA', and you press 'B', since there are no Bs in Canada, it should draw the first line of the Hangman. This...
The PyData Ecosystem Question: I have read about PyData in a few places (e.g. [here](http://pydata.org/)), but I am still confused about this term really means. Is PyData an official entity? (e.g. is there a foundation that owns/supports [PyData.org](http://pydata.org/)?). Is it just a conference? Or is it mostly a te...
Reasoning behind Object Oriented Access Specifiers Question: I have a general question regarding the reason for object oriented access specifiers. I have never completely understood the reasoning why they exist and just thought they were there as a very rudimentary form of code-security but after looking at the discuss...
Registration timeout on PBS cluster with Ipython parallel Question: I'm trying to set up ipython parallel on a linux cluster using PBS scheduling. I was following instructions at <http://www.andreazonca.com/2013/04/ipython- parallell-setup-on-carver-at.html> (the official instructions are much harder to follow). I'm r...
Maintaining same settings.py in Windows virtualenv and heroku? Question: Is there a way to maintain same django settings.py in both Heroku and windows local systemI am using postgres database. I believe it is only the DATABASE_URL set as environment variable in Heroku that is making the difference. Is there some way I ...
Programatically determine if a user is calling code from the notebook Question: I'm writing some software that creates matplotlib plots of simulation data. Since these plotting routines are often running in a headless environment, I've chosen to use the matplotlib object oriented interface explicitly assign canvases to...
Python regex substitution using a dictionary Question: I have the following regex to parse access strings inside brackets and remove them: >>> a = 'a[b]cdef[g ]hi[ j]klmno[ p ]' >>> re.sub(r'\[\s?(.*?)\s?\]',r'\1',a) 'abcdefghijklmnop' But what I want to do is have what is in brackets targe...
In Mechanize, how to set the x,y value of ImageButton? Question: I am using Mechanize Python as the web client to submit a form. However, I did not find a way to set the x,y of ImageButton in this form. I have tried different ways: 1) the first is to find the control: bt = frm.find_control('ImageButton...
How do I get django to tell me where I am inside my code Question: I am starting to us logging in my django project at the moment (on step at a time) and I was wondering if there was a way to put where I am in my code into the error message using python. I.e. If I am in `something.views.something_view` how do I get thi...
Opscenter 3.2.x not working on Debian 7 Question: After upgrading to Debian7, opscenter refuses to start with the following error: 2013-08-12 10:09:05+0200 [] INFO: Log opened. 2013-08-12 10:09:05+0200 [] INFO: twistd 10.2.0 (/usr/bin/python2.7 2.7.3) starting up. 2013-08-12 10:09:05+0200 [] I...
Where can I find an updated tutorial for Tkinter Question: I need to write a small application in python. From what I read, `Tkinter` should be a reasonable option to use. I tried several tutorials about it and all said I should import the module using import Tkinter which fails. using ...
How to instantiate objects during a unit test's setup phase in Python Question: I've been diving into unit testing with Python, but can't figure out how I'm supposed to instantiate the object I want to test during the setup phase, and end up with a new object for each test. For example, I have the following class I wan...
ViewDoesNotExist error on linux but same code works on windows, why? Question: I'm currently trying to learn django and I've been messing around with an idea for a website on my local machines. I've run into the following error which I don't seem to be able to solve. When I run the development server on my windows mac...
Plotting a line in between subplots Question: I have created a plot in Python with Pyplot that have multiple subplots. I would like to draw a line which is not on any of the plots. I know how to draw a line which is part of a plot, but I don't know how to do it on the white space between the plots. Thank you. * * * ...
Python: Docstrings are not being updated Question: I have a docstring on the very first line of a Python file called a_file.py: """some text""" When I print this using import a_file print a_file.__doc__ it prints `some text` as exptected. However, whenever I change the docs...
lxml: Obtain file current line number when calling etree.iterparse(f) Question: Since no one answer or comment this post, I decide to have this post rewritten. Consider the following Python code using lxml: treeIter = etree.iterparse(fObj) for event, ele in treeIter: if ele.tag == 'logRoot':...
launching Excel application using Python to view the CSV file , but CSV file is opening in read mode and cant view the data written on it Question: from win32com.client import Dispatch base_path = os.path.dirname(os.path.abspath(__file__)) _csvFilename = os.path.join(base_path, "bcForecasting.csv")...
Get revision value if present,if not get default revision value Question: INPUT:- <manifest> <default revision="jb_2.5.4" remote="quic"/> <project name="platform/vendor/google/proprietary/widevine" path="vendor/widevine" revision="refs/heads/jb_2.6" x-grease...
get the last sunday and saturday's date in python Question: Looking to leverage `datetime` to get the date of beginning and end of the previous week, sunday to saturday. So, if it's 8/12/13 today, I want to define a function that prints: `Last Sunday was 8/4/2013 and last Saturday was 8/10/2013` How do I go about wr...
Get unique combinations of elements from a python list Question: Edit: This is not a exact duplicate of [Python code to pick out all possible combinations from a list?](http://stackoverflow.com/questions/464864/python- code-to-pick-out-all-possible-combinations-from-a-list) This topic is about finding unique combinati...
How to sort higher to lower in Python Question: Hi i need to **sort** a int value in **forloop** and i am running this on terminal, below is the code match = myworld.objects.filter(series=1) for i in match: print i.w which results like 34 32 24 39 32 3...
Python automating text data files into csv Question: I am trying to automate a process where in a specific folder, there are multiple text files following the same data format/structure. In the text files, the data is separated by a comma. I want to be able to output all of these text files into one cumulative csv file...
Python Matplotlib : Just the graph image Question: I cannot get [pyplot](http://matplotlib.org/users/transforms_tutorial.html) to produce "cropped" images, that is, get rid of the grey left and right borders, as it is, it is not an accurate representation of the sound waveform : This sound file has no silence before an...
Is there a way to check if a module is being loaded by multiprocessing standard module in Windows? Question: I believe on Windows, because there is no _fork_ , the _multiprocessing_ module reloads modules in new Python's processes. You are required to have this code in your main script, otherwise very nasty crashes oc...
Why method now in Python is obtained as datetime.datetime.now instead of datetime.time.now? Question: I would like to know why the method **now** was implemented under the datetime.datetime label instead of the datetime.time? For example to obtain today's date on python you do the following. import date...
How to pass arguments to a python greenlet as additional arguments Question: I'm looking for a way to pass function arguments through another function, in a manner identical to Stackless' `tasklet` instantiation: stackless.tasklet(function_being_called)(*args) So far the best way I've come up with ...
how to download attachments from e-mail and keep original filename? using Python/outlook Question: I'm trying to download the attachments in an email from outlook using Python and the windows extensions, so far I've tried the following: import win32com.client outlook = win32com.client.Dispatch("...
Problems Accessing MS Word 2010 with Python Question: I am using Python with Eclipse. I need to access MS Word file with Python. I have seen some examples on this and I have already installed pywin32. I tried some of the examples but I am getting some errors. import win32com.client as win32 word...
scrapy tutorial: cannot run scrapy crawl dmoz Question: I'm asking a new question because I'm aware I wasn't clear enough in the last one. I'm trying to follow the scrapy tutorial, but I'm stuck in the crucial step, the "scrapy crawl dmoz' command. The code is this one (I have written that in the python shell and save ...
python pandas merging data based off 2 keys Question: Right now I have 2 dataframes. One with donor information and one with fundraiser information. Ideally what I want to do is for each donor sum up their donations and store it in the fundraiser dataframe. Problems are that it is possible to have a fundraiser in multi...
Trouble with simple https authentication with urllib2 (to get PayPal OAUTH bearer token) Question: I'm at the first stage of integrating our web app with PayPal's express checkout api. For me to place a purchase, I have to get a Bearer token of course using our client id and our client secret. I use the following curl...
Python: 3D scatter losing colormap Question: I'm creating a 3D scatter plot with multiple sets of data and using a colormap for the whole figure. The code looks like this: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(111, proj...
Python Multiprocessing in a GUI with redirected printing Question: When performing multiprocessing in python using the Process call, I would like to immediately print a completion statement after completion of each process from the parent process rather than in the child worker function. I am doing this in a Tk GUI, so...
Python tempfile Question: I am trying to create tempfile but my python versions do not allow me to proceed and give the following complaints. Do I need to upgrade this version to use tempfile module. Thanks Python 2.4.3 (#1, Jan 9 2013, 06:47:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Typ...