15,181 Topics

Member Avatar for
Member Avatar for the_mia_team

Got this project and started with some guide, you guys think im heading in the right direction? also how would I bring up the 10 channels when the guide function is called? [QUOTE]The program always display the current mode of the Tivo: A. viewing live channel B. channel recording C. …

Member Avatar for the_mia_team
0
476
Member Avatar for joshua91

could someone please help me in forming a loop as i am stuck... [CODE] def numbergen(): randomnumber = random.randint(0,100) print randomnumber def main(): Question = float(raw_input("Do you wish to play the Guess a Number Game?(Y/N)")) for Question: if Question == N: break else: print "randomnumber" main()[/CODE]

Member Avatar for Hummdis
0
155
Member Avatar for rasizzle

Hey Guys, I'm trying to do a basic line graph here, but I can't seem to figure out how to adjust my x axis. [CODE]from pylab import * plot ( range(0,10),[9,4,5,2,3,5,7,12,2,3],'.-',label='sample1' ) plot ( range(0,10),[12,5,33,2,4,5,3,3,22,10],'o-',label='sample2' ) xlabel('x axis') ylabel('y axis') title('my sample graphs') legend(('sample1','sample2')) savefig("sampleg.png",dpi=(640/8)) show()[/CODE] And here is the …

Member Avatar for woooee
0
364
Member Avatar for pietromarchy

Hi guys, I need your help. I am using python to synchronize several c programs. For one of these programs I need a dynamic interaction. I know there are several option: I am interested in the simplest one becouse I am noob. Python code and C code have to exange …

Member Avatar for pietromarchy
0
536
Member Avatar for LarZ

Hey guys, here's a simple one: I'm developing a load test suite (for GSM networks) at the moment and i have scripts that create traffic patterns and all that. I am developing a GUI for the test suite that dynamically adjusts the layout and controls which are displayed on a …

Member Avatar for Dixtosa
0
4K
Member Avatar for Romber

Hi everyone, This is my first time here, so if I don't do everything up to how it should be done, bear with me. Anyways, for a project in my python class I am having trouble generating a webpage with clickable links. I am using Python 2.6.5 and will be …

Member Avatar for Hummdis
0
625
Member Avatar for micka10

Hello, I want to create a client in python that receives mpeg4 stream from an IP camera. I was wondering if there is any rtsp library for python that i can use to send a rtsp request to the server? I'm just starting to learn python, so your help is …

Member Avatar for Hummdis
0
115
Member Avatar for Romber

So what I am trying to do is give a user 4 links of stories that are relating to the topic. (In my specific case, they choose microsoft and I return them 4 top stories about the company). My problem is pairing the description with the link. So far, this …

Member Avatar for Hummdis
0
141
Member Avatar for NotWorking

Hi all, Having some trouble with running a command via Subprocess.Call The error: [TEX]File "/usr/lib/python2.6/subprocess.py", line 470, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.6/subprocess.py", line 621, in __init__ errread, errwrite) File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory [/TEX] Everything works great …

0
40
Member Avatar for daviddoria

I am trying to strip a prefix from a string, e.g. turn [code] VTK/Examples/Test [/code] Into [code] Test [/code] Sometimes the string does not contain the prefix, in which case I would expect nothing to happen. However, [code] >>> S="Main Page" >>> S.strip("VTK/Examples/") 'Main Pag' [/code] You can see that …

Member Avatar for woooee
0
153
Member Avatar for jazzvibes

Hi all, I think I have a fairly basic question. I have a matrix and I would like to find the eigenvalues and eigenvector. In both MatLAB and Python (pylab) I can use the eig() function. Can anyone explain the reason for the differing answers? [CODE]MatLAB Code >> A = …

Member Avatar for Gribouillis
0
2K
Member Avatar for zzstore

Hi, Forgive me if this is a silly question as I am newbie to python. I have to pass a string that contains a few spaces to a python script. How can I get it to read as one argument? Thanks...

Member Avatar for Gribouillis
0
391
Member Avatar for camigirl4k3

these are my instructions: [url]http://tinman.cs.gsu.edu/~raj/2010/sp10/lab6.html[/url] this is what I have so far: [CODE] from myro import * from random import * def moveCell(pic1,cell1,pic2,cell2): x1 = 240*((cell1-1)%3) y1 = 240*((cell1-1)/3) x2 = 240*((cell2-1)%3) y2 = 240*((cell2-1)/3) for i in range(240): for j in range(240): pix1 = getPixel(pic1,x1+i,y1+j) r,g,b = getRGB(pix1) color …

Member Avatar for jcao219
0
200
Member Avatar for python.noob

Hello Friends, I'm using PyQt 4.9... I want to have an IDE with code completion to work with Python and PyQt (since we are storing both the codes in a single file with .py extension).. Once i've tested eclipse and pydev plugin.. It was pretty good to work with.. Shall …

Member Avatar for MikaelHalen
0
1K
Member Avatar for nickles

