15,175 Topics

Member Avatar for
Member Avatar for zyrus001

Hi, I'm pretty new to python but thought I'd write something to read [URL="http://www.zyrus.org/log2.log"]this log file[/URL] to try and learn it. Ideally, it will read this log file, match a string and return everything between the "****" delimiters where the string was matched. I'm not 100% sure how to go …

Member Avatar for zyrus001
0
171
Member Avatar for DEATHMASTER

Hi everyone. I'm new here and would like some help with some Python code. I'm trying to use modulus to shift decode an input line (regular sentence or word like "Bill") but I keep going over the regular alphabet in ascii and the "B" becomes an "=" How do I …

Member Avatar for jlm699
0
179
Member Avatar for SomewhereInKS

Basically I am creating a function to determine the perimeter of a polygon based on the vertices. The input parameter is an xyList that contains the coordinates, basically a nested list of coordinate pairs within another list, like so: [ [x1,y1], [x2, y2], [x3,y3], ...] I am using the good …

Member Avatar for snippsat
0
210
Member Avatar for Stefano Mtangoo

Here is what wxPython Demo says about it: [QUOTE="Robin Dunn and Crew"] [COLOR="Red"][B]Although Microsoft has deprecated the MDI model,[/B][/COLOR] wxWindows still supports it. Here are a couple samples of how to use it - one straightforward, the other showing how the MDI interface can be integrated into a SashWindow interface. …

0
53
Member Avatar for Triverske

I tried to start up python for the first time, but it said the handle was invalid, any clues?

Member Avatar for Stefano Mtangoo
0
104
Member Avatar for LinkMaster03

I packed a Python script (that uses pyGTK) into an .exe with py2exe. It runs fine, except that the normal GTK theme does not show up. This is what it looks like when I run the script: [url]http://img33.imageshack.us/img33/4080/16sepwed1827.png[/url] And this is what it looks like when I run the .exe …

Member Avatar for Stefano Mtangoo
0
579
Member Avatar for Friktion

hello every body i rewrote my game into pure opengl and pygame i have finished things like camera movement and other stuff. Now i really need help with the collision it basicly works even if the box/objekt is resized but now i want it to work when the objekt/box is …

Member Avatar for Friktion
0
115
Member Avatar for james27

