14,952 Topics

Member Avatar for
Member Avatar for polygon

Dear Folks, I am trying to use python-idiom to reverse a list of lists so that, for example, a = [[1, 2], ['apple', 'orange']] becomes b = [['orange', 'apple'], [2, 1]] My code for this at present is: [CODE] import copy a = [[1, 2], ["apple", "orange"]] if type(a) is …

Member Avatar for Gribouillis
0
2K
Member Avatar for persianprez

Hey guys, I recently found out how to make .py an exe using py2exe and I also found another program called "Smart Install Maker." I bought the license and wanted to let you know if you want to send me your .py, I will package it for you for free. …

Member Avatar for snippsat
0
188
Member Avatar for sindhujavenkat

I am new to PyQt... I wanted to know how to add the contents in each tab of the tabbed view. Also, I wanted to know how to link two widgets./

Member Avatar for sindhujavenkat
0
144
Member Avatar for GoBlue

Hello. I'm new here, and a student taking a course in Python. I'm completely lost as to what I should put in the numerator for this part: [CODE] def compactness(self): # TODO: compute the percentage of filler words to total words # lower percentage is more compact # students to …

Member Avatar for slate
0
91
Member Avatar for Stefano Mtangoo

Hi all, I have been poking wx document and also google but i havent prevailed. All I need is to get all drives C, D, E etc just like my computer is. What is the trick? Thanks

Member Avatar for Stefano Mtangoo
0
102
Member Avatar for persianprez

I want to use a proxy in my code. What I'm trying to do is open a list of proxies from a .txt and load them as the proxy. If I just can get the code to use proxy, I'm sure I can figure out the rest. Here is my …

Member Avatar for persianprez
0
83
Member Avatar for nimmyliji

Hi, How can i pass an xml file from python to flex 3..? Any one can help me...... with example code

Member Avatar for JasonHippy
0
478
Member Avatar for lrh9

I was wondering if anyone knows of any resources about building a custom importer. I've found this: [url]http://www.doughellmann.com/PyMOTW/sys/imports.html[/url]. I am also aware of PEP 302 and PEP 369 and imp and importlib. Are there any other resources I might need?

Member Avatar for lrh9
1
454
Member Avatar for sammyboy289

Hi, im a begginer to python, and i've been doing it a small while now, i've been attempting some puzzles of a website, and have met a small problem, and i can't find it. My code is below and i will explain my problem, ask how to sort it, and …

Member Avatar for sammyboy289
0
92
Member Avatar for neostead

Hi, i'm working on simple fullscreen launcher application, to use it with remote on my HTPC media center to launch xbmc, stepmania, nes emulator, etc I'd like to use png icons with transparency, but there is a problem. In alpha channel of loaded icons i can see the back frame's …

Member Avatar for neostead
0
4K
Member Avatar for purgatoryred

Please forgive my ignorance but forever I've been in the habit of building a library of useful subroutines which I call from an application I am building. Recently the language has been python - a distinct departure from my experience. I've been unable to create a reasonable library. Here's the …

Member Avatar for purgatoryred
0
127
Member Avatar for devsprasad

Hi, I am wondering about how to insert an image(.png) file into excel sheet using python.I have also tried converting .png file into .bmp file, but met with no success. I have tried using insert_bitmap() function, it doesn't give any exceptions. But the resulting excel file that is created is …

Member Avatar for devsprasad
0
29
Member Avatar for pythondjango101

Anyone have a Python logic map or Python logic flow chart? An example can be seen on the right under History: [URL="http://en.wikipedia.org/wiki/Usenet#History"]http://en.wikipedia.org/wiki/Usenet#History [/URL] This would be very helpful for all users.

0
40
Member Avatar for persianprez

I'm trying to figure this out, but every google I do just brings up garbage. What I'm trying to do is split a string at an * I want the string to be in 2 parts basically. So.. Say the string is 2478*72-432*823-74 What I want to do is split …

Member Avatar for persianprez
0
217
Member Avatar for corbenik

Hi,everyone. I've been trying to extend Python's file type but I'm new to Python so I don't know if I'm going about it the right way. I hope someone can help me out with this or point me in the right direction. The problem isn't really subclassing file, but a …

Member Avatar for corbenik
0
116
Member Avatar for Her-o

I have never done any programming in my life but I have decided to go into engineering and in doing so we have to take this intro to programming course and I am pretty clueless. I am starting to get the hang of how python works but to put my …

Member Avatar for jwenting
0
240
Member Avatar for i are smart

