15,175 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
| 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 = … |
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... | |
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 … | |
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 … | |
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): … | |
[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 … | |
[code=syntax] from random import randint def menu(): while True: print """ \n\n\n\n\n\n\n ____ ___ ____ _ __ ____ _ ____ _____ ____ | _ \ / _ \ / ___| |/ / | _ \ / \ | _ \| ____| _ \ | |_) | | | | | … | |
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 … | |
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". … | |
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 … | |
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 … | |
I need to find more ftp examples, like, after logging in, performing an mget * Any pointers? Thanks. cmn | |
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 … | |
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 … | |
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? | |
| 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 … |
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 … | |
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 … | |
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 … | |
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 … | |
[COLOR="Red"][B]Do I use php or ssh? [/B][/COLOR]If so, please tell me how because I haven't got a clue as to either of them. I'm just a singer who started learning to design one site from the past few months. my site is yummyrestaurants.co.uk. [B]I read this [/B][URL="https://www.google.com/webmasters/tools/docs/en/sitemap-generator.html#execute"]article on how to … | |
Hi there I have following hash related code in Perl that i need to translate in Python if ( exists $legs->{$reference} ) { logg(" 2nd leg of swapes: $ref - merging"); my $swap = merge_swap_legs( $legs->{$ref}, $fields ); $ref = new_fk_ref( $fxall, $ref, $swap ); } else { $legs->{$ref} = … | |
I have finally got my program finished and going. Im now looking to make it look a bit better. While it is processing it shows and empty tk window. How does one go about putting something in here? I'd just like my users to be reassured it is actually working … | |
I am writing a command line dbm editor and have ran into a small issue. If I try to run certain commands (ie add, remove, display) when I do not have a file open, I get the following error: [icode] Traceback (most recent call last): File "C:\Users\William\Desktop\dbmEditor.py.py", line 35, in … | |
Hello friends, I am writing an Application in pygtk ,there i got stuck up with this problem I want to open a text file using any editor using python Can any give some solution to this please ... Thanks in Advance ... | |
Hey everyone, I need help with a Python issue. This is what I have so far: [CODE]scores = [] choice = None while choice != "0": print \ """ High Scores Keeper 0 - Quit 1 - List Scores 2 - Add a Score """ choice = raw_input("Choice: ") print … |
The End.