15,180 Topics

Member Avatar for
Member Avatar for JohnJohnUSA

:?: I am using Python IDLE 2.4.3 on Windows XP. I use File->New Window to create a new program. In the Save As dialog, it always takes me to the python program directory (where python is installed). Since this is not where I want to save my source file, I …

Member Avatar for bumsfeld
0
404
Member Avatar for JohnJohnUSA

I ran the following program to retrieve entries from the windows registry on Windows XP: [code] import win32api, win32con aReg = win32api.RegConnectRegistry(None, win32con.HKEY_CURRENT_USER) aKey = win32api.RegOpenKeyEx(aReg, r"Software\Microsoft\Internet Explorer\PageSetup") for i in range(100): Name, [URL="http://www.tek-tips.com/viewthread.cfm?qid=1249756&page=1#"]Data[/URL], Type = win32api.RegEnumValue(aKey, i) print "Index=(", i,") Name=[", Name,"] Data=[",Data,"] Type=[",Type,"]" win32api.RegCloseKey(aKey) [/code] Program output: [quote] …

Member Avatar for a1eio
0
165
Member Avatar for Ene Uran

Does Python have a module to display when a file has been last modified? Also, how do you get the file length?

Member Avatar for bumsfeld
0
646
Member Avatar for msaenz

Hi everyone, I am doing a bioinformatics project and I have this code: [code]def three2one(prot): code = {"G" : "6", "A" : "7", "L" : "1", "I" : "4", "R" : "2", "K" : "3", "M" : "5", "C" : "8", "Y" : "9", "T" : "10", "P" : "11", …

Member Avatar for bumsfeld
0
76
Member Avatar for leb

I need help with my python project. I am supposed to draw something "cool" that includes loops, variables, if-statements, modules, etc. Some ideas given are to draw snails, constellations, a face, daffodils, etc. Anyone help please?

Member Avatar for Jayzilla
0
104
Member Avatar for vegaseat

In case you are curious, I just posted a new tutorial "Python and Multimedia, Part 1, The amazing Webbrowser Module" on DaniWeb at: [url]http://www.daniweb.com/tutorials/tutorial47392.html[/url] I would love some input from our Linux and Unix friends to see how much cross platform the module is. Post any comments in this thread!

Member Avatar for vegaseat
0
198
Member Avatar for Blujacker

In code snippet, there is an example with wx.menu(), but there is only one command in menu. I need moore [code] menu = wx.Menu()#create_menu menu2 =wx.Menu()#menu2 menu2.Append(wx.ID_EXIT, u"Add")#menu2 self.Bind(wx.EVT_MENU, self.a, id=wx.ID_EXIT) #menu2 menu.Append(wx.ID_EXIT, u"PÅ™idat")#menu self.Bind(wx.EVT_MENU, self.Pridat, id=wx.ID_EXIT)#menu menuBar.Append(menu2, "File")#menu2 menuBar.Append(menu, "Soubor")#menu self.SetMenuBar(menuBar) [/code] it doesn't work correct If do i …

Member Avatar for vegaseat
0
143
Member Avatar for Blujacker

Is in wxPython event like root.bind('<Double - 1>,function) i need on one wxButton 2 event, normal and double. How to create this?

Member Avatar for vegaseat
0
98
Member Avatar for Blujacker

How to create an image to wxButton??? this is my button [code] self.button3 = wx.Button(id=wxID_FRAME1BUTTON2, label=u'Hraj', name='button3', parent=self, pos=wx.Point(35, 925), size=wx.Size(20, 20), style=0) self.button3.Bind(wx.EVT_BUTTON, self.OnButton3Button, id=wxID_FRAME1BUTTON2) [/code]

Member Avatar for vegaseat
0
106
Member Avatar for pythonguy

How to activate file typ filter in wxPython file browser I am using wxFileDialog() call for file browsing,I want it to filter all unwanted files in display.

Member Avatar for vegaseat
0
250
Member Avatar for shanenin

I was seeing if I could use python to delete a file upon reboot. I am only able to rename it at reboot, I can't figure out the syntax to set the destination to null. Below is what works to rename the file [code] import win32file import win32api win32file.MoveFileEx("test.txt", "test2.txt" …

Member Avatar for vegaseat
0
445
Member Avatar for Ene Uran
Member Avatar for vegaseat
0
186
Member Avatar for vince_2x

Hi guys! sorry if this question has been asked b4. I just wanna know what is the difference between a==b and a is b? Thanks

Member Avatar for bumsfeld
0
155
Member Avatar for Blujacker

Is possible to display animated image?for example [URL="http://tibia.gamigo.de/images/monster/demon.gif"]this?[/URL] thanks:D

Member Avatar for bumsfeld
0
672
Member Avatar for Matt Tacular

I had that problem a few days ago about running external python programs, which I know know can be done with [code]execfile("filename.py")[/code] But I now have a new problem.... Here is my program I am making for myself: [code]import random from Tkinter import * mainWindow = Tk() strGame="" def dieSimulator(): …

Member Avatar for a1eio
0
2K
Member Avatar for Debbie Webbie

I'm having trouble with a module in my program that is supposed to read in the files in a directory and return those with the .xml extension. When I import the module from the command line it works perfectly and will return a different list as soon as I change …

Member Avatar for Debbie Webbie
0
133
Member Avatar for Taral

Can anybody show me, how can we collapse, expand a pane/window in python? Thanks in advance for the help!!!

Member Avatar for bumsfeld
0
143
Member Avatar for hotteaboi

hi i got this program how do i sort this....thanx alot [URL="http://www.ee.umanitoba.ca/~pcard/371/assignment1.py"]http://www.ee.umanitoba.ca/~pcard/371/assignment1.py[/URL]

Member Avatar for Dani
0
164
Member Avatar for a1eio

I'm trying to use the google/python api, but i keep getting this error thrown at me: HTTPError: HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. I also get this error when trying to use …

Member Avatar for a1eio
0
133
Member Avatar for Matt Tacular

Hey guys, I was wondering if there is a way to include other python programs in your python program. Sorry if there is another thread about this I looked and was unable to find one.

Member Avatar for a1eio
0
197
Member Avatar for girish_sahani

I want to generate all substrings of size k-1 from a string of size k. e.g 'abcd' should give me ['abc','abd','bcd','acd'] Order of these strings in the list doesnt matter. Also order doesnt matter inside the string e.g 'abc' or 'bca' or 'bac' is the same. The following code doesnt …

Member Avatar for a1eio
0
211
Member Avatar for katharnakh

how to read spread sheet in python. I have a package XLW to generate a spread sheet, but i din't find method to read. How to read spread sheet? Please help me. Thanks, kath.

Member Avatar for vegaseat
0
197
Member Avatar for girish_sahani

I have a list of strings all of length k. For every pair of k length strings which have k-1 characters in common, i want to generate a k+1 length string(the k-1 common characters + 2 not common characters). e.g i want to join 'abcd' with bcde' to get 'abcde' …

0
88
Member Avatar for Taral

I am new to this group. Hello to everyone! I am trying kill a thread by setting up traces in the python code. The thread code is given below: ###################################### class KThread(threading.Thread): """A subclass of threading.Thread, with a kill() method.""" def __init__(self, *args, **keywords): threading.Thread.__init__(self, *args, **keywords) self.killed = False …

Member Avatar for Taral
0
379
Member Avatar for girish_sahani

I wrote the following code to concatenate every 2 keys of a dictionary and their corresponding values. e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of features. Now i want to check each pair to see if they …

Member Avatar for a1eio
0
106
Member Avatar for Blujacker

[code] from Tkinter import* okno=Tk() okno.title('Pomoc please') platno=Canvas() platno.pack() def volana_funkce(event): print event.widget oval1=platno.create_oval(10,20,30,40,fill='red',tags='klik') oval2=platno.create_oval(50,70,80,90,fill='blue',tags='klik') platno.tag_bind('klik','<1>',volana_funkce) mainloop() [/code] how to get a name of widget if click on them?e.g i klik on oval1 and function volana_funkce will return oval1.. thanks

Member Avatar for bumsfeld
0
295
Member Avatar for skanker

I want to use wxpython, but when I installed it python didn't recognise the module. I've looked everywhere for help but gotten nowhere so could someone help me out?

Member Avatar for vegaseat
0
144
Member Avatar for girish_sahani

I want to generate all size 2 strings from a list of size 1 string e.g featureList = ['a','b','c','d'] gives ['ab','ac' etc] I wrote this code [code] def genC(featureList): for i in range(0,len(featureList) - 1,1): for k in range(1,len(featureList) - 1,1): if i+k <= len(featureList)-1: colocn = featureList[i] + featureList[i+k] …

Member Avatar for girish_sahani
0
70
Member Avatar for rubiton

Can someone please write the script for connecting to MySQLdb Also if anyone knows a good tutorial form transfering info from a python module into a MySQL table. Thanks in advance.

Member Avatar for rubiton
0
167
Member Avatar for girish_sahani

I want to generate 'substrings' from a string as follows: for each substring j of string,generate the 2 lists [j,string - j] and [string -j,j] e.g If i have a string 'abc' i want to generate the list [['a','bc'],['bc','a'],['c':'ab'],['ab','c'],['b':ac],['ac':b]] Now i tried the following but its not giving me the …

Member Avatar for girish_sahani
0
206

The End.