15,181 Topics

Member Avatar for
Member Avatar for snowfish

hi, i think i should add a password protection for my app.When the application starts, ask the user to enter the password. If the password is valid, the app continues to work normally. If the password is wrong, ask them to enter it again or close the app. if there …

Member Avatar for lllllIllIlllI
0
10K
Member Avatar for vidaj

Hello I'm building my own html parser in python, and have ran into some problems. First off, I'm using python 3, so I can't use the old bundled sgmlparser, or beautiful soup and could not find windows binaries for lxml, so I'm rolling my own. It is for my master …

Member Avatar for vidaj
0
1K
Member Avatar for pythonator
Member Avatar for Malestryx

Good evening, I was wondering how I could set up a loop for the following code that will exit the loop when the person types done. Would the while command work to do that? [ICODE] def hours(): hours = input("How many hours did they work?: ") return hours def payrate(): …

Member Avatar for woooee
0
88
Member Avatar for originalremix

Hi all, New to these forums, i've just started learning python, and for my class i have one question that i have to do that i understand but aint to sure about what exactly is required. "Design, code and test a comp program that reads a character entered from the …

Member Avatar for woooee
0
170
Member Avatar for chaney44145

I am having some problems with python. If I use IE to POST data to a page using a simple form, I get the following [code] POST /automa/auth.php HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* Referer: http://maroon5/automa/login.php Accept-Language: en-us Content-Type: application/x-www-form-urlencoded UA-CPU: x86 Accept-Encoding: gzip, …

Member Avatar for chaney44145
0
182
Member Avatar for dgtvr

I'm a total beginner to Python (most of my knowledge is in OO languages). Could you someone point me in the right direction for learning how to pull information from tables and drop-down menus from websites?

Member Avatar for chaney44145
0
80
Member Avatar for ning2009

Hi, there I have some lines in a text file as 159 J=1661,3169,1679,3181 SEC=SLAB2 66 J=5597,5596,7523,7522 SEC=WALL1 How can I delete "SEC=SLAB2" or "SEC=WALL1" and modify the roginal lines into new ones, if I have RE functions 159 J=1661,3169,1679,3181 66 J=5597,5596,7523,7522 I am using and stuyding Python. Please forget me …

Member Avatar for ning2009
0
107
Member Avatar for Oakie

Hey guys, I'm taking an intro level course on Python and i need to figure out how to get roman numerals to their integer values so far i have this... [code=python] romaninput = raw_input("Enter the roman numeral to convert to Arabic: ") I = 1 V = 5 X = …

Member Avatar for Oakie
0
1K
Member Avatar for Straightone

Okay I am having trouble changing the inputted roman numeral into arabic number so I can add them up what am I doing wrong? I know I still have a lot to go but I cannot even get the first steps right. I am new to python.... so the hard …

Member Avatar for GrimJack
0
2K
Member Avatar for Malestryx

