15,181 Topics
| |
I'm a complete beginner in the programming world, so forgive me for the basic questions. I'm trying to run Peter Norvig's spelling corrector from the Windows XP command line, but am having difficulties. I have a text file of addresses with a number of misspellings. I would like to use … | |
Please I'm new to python and I'm trying to understand a line of code. Can someone please explain to me the implications of the addition of the for loop inside brackets with the random integer generator. Thank you for i in range( 0, 50 ) : ran_values = [ random.randint( … | |
Hi! I have been using igraph to generate graphs representing social networks (i.e. people are represented by nodes/vertices and connections between people are represented by edges). This has been going well, and I've managed to plot these relationships with some success. My question: Can I associate a 2-D position with … | |
Hi, can someone please tell me if there is a way to make my server accessible from the outside world? it works pretty well on localhost. I tried port forwarding, opening the ports it uses, but nothing works. I read somewhere that it only allows connection from the same network, … | |
Which module would I look into to capture things like disc read/write speed, as well as possibly capture what the disk is reading/writing at the time. I would like to make a diagnostic module to check if my disc speed is taking a hit, as I rebuilt a PC and … | |
Hello All, I'm trying to write a function that outputs the reverse of the input. I know that you can use the built-in list.reverse() or S[::-1] methods, but I want to make it using the 'for' loop. My code initially is: def reverse(S) for x in S: print(x, end = … | |
I have taken up the Python Challenge and I am stuck on challenge 6, which requires PIL - and sadly I am using 3.2 and there is no PIL support. Yes, alternatively I could simply download 2.7. However, I know there are some differences between 2.x and 3.x and I … | |
Hi I'm trying to use PySerial and I'm getting "Access Denied". I don't know if this is a bug from PySerial library or I'm doing something totally stupid :-) Specification: Windows XP pro SP3 PySerial-2.5.win32 (Installed from binary) Python 2.7.1 (I know it's a bit old :-)) [CODE] from serial … | |
Hi, I'm trying to read IP and login info from a text file params.txt. The contents of the text file are: IP = '1.2.3.4' UID = 'anonymous' PWD = 'my@my.com' Upload Directory = '/' Home Directory = 'C:/Users/MyDocuments/Python/FilesUpload/' Can someone help me please? import ftplib import re import os import … | |
I am currently trying to load a few script through boost python. I ran into some trouble today while trying to launch idle from it however and I cannot figure out the cause of the issue. This is on a windows 2008 machine, and I am currently running Python 3.3 … | |
#Dictionary practice def menu(): print("1. Add name and number") print("2. Print the directory") print("3. Quit") options = 0 directory = {} while options < 3 : menu() options = int(input("Enter your desired option :")) if options == 1 : print("You selected to add name and number") name = input("Enter name … | |
Hey guys, I'm new here, and I'm new to Python. So I've got a sample program: a = raw_input("Enter some text: ") while a != "quit": print a a = raw_input("Enter some text: ") print "Are you sure? (y/n)" b = raw_input() if b == "y": exit I was wondering … | |
I've data showing on page using list and inluding some other fields. When I submit the button, I can take web elements using form["name"].value but how can I get the objects from form? or is there way to get the objects without web form in python? | |
While I was trying to write a small program to preview DjVu files I encountered a peculiar problem. This is a small function that renders a page of a DjVu document into QImage class of PyQt4. import djvu.decode as DjVu from PyQt4.QtCore import QImage from PyQt4.QtGui import QPixmap, QApplication, QLabel … | |
Hi I have a script that makes FTP requests, HTTP requests and stores files. It needs to be run daily, ideally I would like for it to be run in the cloud. I thought about using Google App Engine, but I have heard you can't make FTP requests using their … | |
I am hoping someone might point me in the right direction. I am still very newbie with coding and python. I am currently trying to open a zip file and I keep getting "file is not a zip file". I have checked using “file” in terminal and it shows as … | |
Hi, so im writting a Python program, and ive hit a spot of bother "TypeError: unsupported operand type(s) for %: 'list' and 'int'" #if n is 1 the sequence ends #if n is even the next n of the sequence = n/2 #if n is odd then the next n … | |
Terminal shows foloowing error on entering command for "post review". "Unable to find a Review Board server for this source code tree". can you suggest how to set review board server url. | |
Hey guys, I've done alot of work coding a script that works great in Python. I hope to move it into java then hopefully into an android app. Any advice on getting started? I have searched and searched and cannot really find a good way to do this. I had … | |
How do I commit to svn in after posting a review request and being reviewed . Please elaborate | |
Anyone know any good online.. I guess.. challenges or tutorials that will teach the fundamentals of the automated QA process using Python? Is it simply TDD? Or is there more to it? If it is TDD, can anyone suggest where to practice this more, other than "come up with a … | |
I have a function and want to use time.sleep(2) everytime an attack happens, but what ends up happening is the time.sleep(2) will work for the first player and enemy attack, then the program will print the rest of the attacks instantly. Does anyone know what I'm doing wrong? def attack(player, … | |
Hi, I have a HTML page in one variable. I need build a mehod that will extract a tag content (dif extract_tag(self, tag_name)). For example, given webpage: <div id="mw-page-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div> <!-- content --> <div id="content" class="mw-body"> <a id="top"></a> <div id="mw-js-message" style="display:none;"></div> <!-- sitenotice --> <div id="siteNotice"><!-- centralNotice … | |
i searched a llot but in vain. can anyone help me with how to include code written using GTK+ as module in a code that uses wxpython as toolkit. any help whatsoever is appreciated. | |
I am trying to pipe username and password (not to pass through command line for safety purposes) from one python script to another python script with some arguments. I was successful in perl implementing the above like this program - perl1: open(INPUT,"|perl my.pl $arg1 $arg2") or die "cant fork $!"; … | |
Just a simple text editor using the Tkinter expansion TIX. You are encouraged to improve this program with added functions. TIX is included with the latest Python distributions. | |
Hi, I'm really new to both Pygame and Python. To get started, I just want to create a basic program of a sprite called "Player" in a background that responds to keyboard input. I pretty much just want to program it to move left and right in response to the … | |
Here are instructions for voting for winner of the code snippet competition! http://www.daniweb.com/community-center/threads/429756/code-snippet-contest-...-cast-your-vote | |
Hi, I have some data like this, Actualy bigger than this more than this column and more than this rows. Run1 Run2 Run3 RUN4 Run5 1 23 123 1234 12.33 2 12 124 1225 13.123 3 15 125 1345 32.32 4 18 135 1456 12.23 5 19 137 1563 12.43 … | |
Hi again I have another query I a struggling with that I would like to get some advice on. Basically put as part of a process we have a number of shortcuts created. These are Windows shortcuts based on an item id - so an example would be 1000.lnk Also … |
The End.