15,181 Topics

Member Avatar for
Member Avatar for vegaseat

The set is an unordered collection of unique hashable elements. All the elements/items in a set are treated as keys. There are several functions that compare two sets. Right now, I will just give you a taste ...

3
331
Member Avatar for vegaseat

Using wxPython and the Boa Constructor, a VB/Delphi like IDE and Visual Builder, this little calculator was a breeze to make. Boa did 90% of the code generation, and I simply added code to each button click event to make the calculations work. I wish every project would go that …

Member Avatar for vegaseat
1
484
Member Avatar for vegaseat

Another application of the Python Image Library (PIL). This time we are loading an image and rotate it counterclockwise by a specified number of degrees. The image is shown rotated and then saved to the working folder. PIL handles a fair amount of image file formats easily.

Member Avatar for vegaseat
2
5K
Member Avatar for vegaseat

There are some pretty fancy things you can do with strings in Python. You can append, convert, justify, join, split, slice, and list selected files of a folder. I just give you a small sample here.

Member Avatar for vegaseat
1
351
Member Avatar for vegaseat

This is an application of the Python Image Library (PIL) and shows you how simple it is to do pixel math on an image.

Member Avatar for vegaseat
2
9K
Member Avatar for leegeorg07

hi, i want to use a usb port, to power a led that i have hacked around with, it is connected to the usb cable, what i want to do is use it to make the led flash, how can i do it?

Member Avatar for leegeorg07
0
91
Member Avatar for kaustubh00

I am new to python. I have a set of commands which I want to convert to a python script. commands are foreach f (`cat ../etc/l.list`) echo $f mkdir "$f" cd "$f" cp ../r/"$f".txt . cd .. end I succeded in creating folders with respective names as listed in l.list, …

Member Avatar for myle
0
184
Member Avatar for catcit

Hello! I need some help regarding a file conversion. I have some .csv files and I need to convert them to .xls (to look exactly as a manually made table, not only to change the extension). The code should not be complex because the files have the same pattern so …

Member Avatar for catcit
0
142
Member Avatar for mhockey14221

