15,406 Topics

Member Avatar for
Member Avatar for jayrodau

I am looking for a xml creator/editor with treeview using Tkinter. I want to be able to load and save changes. Any help would be greatly appreciated or snippets. Thanks!

Member Avatar for vegaseat
0
1K
Member Avatar for hughesadam_87

Hey all, I have been reading some older posts on line/list manipulation, but don't quite understand exactly how to implement all of the tools that you guys are using (line.strip() for example) to get what I need. Essentially, I have a working program that iterates through data and outputs it …

Member Avatar for tdeck
0
21K
Member Avatar for denniskhor

How to move all only one type of file to another directory? For example, i want to move only all .jpg only file to another folder in Python. I know batch is easier to do it, but i prefer in Python. Anyone can help?

Member Avatar for zachabesh
0
134
Member Avatar for pluring

Hi! I'm very new to both python and Tkinter and would be thankful for some help. i want to search a text document for a word and print each line that match the searchword in a text widget. [CODE]def ladda(): fts = 'thefile.txt' file = open(fts,"r") text = file.readlines() file.close() …

Member Avatar for pluring
0
2K
Member Avatar for Morika

Hi, With this tutorial, I've hit a few questions that I'm not sure what they are asking for. It's in the lesson on lists? Could you please advise what it is they are looking for, because to me it sounds like I'm just filling out the argument as shown when …

Member Avatar for woooee
0
86
Member Avatar for zachabesh

[CODE=python]>>> mylist = ['bunnies', 'apples', 'animals', 'fruit', 'amsterdam'] >>> for x in mylist: print '--------------' print x if x[0] == 'a': print "Removing ",x mylist.remove(x) -------------- bunnies -------------- apples Removing apples -------------- fruit -------------- amsterdam Removing amsterdam >>> print mylist ['bunnies', 'animals', 'fruit'][/CODE] The output should be bunnies and fruit, …

Member Avatar for zachabesh
0
92
Member Avatar for Norbert X

Yeah so I was bored in class cuz I didnt know the test wasn't today, so I made part of a Python game. The battling works so far, and I might need some help later on so if anyone could could help me I'd appreaciate it. Norbert Quest: [code=python]import random …

Member Avatar for Norbert X
0
646
Member Avatar for Dan08

Hi everyone, I'm doing some experiences with python in Windows Vista and I was wondering to know how to eject the tray of CDs. Thanks, Dan.

Member Avatar for Dan08
0
224
Member Avatar for themush

Hi, Im trying to parse a bands myspace page and get the total number of plays for their songs. The problem is that I cannot use urllib2 as the "Total plays" string does not appear in the page source. e.g. [url]http://www.myspace.com/mybloodyvalentine[/url] Any idea of ways around this? Thanks, O

Member Avatar for themush
0
102
Member Avatar for Davide Davin

Is possible use svg imge in wxpython in a toolbar for example? I've saw libRSVG but run on PyGTK.

Member Avatar for Davide Davin
0
114
Member Avatar for lblazer05

Sorry for my second newbie question....well now I am dealing with a text file that has the following line: 1e+12 Anyways, so I want to go into the file (named intens.txt) and replace the "e+" so that the line will look like this : 1*(10**12) .....The line will be changing …

Member Avatar for snippsat
0
133
Member Avatar for dp_neo

Hi, I am modifying a script that will be run as a windows scheduled task after hours. This script was written by another programmer previously. The original script includes threading in the code. Should a script that is run as a single job from a scheduler require threading? Thanks.

Member Avatar for wildgoose
0
138
Member Avatar for Clueless86

I have used python for awhile, and am quite good with it. But last week I added the wxpython..I wanted to actually make a program and not a script. So I can do this in normal python all day long. But wxpython is alot different, so I need help with …

Member Avatar for shadwickman
0
368
Member Avatar for computerfreak

