761 Posted Topics

Member Avatar for dinilkarun

[QUOTE=dinilkarun;723850]Hi all, How can I split a Progress Bar(wx guage) into two parts?. I want the first part to function normally and in the second part I want to display the percentage. I have attached a snap shot of what I am trying to achieve. Is this possible? Any help …

Member Avatar for dinilkarun
0
248
Member Avatar for Stefano Mtangoo

[QUOTE=tyincali;723312]In windows I use notepad++. I've tried that ecplise plugin (the name escapes me) and I liked that also. In *nix, its always vim for me though.[/QUOTE] +1 verbatim

Member Avatar for mathijs
0
240
Member Avatar for imabut
Member Avatar for Stefano Mtangoo

[code=python] import wx dir(wx) [/code] Will give you all the attributes, functions, etc. of wx. And if you use the re module or a custom search you can filter out everything that starts with ID_ There's also the [url=http://docs.wxwidgets.org/stable/wx_stdevtid.html#stdevtid]documentation[/url] I don't understand your second question...

Member Avatar for Stefano Mtangoo
0
861
Member Avatar for blackrobe

[QUOTE=tyincali;724739]So, looking at your translation, would you agree with me when I say this code is broken?[/QUOTE] This code isn't broken it's a recursive function

Member Avatar for tyincali
0
159
Member Avatar for laspal

When you post code please wrap it in code tags. [noparse][code=python] # Your code here [/code][/noparse] If you want to attach another sheet to response you need to open response as the workbook. You're simply opening an arbitrary workbook here without reference to anything.

Member Avatar for laspal
0
109
Member Avatar for iamoldest

[QUOTE=shadwickman;723355]Sorry, I don't understand you. What are you trying to say about Python 2.5? It's what I use, even though Python 2.6 is out now (or the early releases for 3.0).[/QUOTE] I believe his question was in regards to the OP. He was asking why he is still using 2.4 …

Member Avatar for jlm699
0
102
Member Avatar for dinilkarun

What errors are you getting and where? I've used this in the past for splitting a Status Bar and writing text to the last section (ie [ Index 0 | Index 1 | Index 2 ] ): [code=python] self.sb = self.CreateStatusBar(3) self.sb.SetStatusWidths([-2, -1, 150]) self.SetStatusText('My Text', 2) [/code] SetStatusText is …

Member Avatar for dinilkarun
0
172
Member Avatar for imcrackinup3

Yes, you would need to import turtle. Here's a good place to start: [url=http://www.python.org/doc/2.5.2/lib/module-turtle.html]docs[/url]. And an excerpt from that site: [quote="Turtle Docs"]Because [turtle] uses Tkinter for the underlying graphics, it needs a version of python installed with Tk support.[/quote] So make sure you've got a more recent version of python. …

Member Avatar for vegaseat
0
79
Member Avatar for MaxManus

[QUOTE=tyincali;723467]Which version of python are you using?[/QUOTE] This is irrelevant. I've never used Vista, but I've heard of other people on this forum complaining about it... I think I remember something about right-clicking the file and choosing "Run as Administrator"... or something similar. Maybe you can see if that is …

Member Avatar for Stefano Mtangoo
0
124
Member Avatar for dem10

Wrap code in code tags: [noparse][code=python] # Code here [/code][/noparse] Also, read the forum rules about homework, and about asking questions in general.

Member Avatar for tyincali
0
209
Member Avatar for vmars

It helps when you tell us what "doesn't work". Do you get an error, does your computer light on fire, what?

Member Avatar for sneekula
0
539
Member Avatar for oldSoftDev

Save it to a text file: [code=python] f = open('my_file.txt', 'w') # f.write( '%s\n%s\n' % ( usr_name, usr_number ) ) f.close() [/code]

Member Avatar for jlm699
0
94
Member Avatar for hobbz86

Wrap your code in code tags. It will make it readable for us and it won't lose the indentation. [noparse][code=python] # Code here [/code][/noparse]

Member Avatar for jlm699
0
94
Member Avatar for bugmenot

Explain what you mean by "scans a program". Do you mean communicate with a running program ? Or scan a text file?

Member Avatar for BearofNH
0
887
Member Avatar for aot
Member Avatar for aot
0
115
Member Avatar for eluem