Hi, my professor's site is down so I can't access his notes. but basically I need to make a 4 bar mechanism on canvas like this. and then have the top most point draw stuff as the bar rotates etc.. how can i do that with Tkinter? [URL=http://img521.imageshack.us/i/screenshotmn.png/][IMG]http://img521.imageshack.us/img521/8250/screenshotmn.png[/IMG][/URL]

Member Avatar for hondros
0
52
Member Avatar for vsagarmb

I have installed the Python Imaging Library. But i am not able to use it. When I run the script in windows it says "ImportError: No module named ImageGrab" I also created the PATH VARIABLE called PYTHONPATH and gave the location of the installed modules. Please help.

Member Avatar for Stefano Mtangoo
0
283
Member Avatar for Krstevski

Hello... I have problem with regex, I want to get the tables from another site... the regex is re.compile(r'<table.*?>(.*?)</table>') but when I get the tables I don't know how to return the value into the tables. [CODE=Python] #html = the page tbl = re.compile(r'<table.*?>(.*?)</table>') return tbl.sub('', html) #return html without …

Member Avatar for Krstevski
0
82
Member Avatar for garnet2k

hi i use python with twill/mechanize to post some texts to my web sites. strangely it works sometimes and sometimes not. i use twill browser to go to the page with the form, then post the texts and 'press' post button. the fields and button are correct. something like: [CODE]>>> …

0
42
Member Avatar for MacUsers

Greetings everyone!! First of all, I'm a python newbie; my apology in advance if I'm being silly with my question but I really hope some one can help me on this. I got myself a project (just to start) to read iTunes library .xml file - iTunes Music Library.xml - …

Member Avatar for Pupo
0
686
Member Avatar for sosdown

how can i change this string: "f(x)= x + 2-3\nbox = f(2) + 2\nbox = f(f(2)) + 2\nfunc = 3 + 3 * 4 to: "box = 1 + 2\nbox = 0 + 2\nfunc = 3 + 3 * 4\n" or tell me the algorithm to make this happen, i …

Member Avatar for vegaseat
0
61
Member Avatar for code177

Hi all! This is something I've been trying to figure out for a long time now. I have a pixbuf that I'd like to change the hue, saturation and/or brightness with using sliders, however I've not been able to find anything that points me in the right direction. If anyone …

Member Avatar for vegaseat
0
63
Member Avatar for Gribouillis

This snippet defines a class OptCmd which adds line and options parsing capabilities to the python standard lib's cmd.Cmd class. It allows you to quickly write an extensible command line interpreter. To use this module, you will need [url=http://www.daniweb.com/code/snippet234768.html]this other code snippet[/url], saved as a module named 'argv.py'. Enjoy the …

1
1K
Member Avatar for Gribouillis

Some time ago, I was writing a small command line interpreter, with the help of [url=http://docs.python.org/library/cmd.html#module-cmd]the standard module cmd[/url] which offers minimal support for such tasks, and I had the problem that this module doesn't have a function to parse a command line to produce a list argv which can …

Member Avatar for Gribouillis
1
857
Member Avatar for sniperx99

Hello all, I am completely new to python, but unfortunately a professor I am working for needs some code done in it. Basically, I need to look through a file for the word "DATA" and then perform some manipulations (simple algebra) do a long list of numbers (3900 to be …

Member Avatar for sniperx99
0
82
Member Avatar for supanoob

Well, I just wrote the first of my test / learn scripts with TKinter, and they work well (well they do not really do something but this without any errors) So Id thought you also have to learn to make biniarys and have installed py2exe for this job. Well at …

Member Avatar for Stefano Mtangoo
0
99
Member Avatar for supanoob

Post the 2nd try. And here my official statement: I do really hate hate hate hate board where you have 1. to register, 2. to log on, and 3. which have a session timeout. I puts lots and lots of work in a post only to get "ha ha, you …

Member Avatar for Stefano Mtangoo
-3
108
Member Avatar for dude93

See I've made a short little login that works with a dictionary, but I don't know how to add something to the dictionary while the program is running, so if you know how to fix this can you please help. Much apperciated.[code]database = {'name1': '1234', 'name2': '5678', 'name3': '9012'} name …

Member Avatar for Stefano Mtangoo
0
81
Member Avatar for Stubaan

Hi folks I feel like this is a simple task, but being so new to python and not having the time to fully come to grips with it I am utterly overwhelmed... I simply want to replace whatever text is at a particular position in a particular line with the …

Member Avatar for Stubaan
0
5K

The End.