Is it possible to make a list with variables in it? I'm making a quick simple harmonic oscillator program from an old Fortran prog to learn Python and I'd like to use a list to control output to a text file. So far I have a list: [ICODE]writeLoop = [t, …

Member Avatar for Gribouillis
0
8K
Member Avatar for Ally89

Hi all I'm needing help with a question in my tutorial due tomorrow... I'm given this file which contains the following: toy201, Racing Car, AB239:2,DC202:2,FR277:2,JK201:1,YU201:1,EE201:1,FW201:1 toy101, Barbie Doll, AB139:2,DC102:2,FR177:2,JK101:1,YU101:1,EE101:1,FW101:1 toy301, Flying Kite, AB339:2,DC302:2,FR377:2,JK301:1,YU301:1,EE301:1,FW301:1 I am now to define a function that gives the following from the above file: >>>load_prods(filename) {'toy301': …

Member Avatar for Ally89
0
130
Member Avatar for amandatm

hi based on this code: [code=python]def load_products(filename): def get_components(parts): """parts is a list of parts and their associated amounts, each separated into groups, split by (',')""" """need to take out each id, take out each integer, an associate them, by putting them in a pair -> return in big list""" …

Member Avatar for woooee
0
108
Member Avatar for foosion

I'm trying to parse xml, but am missing something. In the following, I can get the key, but not the value [code]from xml.dom import minidom xmlstring = '''<search ver="3.0"> <loc id="USAR0433" type="1">Paris, AR</loc> <loc id="USID0192" type="1">Paris, ID</loc> </search>''' dom = minidom.parseString(xmlstring) r = dom.getElementsByTagName('search')[0] res = [] for x in …

Member Avatar for foosion
0
113
Member Avatar for pluring

I use url retrive and reporthook to update wx.gauge. The problem i have is that after just a few updates it stops. I use a simple threading for the downloading process and guess thats the problem? [CODE] def trad(): thread.start_new_thread(download, ()) def download(): for url in open('url', 'r').readlines(): url = …

0
53
Member Avatar for bgk111

Hello all, This will hopefully be a quick and easy answer. I am having some difficulties with multiple lists that have certain characteristics, so what do I have: 4 lists, all the same length that signify: [row] [coumn] [VAR1] [VAR2] So basically I have 2 variables at each location (row,col) …

Member Avatar for bgk111
0
93
Member Avatar for tigrum

Hello I have a txt file with a pattern as below ============================================= Computer name: Abc IP address: 10.10.10.10 User name: user Last pin : Aug 06 2009 10:44:35 ============================================= Computer name: Def IP address: 10.10.10.11 User name: user2 Last pin : Aug 07 2009 10:44:35 ============================================= All I require is …

Member Avatar for tigrum
0
314
Member Avatar for computerfreak97

I am trying to make a python tone generator, and don't know what modules to use. Any suggestions?

Member Avatar for Gribouillis
0
116
Member Avatar for mahela007

I'm trying to learn the very basics of HTML parsing in python. Through these forums I learned what a parser is. [I] " Parsing often means "perform syntax analysis" on a program or a text. It means check if a text obeys given grammar rules and extract the corresponding information. …

Member Avatar for mahela007
0
122
Member Avatar for freon73

[COLOR=#555555]I am a newbie to Python and need to transfer files across an internal network. Are there any coding tips or code snippets that would be helpful? Any assistance provided would be appreciated.[/COLOR]

Member Avatar for Tech B
0
191
Member Avatar for Rete

Hi again, I just had a really quick question. Is there any kind of goto command in Python like there is in Java?

Member Avatar for scru
0
758
Member Avatar for broberts_az

First Off. Total newbie here and first thread so go easy on me. I used the tut from the Starting wxPython (GUI code) thread. I have converted it to a text editor and added some annoying features to mess with my boss. I am able to open a file, edit …

Member Avatar for broberts_az
0
198
Member Avatar for marcinkuptel

Hi, Is there a way to split the string: 'Autocolli\^sion:No^Pack\^age:10DB15' on '^' character, but not if it follows a backslash? I have tried a regular expression like '[^\\]\^' but it removes also the 'o' in 'No'. Marcin

Member Avatar for marcinkuptel
0
87
Member Avatar for harshadaj

Hello, I need to generate graphs(nodes&links) on a web page in python. Please, could anyone suggest libraries/modules which could be used for it? I know about web graphics in Perl, but don't know about python.

Member Avatar for harshadaj
0
75
Member Avatar for shadwickman

For some reason (this hasn't happened to me in the past), any wxPython scripts I package via py2exe crash on my other Windows computer (lacking a Python install). If I try running it on my other machine, I get an error message telling me to look at a log file …

0
88
Member Avatar for rajivgupta1107

Hi, I have an application which writes some data to a file (csv). Now there is python script which is to be invoked once the application writes to the file. The application cannot generate any indication of completion of the process. I thought of opening that csv file and handling …

Member Avatar for woooee
0
99
Member Avatar for PetuniaRose

I am trying again(!) to learn enough Python to be able to process a bunch of files, and have run into something I don't understand right at the beginning. I am using Python 2.5 IDLE on a WindowsXP machine, and going through examples given in a Python tutorial. My understanding …

Member Avatar for PetuniaRose
0
2K
Member Avatar for Lingson

hi, is there anyway to display a .jpg (or other type) images in Tkinter with Python 3.1? From what I read here in the forum, for Python 2.6 I could use the PIL package. But the PIL packages doesnt support Pyton 3.1 yet (from what I read on the PIL …

Member Avatar for vegaseat
0
1K
Member Avatar for sravan953

Hey guys, I am working on a Python project which will enable to watch movies on YouTube easily. I have added 'YouTube Video Downloader' as an add-on to my Mozilla we browser. Now, everytime I enter a list of URLs containing the movie I want to watch in parts, the …

0
67
Member Avatar for tarun02kumar

hello everyone, I am new to python so I need help about [B].pyd[/B] file I have a[B] xxx.pyd[/B] file which is basically a merge of many [B].h5[/B] data files. I have to use this [B]xxx.pyd files[/B](merge of simulations files) and compare it with one experiment data file which is also …

Member Avatar for tarun02kumar
0
413
Member Avatar for eggowaffles

Hey I am obviously new here, but would love to get better at programming. I currently am using Michael Dawson's "Python Programming, Second Edition (for the absolute beginner)" to try and learn it. Anyway he gives code on how to make a very basic tic-tac-toe game inside the cmd prompt …

Member Avatar for mrnutty
0
146
Member Avatar for Lingson

hi, how do I left justify all the radiobutton displayed? For example, I have 5 radio button with different text, each on different row using: [CODE]rb[i].grid(row=i, column=0)[/CODE] Instead of displaying it left justified, its all centered. I tried using anchor='w', but result the same. I tried also to count the …

Member Avatar for Lingson
0
217

The End.