Hi, I was wondering how to write code that allowed a user to input a mathematical expression for evaluation. For example, I've written a simple method that calculates Riemann sums. [CODE]def riemann(hgLoc, a, b, intervals): sums = 0.0 size = float(b - a) / intervals for i in range(0, intervals): …

Member Avatar for TrustyTony
0
220
Member Avatar for pythonnewbie10

[code=syntax] '''calculate the future value of an investment after 10 years''' def calcValue( initialValue, interestRate ): period = 10 investmentValue = initialValue for i in range(period): investmentValue = investmentValue * ( 1 + interestRate ) return investmentValue def main(): principal = int(raw_input("Enter initial investment amount: ")) interest = float(raw_input("Enter interest …

Member Avatar for TrustyTony
0
73
Member Avatar for pythonnewbie10

[code=syntax] from random import randint def menu(): while True: print """ \n\n\n\n\n\n\n ____ ___ ____ _ __ ____ _ ____ _____ ____ | _ \ / _ \ / ___| |/ / | _ \ / \ | _ \| ____| _ \ | |_) | | | | | …

Member Avatar for TrustyTony
0
179
Member Avatar for tkpanther

Hello again, it is me with another homework hurdle. I am currently tasked with creating a Set class. We are not permitted to use Python's set class. I have looked at Python's set class for hints, but I had difficulty understanding it. We are not allowed to add methods not …

Member Avatar for TrustyTony
0
179
Member Avatar for camigirl4k3

This is the last lab I have to deal with before the end of the semester and I'm stuck beyond reason it really is interesting though but...so many exams and I just can't figure it out 1.The program begins by displaying the following picture in a window labeled "Original Picture". …

Member Avatar for TrustyTony
0
579
Member Avatar for pythonnewbie10

I have this program that i have been working on which plays rock paper scissors game with the user. [code=syntax] '''play a game of Rock, Paper, Scissors''' from random import randint def firstChooserWins( chooserChoice, otherChoice ): #print chooserChoice, otherChoice if (chooserChoice == "Rock" and otherChoice == "Scissors") or \ (chooserChoice …

Member Avatar for TrustyTony
0
147
Member Avatar for capson

Hello, If say I have 5 variables: v1=3 v2=1 v3=7 v4=6 v5=5 and two lists made from these L1=[v1, v2, v3, v4, v5] , L2= [3, 1, 7, 6, 5] and I sort on L2, so that I have, L2=L2.sort()=[1, 3, 5, 6, 7] Is there a way to sort …

Member Avatar for TrustyTony
0
120
Member Avatar for octopusgrabbus

I need to find more ftp examples, like, after logging in, performing an mget * Any pointers? Thanks. cmn

Member Avatar for TrustyTony
0
1K
Member Avatar for toll_booth

I have been fighting the same bug for weeks now with zero success: I am trying to get images to come up on my buttons, but they utterly refuse to show up. Regardless of whether I used my old Python 2.5.1 or now 2.6.5, the following code: [code]'''Minesweeper.''' from Tkinter …

Member Avatar for TrustyTony
0
267
Member Avatar for joegarside90

Hi everyone First post but I have been browsing as a guest for help with my university python project for a while now. There some really great help on here, Thank you! Right I'm doing a beginners python programming unit as part of my uni course, and as part of …

Member Avatar for vegaseat
0
394
Member Avatar for mark185

If using CentOS, my Python application can call os.system, command.commands, popen, or subprocess to issue command line requests, what would be the advatage of installing and using the paramiko module for the same requests?

Member Avatar for TrustyTony
0
48
Member Avatar for cyon

I have a bot that connects to a server. The server code is a base class and the code that processes the data from the server is in a class which inherits the base class. I have two conditions for this assignment: [LIST=1] [*]The entire code should be runnable from …

Member Avatar for cyon
0
155
Member Avatar for smithy40000

Hello all, i was just wondering how you can make a button link to another page, for instance i want the help option on my start menu to link to a help page, if you can understand this can you please supply a small snippet of code, here is my …

Member Avatar for TrustyTony
0
213
Member Avatar for TrustyTony

Ordering objects is one thing that is changing as we will move to Python3 Python 2.6 gives interesting results [CODE]a=[1,'23',('a','b'),False,[[]],[],'bc',['ab','34'],45,'0',{},True] >>> sorted(a) [False, 1, True, 45, {}, [], [[]], ['ab', '34'], '0', '23', 'bc', ('a', 'b')] >>> print True==1 True >>> print False==0 True >>> print False=='' False [/CODE] Python3 …

Member Avatar for vegaseat
0
217
Member Avatar for Skeltpl

Hi I'm pleased to say that my programming in Python is going really well and I've managed to write about 70% of the codes I need (for a data analysis program) and now I'm starting with the last 30%. :) I have a text file containing data from a set …

Member Avatar for Skeltpl
0
182
Member Avatar for Kruptein

I want to fetch a page from a website, which isn't hard at all. But to view that page you have to be logged in (I do have an account on the site). How can I log me in and then fetch the correct page? I thought something with session_id's …

Member Avatar for TrustyTony
0
76

The End.