15,190 Topics
![]() | |
I finally modernized this code. It is very primitive, but it is nice to have basic version, even it does a lot of mistakes. You could add features, like repetition elimination, or you can check the compete chatbot: [url]http://www.jezuk.co.uk/cgi-bin/view/software/whereskal[/url]. | |
After marking gofish up to a temporary loss I've moved back to my address book. The issue I'm currently having is that webbrowser is opening the wrong broswer. I've set my default browser to firefox (currently using windows vista), and yet the program is still opening IE, however when I … | |
i have this 2 custome modules and when i try to call module turtle i get an error message and i dont know what it means or better said i dont know where seems to be a problem. i think it should work just fine this is the message i … | |
Hi, I am a very new programmer, I started dabbling with python script only 2 days ago because I was on a quest to build a [URL="http://en.wikipedia.org/wiki/Roguelike"]roguelike[/URL] game, and I found a good informative tutorial on how to do this using python and an API called libtcod. So I figured … | |
Hi I am trying open a record from a shelve db I Know that it stops working at `copy = db[opened]` But why please help ASAP #*****START VARIABEL BLOCK***** #file = the database/shelf file #db = the database/shelf object #tapp = to be appended/recorded to the database #keys = a … | |
Hi, This is just part of a bigger program I'm writing, but at the moment I don't know how to do what I'm about to say. So first, the user enters a sentence. Now, I have a text file with sentences to match it to. So let's say the first … | |
Can someone please help me understand where I am going wrong, I am supposed to convert a string of ASCII to text: [CODE] seq=input("enter string ASCII numbers to be converted into text: ") for x in range(0, len(seq)): seq2=chr[seq[x]] print(seq2) [/CODE] Any help will be appreciated!Thanks! | |
i have written a program in tkinter to draw stock graph,there are two strange thing i can't understand the attachment is 'AAU' data file(attachment 1).when you download it ,please save it in /tmp/AAU there is a scrolled canvas in it , 1.strang long line,please see my attachment. i have see … | |
I have no idea what went wrong with my most recent code, but I suspect it has something to do with the following so I'll start there. Did I do something wrong in this? [CODE]cards=['1','1','1','1','2','2','2','2','3','3','3','3','4','4','4','4','5','5','5','5','6','6','6','6','7','7','7','7','8','8','8','8','9','9','9','9','A','A','A','A','K','K','K','K','J','J','J','J','Q','Q','Q','Q'] import random random.shuffle(cards) h1=[] for card in cards[1:7]: h1.append(card) cards.remove(card)[/CODE] | |
Hi everyone. I spent a lot of time figuring out how to get my code to check for user errors and types. I finally got it set up properly, but now I'm getting an error. A number is required on my input. If someone doesn't enter a number or leaves … | |
Hi all, I am trying to extract some text from a HTML page using regex. [CODE]<html> ...some code.... <B><FONT color="green">TEXT to BE EXTRACTED 1</FONT></B><br> <P> <B><FONT color="green">TEXT to BE EXTRACTED 2</FONT></B><br> <P> <B><FONT color="red">TEXT to BE EXTRACTED 3</FONT></B> ....some code.... </html> [/CODE] I want to make a script which will … | |
I am having major issues with nfs, in that server-1 has to mount a file from server-2 before an application owned by another user can operate. The applications will appear to load without the mounted share but they will be just going through the motions and the application will not … | |
I've been on here for a few weeks now and I [B]JUST[/B] found this CI forum, so let me apologize for the late start, "been too busy on Python". I'm a college student, but not in an IT field. Actually I've switched majors so many times it's ridiculous, Elementary Education, … | |
What this program is does is search the text and where the word appear it displays the line. However. I am recieveing a [U]SyntaxError: EOF while scanning triple-quated string literals[/U]. When i try to run in on python 2.6. I dont have a an option of changeing versions. Just need … | |
Ubuntu 10.04 and Python 2.6 I just want to output a simple tone. I have searched the Internet and found there are thousands, if not millions of responses to Google, and the this forum's search engine. I read so many my eyes are crossed. But really, does anyone know of … | |
I was not happy of solution [url]http://chaos.weblogs.us/archives/331[/url] for one line Ceasar cipher, so I wrote my own version without import by using raw_input (change to input for Python3). Chance to play little with memoryview object also. Crypt: give displacement amount for shift Decrypt: give -displacement amount shift | |
hello! i have this problem with this code. I mean everything works just fine except i dont know how to change program to return me new value. in my program i had to make 2 functions. preberiKontakte() to get their names & id and izlusciOsebe(vrstica, kontakti) to get set of … | |
Written in python2.6 I know there are a lot of key loggers out there, but i wanted to try my hand at it. It works like a charm =) [code] #Key Logger #By: K.B. Carte #Version 1.0 ################ import pythoncom, pyHook, sys, logging LOG_FILENAME = 'path\to\log.out' def OnKeyboardEvent(event): logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG, … | |
Can someone please explain these results to me and why they are different: >>> 7339520/(1024.0*1024) 6.99951171875 >>> print "%0.3f" % (7339520/(1024.0*1024)) 7.000 >>> | |
I've been working on getting tkinter to open a window for all dictionary items with keys matching a query. Below is a [B]VERY RAW[/B] piece of code to show what I'm talking about. show() makes the toplevel windows. Also, not that it has so much going on because I isolate … | |
Hi, Last year I posted a question about making graphical representations of sentences, and at the end I did it with matplotlib. Now I wanted to add some more features to it, but I am stuck. you can see the previous post from this [URL="http://www.daniweb.com/software-development/python/threads/282934"]link[/URL] Now, if we assign a … | |
[CODE] Created on Aug 29, 2011 @author: izink001 ''' import pygame from pygame.locals import * from pygame.color import * import pymunk as pm from pymunk import Vec2d import math import sys X,Y = 0,1 ### Physics collision types COLLTYPE_DEFAULT = 0 COLLTYPE_MOUSE = 1 def flipy(y): """Small hack to convert … | |
Does anyone have a idea about this programe, Assume that you are paid on the basis of one cent the first day, two cents the second day, four cents the third day, with the daily amount continuing to double in this way. Design an algorithm and use it to write a Python program … | |
Is there a way to hide or at least automatically minimize the "shell-like" tkinter window, while running it? | |
Hey everyone, I'm checking some bessel functions in python using mathematica, and I can't find anything online about how to import values into python with exponentials. I know how to values with exponents. For example: [CODE]x=2032.43 * 10 **23[/CODE] However, when I read in a data file, say with one … | |
I'm having a terrible time with regular expressions, possibly because I'm using a python2 reference, but maybe not. For example how would I find \s\w within a string and then change that character? | |
I can't seem to find this answer anywhere. All i want to do is write a list of numbers to a file using the file.write() method however i wanted to format the numbers as if i had been using a print statement. When you print you can use %0.2f for … | |
how would I go about assigning more than one value to a dictionary - rather like a list. for example I have students who each have courses. Each student name is a key (unique) e.g as a dictionary student = {"name":"course"} but students can have more than one course student … | |
[CODE]print "creating a text file" text_file = open("write_it.txt", "a") score = 5 name = raw_input("What's your name?: ") score = (score, name) text_file.write(score) text_file.close()[/CODE] getting TypeError: expected a character buffer object Please help. Thanks | |
[code] from Tkinter import * fields = 'Name', 'Job', 'Pay' def fetch(event,entries): for entry in entries: print 'Input => "%s"' % entry.get() # get text print event.widget def makeform(root, fields): entries = [] for field in fields: row = Frame(root) # make a new row lab = Label(row, width=5, text=field) … |
The End.