You can look into [url=http://people.csail.mit.edu/hubert/pyaudio/]pyAudio[/url] HTH

Member Avatar for jlm699
0
64
Member Avatar for malcolm4458

I think that when trying to run a python program you should be doing [code=python] os.execv( 'C:\\Python24\\python.exe', 'C:\\Python24\\development\\radar\\nra.py') [/code] ie, you're not actually executing the program, you're executing Python and asking it to interpret your script nra.py HTH

Member Avatar for jlm699
0
3K
Member Avatar for dinilkarun

If CenterOnParent is centering on the screen that means your dialog isn't being called with the proper parent. You probably have None set for this value when calling the dialog. Double-check your code to make sure you're providing the object with the proper arguments on initialization. HTH

Member Avatar for jlm699
0
976
Member Avatar for srinivasanb4u

Look into [url=http://pyxlreader.sourceforge.net/]pyXLreader[/url]. There are plenty of tutorials and example code on the Googles

Member Avatar for jlm699
0
81
Member Avatar for Adexter

When you post code it helps the other forum members out if it is readable. In order to make it readable and not lose the indentation and structure, you must wrap your code in code tags like so: [noparse][code=python] # Code goes in here! [/code][/noparse] On initial inspection I see …

Member Avatar for jlm699
0
183
Member Avatar for vmars
Member Avatar for mruane

[QUOTE=paulthom12345;715773] [code=python] if prompt == "look around" or prompt == "look": [/code][/QUOTE] Another solution for this problem that will help if you had a third option would be this: [code=python] if prompt in [ 'look around', 'look', 'observe', 'admire' ]: [/code] So if you use the [icode]in[/icode] keyword, it'll match …

Member Avatar for mruane
0
300
Member Avatar for kenji

Yes, studying Python 3.0 or an earlier version (apart from 2.6) will not really make much difference to you. The fundamental changes are really hidden in the advanced features mostly (besides integer division and class creation I believe). If you start with 2.5, you'll still have all the basics and …

Member Avatar for Ene Uran
0
403
Member Avatar for malcolm4458

Perhaps use subprocess to make a system call to [icode]./PythonXX/pythonw.exe <path_to_pygame_program>[/icode]; there's been a number of threads on here about using subprocess to open pipes to perform certain actions.

Member Avatar for malcolm4458
0
121
Member Avatar for graphpaper

[code=python]fraction1 = float(fraction) * 2 fraction1 = str(fraction1) binfrac1 = fraction1[0] if "1" in binfrac1: fraction1 = float(fraction1) fraction1 - 1 binfrac1 = str(binfrac1)[/code] This logic is flawed. All you're doing is doubling the "fraction" portion of the number, and checking to see if the first number is a 1, …

Member Avatar for graphpaper
0
122
Member Avatar for Devlan

You can't necessarily "add additional keys to existing values", unless you simply meant add additional key/value pairs to the existing dictionary. Here's some examples of adding elements to a dictionary: [code=python] >>> d = {'a':1, 'b':2, 'c':3} >>> d['d'] = 4 >>> d['a'] = [ d['a'], 12, 13 ] >>> …

Member Avatar for jlm699
0
96
Member Avatar for Stefano Mtangoo

Look through the Demo for those two functions. These each make the respective element.

Member Avatar for Stefano Mtangoo
0
88
Member Avatar for jcafaro10

The Dive Into Python book has a great explanation/tutorial/exercises for the re module. NOTE: It appears that diveintopython.org/ is down ?! I don't know what's going on over there but Google will help you find copies of the book elsewhere, if you're so inclined.

Member Avatar for ZZucker
0
124
Member Avatar for dinesh5

And don't forget about help() [code=python] >>> help( input ) Help on built-in function input in module __builtin__: input(...) input([prompt]) -> value Equivalent to eval(raw_input(prompt)). >>> [/code] You can use that on most any function to get info on usage, and a short explanation

Member Avatar for jlm699
0
57
Member Avatar for jworld2

If you make a list of the file names, then use a Throbber and initialize it with the list of filenames, then you can simply set the value of the throbber to the index of the image (this is really easy if it's simply a steady increment of indices.

Member Avatar for jworld2
0
74
Member Avatar for crazzym

While you don't need to specifically declare variables, you still need to make sure that you've got them in the correct scope. So first thing I notice is that your function us trying to read from data; however data doesn't exist in your function, only in the part that calls …

Member Avatar for crazzym
0
166
Member Avatar for Amisha_Sharma

[QUOTE=Gribouillis;713043]companies which use python, from the Nasa to Google.[/QUOTE] Don't forget IBM ;)

Member Avatar for Stefano Mtangoo
0
79
Member Avatar for harrykokil

Please use code tags [noparse][code=python] *Your code goes between these tags [/code][/noparse] Infinite loop= [icode]while True:[/icode] Put the things you want to repeat inside the loop. Initialization goes before the loop.

Member Avatar for sneekula
0
182
Member Avatar for vmars

[QUOTE=Gribouillis;713723] (if the path to your file is [icode]C:\aTest\HelloMP1.py[/icode], because \ is the character used by python to escape characters in litteral string, so "\a" does not mean backslash followed by a, but the character whith hexadecimal code \x07. If you want to write a backslash followed by a, you …

Member Avatar for sneekula
0
114
Member Avatar for knish

Also system calls would work: [code=python] import os os.system('chmod 755 /usr/myfile')[/code]

Member Avatar for jlm699
0
146
Member Avatar for vmars

[QUOTE=evstevemd;711342]That is: s = "---> Increased" print "Today's stock price: %f %s" % (50.4625, s)[/QUOTE] You got it ;)

Member Avatar for bvdet
0
113
Member Avatar for laspal

[QUOTE=dittmarw;709461]I think what you're trying to do is: for item in metlist: data1[2].append(item) To see what you did won't work, try typing data1[2]. It gives you ['Met by']..thus there is only one element, and nothing at position 1.[/QUOTE] While I agree with you that he should be using append instead …

Member Avatar for vegaseat
0
296
Member Avatar for Andymoore88

you need to use the file handle and not the loaded object when you dump. You should just reopen the file for reading or writing and not worry about a+. [code=python] #User Access for Password.py import cPickle as p import sys my_file = 'systemaccess.txt' file_handle = open( my_file, 'r' ) …

Member Avatar for Andymoore88
0
798
Member Avatar for Andymoore88
Member Avatar for unkwntech
Member Avatar for grass_hopper

you could also do a hard sleep: [code=python] import time time.sleep(1) # 1 second delay in processing[/code]

Member Avatar for jlm699
0
99
Member Avatar for massivefermion

Look [url=http://wiki.python.org/moin/TkInter]here[/url] and follow the instructions under the section titled, "Checking your Tkinter support". That should help you out.

Member Avatar for jlm699
0
76
Member Avatar for ajamin

Perhaps [url=http://groups.google.com/group/comp.lang.python/browse_frm/thread/f2cb83e948326ff5/d69feabbfc940b01?q=uri.nix&rnum=2&pli=1]this thread[/url] will answer your question Oh and P.S.; [icode]command = "OK" + os.linesep[/icode] is a platform independent way to implement that...

Member Avatar for jlm699
0
121
Member Avatar for dinilkarun
Member Avatar for dinilkarun
0
163
Member Avatar for blackcorner

I don't know if there's a specific function to do it, but you could do a simple for loop like: [code=python] >>> l = 'hi;your,face.is;on,fire' >>> for c in [';',',','.']: ... l = l.replace( c, '_' ) ... >>> l 'hi_your_face_is_on_fire' >>> [/code] Or roll your own little function ie, …

Member Avatar for ZZucker
0
213
Member Avatar for paferlini

What didn't work about str(row)? What kind of error did you get? The only thing I can think of is that you didn't add any line endings? [code=python] >>> import os >>> os.linesep '\r\n'[/code] This depends on the type of system you're on. [icode]\r\n[/icode] is Windows, [icode]\n[/icode] is Linux, and …

Member Avatar for jice
0
92
Member Avatar for Briz

So... where's your code? Where are your errors? Please read the posting guidelines, and get to know them. If you follow the posting guidelines we can actually help you.

Member Avatar for Freaky_Chris
0
194
Member Avatar for Stefano Mtangoo

If you look at the top right-hand side of the page you will find this white box contained in a larger green box. It's called a search box and it's very useful... Also, vegaseat gave us all a very nice example of using fancy text and the like in the …

Member Avatar for Stefano Mtangoo
0
3K
Member Avatar for lllllIllIlllI

Description from the [url=http://www.vpython.org/]vpython homepage[/url]: [QUOTE] [B]VPython is a package that includes:[/B] [LIST] [*]the Python programming language [*]the IDLE interactive development environment [*]"Visual", a Python module that offers real-time 3D output, and is easily usable by novice programmers [*]"Numeric", a Python module for fast processing of arrays [/LIST] [B]VPython is …

Member Avatar for lllllIllIlllI
0
684

The End.