I NEED HELP!!! I am trying to make a program somewhat like keynote or powerpoint in python, and I need to know how to make text evenly spread out from the center on the y-axis, I can do that on the x-axis. If you dont get what I am saying …

Member Avatar for shadwickman
0
199
Member Avatar for abhigyan91

hey every1, im a noob pythoneer.. i wanted to change the names of all music files using their metadata obtained from mminfo utility. I came up with the following hideous looking code.. [CODE=python] import os os.chdir(raw_input('plz enter directory name: ')) lst=os.listdir(os.getcwd()) class process(): def getmetadata(self,filename): command='mminfo %s|grep artist>temp.txt'%filename;#print command os.system(command) …

Member Avatar for zachabesh
0
185
Member Avatar for Rob.Hughes

Hey, I've just joined up here hoping somebody might be able to help me with a project I've got on at work at the moment. I've been learning python using the method, let's just do it and see what happens and I appear to be coming up to conflicts consistently …

Member Avatar for zachabesh
0
108
Member Avatar for Davide Davin

Hello i have extend wxPanel to create a template like this [CODE] import wx class Age(wx.Panel): """ Template per gestione Anagrafiche""" def __init__(self, parent, id,content,content,size = wx.DefaultSize): wx.Panel.__init__(self, parent, id, wx.Point(0, 0), size, wx.SUNKEN_BORDER) ## Create the vertical sizer for the toolbar and Panel self.box = wx.BoxSizer(wx.VERTICAL) tb = _NavigationTool(self) …

Member Avatar for Davide Davin
0
183
Member Avatar for jcmeyer

I am unable to get scrollbars to work in a wizard I have created. I have a BoxSizer on one of the pages in my wizard. The contents of the BoxSizer are larger than the wizard window so I need to scroll vertically to see the rest of the contents. …

0
46
Member Avatar for Morika

Hi, I'm a newbie to python. I'm going through the wonderful 'how to think like a computer scientist tutorial' and I've come up with a question that I'm not sure how to get it to add the results at the end. Here's the question and my working so far :) …

Member Avatar for vegaseat
0
91
Member Avatar for Zetlin

Hi everyone I have a question but I don't know if it can be done in python. Ok so this is what I want to do: I have two scripts [code=python] string = "hello world" [/code] and [code=python] def output(): print string [/code] Now what I want to do is …

Member Avatar for Zetlin
0
87
Member Avatar for jimmy legend

The tut's on the internet are a little complex. All I want to know is how to get 5 threads to open up 2 urls each.(because it's simple) Can somebody show me how to code that?

Member Avatar for jlm699
0
72
Member Avatar for princessotes

Hi, I have written this code to generate the maximun number from a number of coloumns (say 4 coloumns) in a list. The code is not handling negative number well and so keep generating the negaive number to be greater eg -8 > 5 which is wrong. Why is this …

Member Avatar for zachabesh
0
128
Member Avatar for sravan953

