In the 2.x series of the Python programming language, 2.7 is the latest, and last, major release.

learn more… | top users | synonyms

0
votes
1answer
10 views

subset and transpose python arrays

I have an array [['a','1'.'2','3','4'],['b','5','6','7','8'],['c','9','10','11','12'],['d','13','14','15','16']] I want to subset this and transpose. For transpose it i tried zip function but it ...
1
vote
1answer
6 views

Python CGIHTTP Server

I found this code for a cgihttp server @ http://svn.python.org/projects/python/branches/release27-maint/Lib/CGIHTTPServer.py (along with many others). The scripts look great and flawlessly well ...
0
votes
2answers
12 views

Stuck in while loop when writing to file

My code is: f=file('python3.mp3','wb') conn=urllib2.urlopen(stream_url) while True: f.write(conn.read(1024)) where stream_url is the url of a stream I'm saving to disk in mp3 format ...
0
votes
1answer
25 views

Python name error after importing file

I'm playing with Python on my Mac, it's the default installation, version 2.7.2. For some reason, when I import a file in my current directory, it successfully imports, but when I try to call a ...
-2
votes
2answers
29 views

Where do I store image that I am going to use in my python script?

I am trying to render an image in tkinter. I have seen many scripts on stack overflow on how to make an image, but when I try that it says that my picture does not exist. Is there a certain place ...
0
votes
0answers
3 views

Python library for caldav server (owncloud)

I run owncloud on my webspace for a shared calendar. Now I'm looking for a suitable python library to get access to the calendar (read only). I want to put some information of the calendar on intranet ...
-5
votes
0answers
29 views

Negative modulus python [duplicate]

I don't understand modulus works with negative integers, e,g -4%7, -5%2, 2%-3 Please somebody explain me that issue because it looks very useful. Thanks in advance!
0
votes
1answer
14 views

raw template comes up in the screen at django

I have this in the url.py from django.conf.urls.defaults import patterns, include, url from django.views.generic import ListView from blog.models import Post urlpatterns = patterns('', url(r'', ...
0
votes
1answer
36 views

Reading C structs from file in python

I have very little experience with C, so I apologize in advance if something I say does not make sense. I am working on a project in which my entire base of code is written in python 2.7. I am at a ...
-2
votes
0answers
24 views

I need help. I want to work a code in python [on hold]

I wrote a if nick in admins but it is not working: The code: # -*- coding: utf-8 -*- """ Program: CowBot Version: 0.0.2 Author: banhammer Editors: Cam Description: CowBot is a bot designed to send ...
0
votes
2answers
9 views

user authentication script to run program using python

i am new on python and just started learning, i want to create a simple script to run a program by authenticating user, valid or not... main problem, i am facing is that i have a file "users" in which ...
0
votes
1answer
24 views

Python Datetime and date types

Slightly different question from this one. Are datetime.date objects a subset of datetime.datetime objects? Are there instances when a variable may be both a datetime.date type AND a datetime.datetime ...
0
votes
2answers
12 views

python map function passing multiple parameters

First of all I need to use map function in python and not comprehensions to implement multiprocessing My initial version of a list comprehension is as follows t3List = [x for x in rowCost if ( ...
0
votes
0answers
10 views

Python for Keithley

I hooked up the Keithley 2701 DMM, installed the software and set the IPs right. I can access and control the instrument via the internet explorer webpage and the Keithley communicator. When I try to ...
0
votes
4answers
33 views

What is inf and nan?

Just a question that I'm kind of confused about So I was messing around with float('inf') and kind of wandering what it is used for. Also I noticed that if I add -inf + inf i get nan is that the ...

1 2 3 4 5 563
15 30 50 per page