15,179 Topics

Member Avatar for
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
181
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
125
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
268
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
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
90
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
232
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
135
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
114

The End.