Hey guys, I have some Java code here, which checks whether a word is present in a sentence or not: [CODE]import java.io.*; class search_arrays { static void search()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a sentence: "); String s=br.readLine(); s+=" "; String[] x=new String[s.length()]; int a=0,b=0; for(int i=0;i<x.length;i++) { …

Member Avatar for sravan953
0
170
Member Avatar for mrincognito

Hello, Programming/Python newb here looking for some help with arrays. I am trying to write a parsing program that takes a comma delimited csv file, compares entries, and outputs the comparisons in a particular format. The csv file has two columns. Col [0] contains article identifiers, col[1] contains assigned keywords. …

Member Avatar for mrincognito
0
111
Member Avatar for sab786

hello i have some data which i read in and wish to carry out some functions with it and format it into a new output file. however on my input data i need to do different things dependind were my data is for example def some_function(list): does something does something …

Member Avatar for baki100
0
86
Member Avatar for denniskhor

My question is :' if my "[2009'07'12 @ 22'49'47] main page.jpg" store in "C:\image folder\", but the timestamp [2009'07'12 @ 22'49'47] will be inconsistent, so i wan use behind "main page.jpg" to find "[2009'07'12 @ 22'49'47] main page.jpg", and print the link like "C:\image folder\[2009'07'12 @ 22'49'47] main page.jpg" as …

Member Avatar for denniskhor
0
227
Member Avatar for sravan953

Hey guys, I want to make a Python program which I will use to automate certain tasks like opening TweetDeck and Skype everytime I boot up my laptop. The problem is, I know how to open the programs(using subprocess.call), but I don't know how to pass the user ID and …

Member Avatar for zachabesh
0
278
Member Avatar for sravan953

[CODE]import time import subprocess #TweetDeck a=15 print "Opening TweetDeck...\n" while a>=0: print (str(a)+" seconds remaining...") time.sleep(5) a-=5 subprocess.call("C:\Program Files\TweetDeck\TweetDeck.exe") #Rest period print ("\nWaiting...") time.sleep(5) #Firefox a=15 print "\nOpening Mozilla Firefox...\n" while a>=0: print (str(a)+" seconds remaining...") time.sleep(5) a-=5 subprocess.call("C:\Program Files\Mozilla Firefox\firefox.exe") [/CODE] Hey guys, I used the above code to …

Member Avatar for zachabesh
0
298
Member Avatar for xcristi

Hello everyone, I try to build a python application based on pygtk. For GUI development I used glade3 with the option translatable strings. I've created all the PO, MO files needed, starting application with different LANG constants in command line gives me expected results. My goal is to be able …

0
58
Member Avatar for RetawGnrips

Hello, I am new to Python, and have a specific task that I was curious to see if it could be implemented in Python. I have access to a server that will accept requests to query a database utilizing HTTP URLs, and it responds to the request with the results …

Member Avatar for zachabesh
0
210
Member Avatar for zachabesh

Hey all, Trying to execute a command line from python. Here's some code: [code] class EncodeJob: def __init__(self,asset,recipe): self.asset = asset self.recipe = recipe self.original = self.asset.fullPath self.stdout = None self.stderr = None self.flv = os.path.normpath(self.recipe.configs['Flv Path'] + '/' + self.asset.filename.split('.')[0] + '.flv') self.thumb = os.path.normpath(self.recipe.configs['Thumb Path'] + '/' + …

Member Avatar for zachabesh
0
186
Member Avatar for denniskhor

My question is : x = "you love me" Inside 1234.txt file: i love you you love me we love you If i wan IF x == "you love me" from 1234.txt, THEN x is true. how to do it? any one can help?

Member Avatar for zachabesh
0
453
Member Avatar for joe82

Hello everyone, My file had 12 columns, I want those lines in my file where numbers in columns 9 and 10 includes digit "101". For example : i am giving 3 lines of my file: ( columns to focus are colored green). NM013123 14-74726235 100.00 18 0 0 11 28 …

Member Avatar for joe82
0
107
Member Avatar for dp_neo

Hi, I have a script that pulls data off the web based on data in a text file. The text file and script are in the same directory. The values from the script are read into a list. The list is then used in some conditional statements. The text file …

Member Avatar for dp_neo
0
92
Member Avatar for vodkalove

OVERVIEW: I am running a script on one machine that connects to a MySQL database on another machine that is outside of our university's domain. According to the administrator, network policies do not allow the compute nodes to access machines outside of our university's domain. COMPUTERS: A = compute node …

Member Avatar for jlm699
0
92
Member Avatar for hurricanezj

I've written a socket server in Matlab and also a client program in Python.Both can be run properly respectively.The purpose is to send signals from Matlab to Python.But the problem is that they can never be connected to each other even though I use the same the host and port …

Member Avatar for woooee
0
233
Member Avatar for SpiritGeek

I'm trying to write my first validator for wxPython. I want to check the TextCtrl value and change its background color based on whether or not it's numeric. It kind of works, except the event triggers before the current character is actually put in, so the validation is always one …

Member Avatar for jlm699
0
2K
Member Avatar for joananon

Hi everybody! I don't know if this is possible to do, but here goes: Hi have a program where I have several lists. Let's call them l1, l2, l3, l4. Often in the code, I need to delete a certain item from 2 of the lists I have. I thought …

Member Avatar for joananon
0
138
Member Avatar for Heftiger

I'm in the process of writing my first python program with a GUI just as practice. I have two listboxes that are packed in the same frame so they are side by side. I have one scroll bar and would like that one scrollbar to move both listboxes simultaneously since …

Member Avatar for Ene Uran
0
2K
Member Avatar for adam291086

i currently have this nested list [[u'Alice Mee', 3], [u'Alice Mee', 4], [u'adam plowman', 1], [u'james pirret', 2]] I need to remove the last number from each list so i have something like [[u'Alice Mee'], [u'Alice Mee'], [u'adam plowman'], [u'james pirret']] the list is populated dynamically and will always change …

Member Avatar for adam291086
0
122
Member Avatar for teonghan

Hi all, I have been trying to create a Python program to connect to a serial port and read data from it. There will be a circuit sending the data through the port to PC and the Python program suppose to read and process the data. The data is continuous. …

Member Avatar for scru
0
2K
Member Avatar for poeticinsanity

I am attempting to encode using a module called Beautiful Soup. All I need some direction on solving the problem. The encoding maps to <undefined>, so the unicode is not defined within the charmap. The error I get is: UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-34: character maps …

0
63
Member Avatar for SpiritGeek

I'm making a simple wxPython app on win32 that does a number of calls to external binaries. Everything works fine, except the GUI doesn't update well while the external process is running. This makes for an ugly window and non-updated status StaticTexts, so I'd like to fix it. Window . …

Member Avatar for SpiritGeek
0
614
Member Avatar for GlueMan

Hello everybody. I have got a problem installing (or using) clonedigger. 1- I installed setuptools without any problem : Because i am using Python 2.6, I downloaded "setuptools-0.6c9.tar.gz" and "setuptools-0.6c9-py2.6.egg" and I ran "python ez_setup.py setuptools-0.6c9-py2.6.egg". Everything went ok. 2- But when I run "easy_install -U clonedigger", here is what …

Member Avatar for GlueMan
0
257
Member Avatar for suvirj

Hi guys, I have been working with python for some time now and starting to feel quite comfortable with it after a few small projects. Now, I want to make something on the lines of a packet sniffer. It might be able to analyze network activity. My problem is that …

0
51
Member Avatar for SpiritGeek

I'm taking a stab at multiprocessing and I need one process to tell the other to run a given function. On the receiving end, I'm trying to figure out how to interpret the message it gets. I could set up a big nest of if/elif to test for every possible …

Member Avatar for SpiritGeek
0
120
Member Avatar for hughesadam_87

Hey guys, I want to write a program which scans the first line in a data file and sees whether it is delimited by "\t", "," or " ". If it is any of these, I want to keep the line, else, I want to raise some sort of error …

Member Avatar for woooee
0
102
Member Avatar for MONODA

I am making a script which manipulates ID3 tags. I want a certain function to be used on every file in a directory recursively. I have written the script but it is not behaving like I would expect in some cases. If I give it exec perms and put it …

Member Avatar for MONODA
0
88
Member Avatar for clbembry

I can't get MiniFrames to work and I really have no idea how to. I'm a complete noob when it comes to wxPython as I just started learning today. Heres the code for my GUI so far and I want to add a mini frame as a vertical toolbar along …

Member Avatar for lllllIllIlllI
0
265
Member Avatar for dp_neo

Hi, I am trying to schedule a python compiled file to run using windows scheduler. But it does'nt run successfully The script writes to a SQL server database installed on the same machine as python and the script resides on the same machine. The script imports the urllib, sys, threading, …

Member Avatar for dp_neo
0
110

The End.