Good evening, I am new to this website. And I am also new to Python. Actually I am currently in a Python class at school. I am having some difficulty with this Payroll Program. I was wondering if anyone could help. Here is my code: def hours(): hours = input("How …

Member Avatar for woooee
0
104
Member Avatar for s_jmp
Member Avatar for zain kazmi
0
87
Member Avatar for srk619

hi, im having difficulty with this python question as i am new to python. the question is: Draw up the list of possible inputs for a half adder and the outputs that you expect. Implement a half adder in a few lines of python, so that the variables o1 and …

Member Avatar for srk619
0
2K
Member Avatar for shibby

Hi, First off I would like to say how much I like python, it really is an amazing programming language. Anyway I am using python and wxpython and have made a program with a text entry field. I have added a tooltip, but the tooltip only shows up once every …

Member Avatar for shibby
0
75
Member Avatar for ning2009

Hi, there Asssuming that I have some lines below 28 J=5202,5204,7497,7498 SEC=WALL1 1185 J=289,3875,2673 SEC=SLAB2 I would like to count number of digital after "J=" on the above two lines in a text file. I am expecting results below the first line: 5202,5204,7497,7498 =====> Answer: 4 the second line: 289,3875,2673 …

Member Avatar for ning2009
0
103
Member Avatar for tillaart36

Hello all, I have some difficulty with something I want to do: I want to 'measure' the likeness of two lists of integers. What I mean is I want for example to compare: list1 = [0, 0, 1, 1, 0, 1, 0] list2 = [0, 0, 0, 1, 1, 1, …

Member Avatar for tillaart36
0
241
Member Avatar for silverflashh

Okay so here is the deal. I'm very brand new to anything when it comes to programming. I decided to try python out. I'm attempting to do the very first project but I keep getting a syntax error. Here is my code: [QUOTE]1. print "Hello Monty Python!"[/QUOTE] I get the …

Member Avatar for shadwickman
0
93
Member Avatar for tomtetlaw

I dont know if this is the right forum for this, and please move this thread if it is but i want someone to help me with making a game with python it will be a text game, with charactor creation, fighting, exploring, and lots more, so PM me if …

Member Avatar for shadwickman
0
82
Member Avatar for yj2009

Got this memory error frequently in CherryPy so some of our users could not access many pages. 2009/04/01 21:18:14 INFO Traceback (most recent call last): File "D:\Python24\lib\site-packages\cherrypy\_cphttptools.py", line 274, in run finalize() File "D:\Python24\lib\site-packages\cherrypy\_cphttptools.py", line 576, in finalize content = ''.join([chunk for chunk in response.body]) MemoryError Anyone could recommend some …

Member Avatar for adam1122
0
54
Member Avatar for Skimy

I'm trying to write a program for a small school project. It involves a use inputing two numbers one representing kills and one deaths. The user inputs the numbers than the program should divide the kills by the number of deaths and put out the number. My problem is that …

Member Avatar for chaney44145
0
114
Member Avatar for rajasekhar1242

hi everyone, i have wrote the database code like this try: import MySQLdb import _mysql_exceptions as DB_EXC cxn = MySQLdb.connect(host='10.0.2.2') if(cxn != 0): tkMessageBox.showinfo("Text", "you can update ur local database to server") else: tkMessageBox.showinfo("Text", "there is no connection please try again") cxn.close() except ImportError , e: return None when there …

Member Avatar for chaney44145
0
148
Member Avatar for wolih

Hi. I have the terrible problem that I never finish my projects because i get bored or distracted with other stuff. So, I wanted to make something really easy: text-game. Its about greek warriors in the olympics, so I need to assign a large number of attributes to each warrior. …

Member Avatar for tomtetlaw
0
99
Member Avatar for breatheasier

Hi, I have 2 columns of data, separated by a space, which I am trying to import into 2 variables as a tuple. Each column as a variable. I know the program would involve something using line.split() or line.strip() but I can't figure out how I would do it. Also …

Member Avatar for breatheasier
0
176
Member Avatar for tomtetlaw

i have written a simple text game and i would like people to comment on my style and comment on things that i could improve on. [code=python] #=============================# # Copyright Tom Tetlaw (c) 2009 # #=============================# import random items = ["pot plant","painting","vase","lampshade","shoe"] keyLocation = random.randrange(1, 5) print "You went to …

Member Avatar for adam1122
0
100
Member Avatar for LateNiteTippin

I'm very new to python, so this is very basic. I'm using the same basis i used on an add row program, which is probably why it comes up adding a row. When i read it back to myself, it seems to make sense. Thanks in advance for any help. …

Member Avatar for LateNiteTippin
0
2K
Member Avatar for coder_gus

Hi, I am in deep need of some good ideas about how could I test an application server written with twisted, testing it with twisted trial. The way the application server works is by using a home-made XML protocol. A client logs in by sending an authorization request, it receives …

0
50
Member Avatar for srk619

hi, does anyone have or know were i can get some coding for a fractual curve any curve that is or may be a Dragon Curve. thanks

Member Avatar for srk619
0
94
Member Avatar for tschafer204

I wrote my rock paper scissors game for glass, but i used a recursion and not a while loop. I haven't been able to get my while loop to work at all, part of the reason i didn't put it there in the first place. Also, i have to test …

Member Avatar for jlm699
0
919
Member Avatar for drew7py

Hi pythonians I am trying to sort a Numpy array by field, but I am having trouble setting up the fields. I think I may have the dtype wrong. I keep getting a TypeError: "expected a readable buffer object". Here is a sample of the infile: 1480 CL 9 2004 …

Member Avatar for drew7py
0
2K
Member Avatar for n1ke

Hi everyone! First, sorry for my bad English! I have a problem with httplib... I must send XML contain throu HTTP protocol, and here is my code [CODE] import sys import httplib xml = """ <?xml version="1.0" encoding="utf-8"?><!DOCTYPE Doc SYSTEM "TenorOAM.dtd"> <Doc date="1196693972484" from="10.1.1.180" nid="CMS000001" sid="94" to="85.90.74.15"> <ReqMsg><MsgHead mid="1"/><Cmd><New><ObjPath><Instance otype="Null" …

Member Avatar for donnygat
0
117

The End.