15,181 Topics

Member Avatar for
Member Avatar for romes87

Hi, I am trying to do a simple task in Python but I keep getting error. I have a string stored in a variable and a simple GUI with a button (in 1st.py) which will call another function in a separate file (twond.py) which will split that string and store …

Member Avatar for romes87
0
4K
Member Avatar for alex-VX

I´we been crazy looking on google after this the protocol function won´t work I need to make something happen at those events WM_QUERYENDSESSION WM_ENDSESSION WM_QUIT WM_DESTROY WM_CLOSE Thanks for help yours truly Alexander

Member Avatar for alex-VX
0
292
Member Avatar for htndrum

I need to find a way to print "Cannot find birthday" if the "searchline" is not found in the "pidigits" file. Maybe using a count somehow. I've tried a lot of different things, but I cannot figure it out. I have attached both files. [CODE]import string def find(): blength = …

Member Avatar for htndrum
0
115
Member Avatar for i are smart

please tell me that there is a difference because i've spent an entire week figuring out how to make cTurtle work. Now that I have succeeded, both modules appears to have the same functions. Please tell me that there is a difference

Member Avatar for Ene Uran
0
211
Member Avatar for JasonHippy

Hey all, This isn't so much a question as a heads up... After using python for a few years (mainly doing blender scripts and random console/command-line apps and tools) I've recently started looking into doing some GUI based stuff using wxPython. I've had a look at a few of the …

Member Avatar for JasonHippy
0
519
Member Avatar for Joe Hart

I have a text file that I need to find data and assign it to a variable. I have found code to read and search a file but the information I want is not always constant. The Items in Red will change. Is there a way to find this information, …

Member Avatar for Joe Hart
0
89
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

The End.