15,185 Topics

Member Avatar for
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
84
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
90
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
633
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
211
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
99
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
111
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
131
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
136
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
361
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
193
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
180
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
104
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
182
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
43
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
89
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
85
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
70
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
126
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
167
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
107
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
85
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
222
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
274
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
270
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
56
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
204
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
181
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
448
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
105
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
89

The End.