hi i want to make some auto login script. anyone can help me make this auto login script? i was tried but failed. anyone can make this one to work? thanks a lot [code] import sys,os import mechanize, urllib try: id = 'kimok222' pw = '1qaz2wsx' params = urllib.urlencode({'adult_yn':'N', 'encoding_type':'utf-8', …

Member Avatar for ov3rcl0ck
0
204
Member Avatar for The-IT

hi, I just created this awesome python application and i want to spread it around, but every one has python. I was just wondering if I could compile python source into a linux executable like py2exe, and then compile the executable into a .deb installer file. any help would be …

Member Avatar for ov3rcl0ck
0
249
Member Avatar for AutoPython

Okay, I was thinking about making an encryption algorithm, now the thing with most algorithms is that they follow specific steps. Well, I was thinking, what if you made an algorithm that generated random characters (the kind you see on your keyboard, excluding characters that could crash the program), and …

Member Avatar for ov3rcl0ck
0
557
Member Avatar for SuperMetroid

Here is the code I have so far: [code]import re from urllib.request import urlopen pg = urlopen('http://www.url.com') pg_r = pg.read() pg.close() print(pg_r) print(re.search('(?<=http://user.url.com/)\w+', pg_r))[/code] What I *want* to do with re.search is find the word between the strings '[color=#0080FF]http://user.url.com/[/color]' and '[color=#0080FF]"[/color]' but I'm not sure how to do that.. Can …

Member Avatar for Ene Uran
0
135
Member Avatar for Felicidas

Hi everyone, hope someone can help me or guide me since python really something new for me. I use argv to read some input from user. My problem is i don't know how to read the input as a list. Assume that user should give --n and --file as input …

Member Avatar for Felicidas
0
2K
Member Avatar for tgreco

Hello, I'm not a programmer just a user of an application that won't work and gives a pythonw.exe error whenever it's run. I've tried asking for help on [URL="http://www.techsupportforum.com/microsoft-support/windows-vista-windows-7-support/415953-pythonw-exe-not-responding.html#post2357086"]windows tech forums[/URL] but they don't have any answers so I thought I would try here. Forgive me if this is not …

Member Avatar for tgreco
0
488
Member Avatar for flebber

Hi I want to prompt the user to enter the date dd/mm/year and use this later as part of filename and later as object in file(if this helps searching). Does using datetime ensure that user input will be a valid input? I would like the output to be year-mm-dd My …

Member Avatar for flebber
0
28K
Member Avatar for akie2741

my code is: [CODE] import urllib import urllib2 import re #get URL urla='http://www.sc.iitb.ac.in/~bijnan/personal-details.htm' #connect to this website request=urllib.urlopen(urla) #get html file from this website html=request.read() #get the address from above html file print html [/CODE] How can i find all his addresses in this html,can use the re.complie() method to …

Member Avatar for djidjadji
0
94
Member Avatar for JustAnotherJoe

For weeks I've been using the same code without any problems. I call SIGNAL within a thread and it's working like a charm. Then I bring the same module home to the same environment (Ubuntu Jaunty, Python 2.6) and now I'm getting this error: ValueError: signal only works in main …

Member Avatar for JustAnotherJoe
0
7K
Member Avatar for Mathhax0r

This question, as the title says, is specific to the new file tagging feature in Windows Vista. Basically, I want to make a tag cloud for a certain folder, and in order to do this, I need to access all of the tags of the files in the folder. What …

0
62
Member Avatar for tweak

Well I'm trying to make a phone book program and I need some help what I want to do is add a ListCtrl to my frame so I can see the names and numbers of people in my phone book but I am unsure how to do this. Here is …

Member Avatar for tweak
0
167
Member Avatar for scru

Is there an open source (lgpl, bsd, mit) math parser/lexer library available out there? Has anybody ever written one by themselves (with support for variables, exponents, grouping) and have some tips/hints?

Member Avatar for scru
0
192
Member Avatar for Zaffron

Ok so I am attempting to make a program that downloads files from a site that are similarly named. For example, there is a site with files that are named blarg-0001, blarg-0002, blarg-0003, etc, until blarg-0020. Well the purpose of my code is to download those and everything inbetween but …

Member Avatar for Zaffron
0
104
Member Avatar for smerny

Hello, I'm trying to learn how to create a very simple class just to get the basics of OOP in python. I figure just to learn I'll start with a class where I can create an object and use a method to update a string associated with that object and …

Member Avatar for JasonHippy
0
155
Member Avatar for scrace89

I am new to python and programming this is my first time using the code (first assignment). I need help with writing a program to convert the code message entered by the user into ascii numbers, then find which number occurs 12% of the time, and have it represent the …

Member Avatar for willygstyle
0
277
Member Avatar for leegeorg07

Hi, I have this code: [code=python] import urllib2 as url import webbrowser def extract(text, sub1, sub2): """ extract a substring from text between first occurances of substrings sub1 and sub2 """ return text.split(sub1, 1)[-1].split(sub2, 1)[0] start="http://xkcd.com/" permlist=[] textlist=[] for i in range(1, 638): temp=start+str(i) permlist.append(str(url.urlopen(temp).readlines()[88])) textlist.append(str(url.urlopen(temp).readlines()[77])) for i in permlist: …

Member Avatar for ov3rcl0ck
0
204
Member Avatar for catcit

Hello! As the title suggests I need some help regarding an "open directory" dialog box. I tried this code but every time I run the module it appears a blank window in the back of the dialog box and normally after I select the directory it should disappear but it …

Member Avatar for vegaseat
0
24K
Member Avatar for htndrum

I'm having trouble getting this program to keep going through the lines in the first loop. It just prints out the output for the first (searchline) and stops. Can anyone help me to figure out why it won't keep reading the lines in the birthday file? [CODE] import string def …

Member Avatar for foosion
0
104
Member Avatar for jcmeyer

I need a back-end that can: -be used in python -handle multiple-users reading and writing to a database at the same time -can be accessed on a mapped share drive I have used sqlite but I have read that it is not recommended for multi-user use. I have looked into …

Member Avatar for ov3rcl0ck
0
233
Member Avatar for squareff255

I'm trying to write a python program that guesses a number that the user chooses between 1 and 1000 in no more than 10 guesses and I can not figure it out for my life! I know it's super beginner and there are a lot of problems, but please be …

Member Avatar for snippsat
0
87
Member Avatar for soulrider

Hi all, I'm fairly new to programming in Python, and I have been getting on pretty well. I had a little working program compiled from old code snippets I had found online, converted to working 3.x code and combined together with some of my own ideas to create simple apps. …

Member Avatar for vegaseat
0
267
Member Avatar for akie2741

How can i extact the personal address from html file.. After i get the source from the html file using read() method,what pattern should i consider if i wanna extact the address? Currently i think is use the compile() method to set the matching the address' pattern, but what rule …

Member Avatar for jice
0
138
Member Avatar for akie2741

My code is: [CODE] import re import urllib import urllib2 webURL="http://www.sc.iitb.ac.in/~bijnan/personal-details.htm" #the website is connect=urllib.urlopen(webURL) #connect to this website htmlDoc=connect.read()#get the html document from this website patternIN="Permanent Address" # Where to begin to keep the text patternOUT="</tr>" # Where to end to keep the text (after the begining) keepText=False # …

Member Avatar for vegaseat
0
156

The End.