614 Posted Topics

Member Avatar for Narue

[B][COLOR="Green"]Vegaseat[/COLOR][/B] Pretty darn cool guy. Moderator. Very talented at python and is always there to jump in and give excellent advice on nearly any subject that pops up. He is fun in the geeks lounge and can be also seen in various other places around daniweb helping out :)

Member Avatar for jonsca
2
514
Member Avatar for lllllIllIlllI

So, in 6 weeks i am going overseas for the first time in my life... Sort of, i lived on a boat for a few years but i'm not counting that :P. But anyway, i digress. I am flying from Australia to the San Francisco for a holiday in the …

Member Avatar for vmanes
0
154
Member Avatar for sniperx99

You need what are called 'command line arguments'. [URL="http://www.faqs.org/docs/diveintopython/kgp_commandline.html"]Dive into python has a great section explaining command line arguments[/URL]. But in essence you could do something like this: [code] import sys if sys.argv: print "The first command line argument i recieved was:",sys.argv[0] [/code] Then we would run our code like …

Member Avatar for d5e5
0
476
Member Avatar for foren

Well here is how you easily delete a file in python, it shouldn't be too hard to work it into your program: [code] >>> import os >>> os.remove("C:\Path\to\out\file.txt") [/code] Hope that helps :)

Member Avatar for Gribouillis
0
231
Member Avatar for nimmyliji
Member Avatar for JasonHippy
0
485
Member Avatar for rahul8590
Member Avatar for serkan sendur

He did say his personality had changed a lot :P p.s. welcome back serkan

Member Avatar for ~s.o.s~
-4
230
Member Avatar for lllllIllIlllI

Hi, i have been using the wxPython TimeCtrl for a while now, when fiddling with it i realised that it would never go to 10:00 AM.. It would always just skip to 11 o'clock. I found it still did this in the wxpython demo. I was wondering if this was …

Member Avatar for sneekula
0
95
Member Avatar for sknake

Discussion groups was started in the previous update about a month or two ago. Personally i dont use them, there is no one i particularly want to partake in. But im sure it's a good idea for some :)

Member Avatar for Geekitygeek
0
350
Member Avatar for PinkStone

hmmm, just thinking, because python would not quite understand the .doc files, so opening them in read mode might miss something. If i was doing this i would use read-binary mode and write-binary mode. Thats the easiest way to read and write files that contain unknown things. Because i know …

Member Avatar for PinkStone
0
125
Member Avatar for cmpt

It checks to see if l is existant, if there are no elelments in l then it will return False because your key cant be in an empty list! Therefore avoiding any unwanted Exceptions! :)

Member Avatar for ptirthgirikar
-1
160
Member Avatar for revathskumar

in wxpython. To find out if the window is on the screen or not we call: [code] framewewanttocheck.IsShownOnScreen() [/code] If we want to find out if it has the focus then we can use this [code] framewewanttocheck.FindFocus() [/code] And if you want to make if have focus you can use …

Member Avatar for lllllIllIlllI
0
152
Member Avatar for Moonrise_state

Yup, having used both languages i generally find python even easier than java to do that. [code] #Just have a class we can instantiate class Instance(object): x = 1 def __init__(self, number): self.number = number instances = [] for f in range(10): instances.append(Instance(f)) for f in instances: print(f.number) [/code] The …

Member Avatar for vegaseat
0
126
Member Avatar for lllllIllIlllI

Regex is one of the more complicated modules that you can use in python. Once you have learnt it though you can use it many different programming languages, so its a useful tool for using with strings. So first to use regex you must import it [code] import re [/code] …

Member Avatar for bunkus
3
2K
Member Avatar for Dani

Yeah i dont much like them either. People who have been here a while know what the buttons are for. As well the newbies probably arent going to need those buttons anyway.. i doubt they will be posting in many different threads all over the place anyway. And they are …

Member Avatar for feoperro
3
941
Member Avatar for cwarn23

How did it really start? Well the [URL="http://en.wikipedia.org/wiki/The_Big_Bang_Theory"]Big Bang Theory[/URL] was premiered in September 24th 2007 :P Obviously thats the more important one :)

Member Avatar for Dope 7560
0
318
Member Avatar for GrimJack
Member Avatar for cwarn23
0
183
Member Avatar for Stefano Mtangoo

When looking at the wx.Aui example i can see examples of 'frames' with maximise, minimise and close buttons. Sounds a lot like what you need? Im just looking at the wxPython Docs and Demos :)

Member Avatar for lllllIllIlllI
0
158
Member Avatar for cwarn23
Member Avatar for leegeorg07

Personally i dont think its a good idea to just piggyback on an open source project just because you want to stretch your skills. Instead think of something that you really think would be fun to do, or interesting and complex and then go for that, that way you don't …

Member Avatar for leegeorg07
0
116
Member Avatar for mahela007

[QUOTE=mahela007;1089385]How would I have a python program running constantly?[/QUOTE] If you are running windows you can just put your program in the 'startup' folder in your start menu and it will be started every time the computer turns on. Though, if somehow the program quits, be that because of an …

Member Avatar for mahela007
0
12K
Member Avatar for SoulMazer

If you can get the whole string (which you can with os.walk) then you can do this no worries :) [code] >>> s = "/home/foo/Music/The Eagles/Hell Freezes Over/<songname>" >>> list_s = s.split('/') >>> list_s ['', 'home', 'foo', 'Music', 'The Eagles', 'Hell Freezes Over', '<songname>'] >>> print list_s[-2] Hell Freezes Over …

Member Avatar for SoulMazer
0
112
Member Avatar for GihanFernando

I take it the two modules are running at the same time? I would just write the data to a file like vegaseat has shown you, and then in the other module i would load the data from the file. That is the easiest way you would be able to …

Member Avatar for vegaseat
0
107
Member Avatar for mrnutty

Yeah same, and i think that the problem should be the same throughout all programming languages. That way you can compare how other languages do it. Also, it would be fun if you could nominate yourself to make the problem of the week, that way we could all get a …

Member Avatar for cwarn23
1
283
Member Avatar for sknake

I never ever go to the main page, i start my visit at forum 26 every time. Its what i have as my bookmark. Then if My Favourite Forum shows that there are posts to be read in other forums i will go to them. At the moment i am …

Member Avatar for sknake
2
430
Member Avatar for curiouskitten

Here is a site where they do just what you are doing, the first bit talks about unit testing, just ignore that and keep going on, it shows you how to make a roman numeral converter that is almost impossible to break: [url]http://www.diveintopython.org/unit_testing/index.html[/url]

Member Avatar for vernondcole
0
4K
Member Avatar for jbennet

alrighty, here is moi... At a cafe i think, mum turned 41, i accidentally told her a happy 42nd birthday on the card. Woops :P

Member Avatar for hotmatrixx
0
250
Member Avatar for Stefano Mtangoo

You could try Eric IDE, i never got around to installing it, but it always looked promising [url]http://eric-ide.python-projects.org/[/url]

Member Avatar for Stefano Mtangoo
0
125
Member Avatar for The Dude
Member Avatar for anonymous alias
Member Avatar for lllllIllIlllI

Today is my 16th birthday, so i had a question for everyone. How do you celebrate your birthday? Do you get together with friends? Go somewhere special? Personally i spend it with family :) But thats it from me, excuse me while i go and learn to drive :D

Member Avatar for William Hemsworth
7
135
Member Avatar for mahela007

There certainly is a way! [code=python] import os path = "path here" seconds = os.path.getmtime(path) print time.strftime('%Y-%m-%d %H:%M', time.localtime(seconds) #it will output the time last modified! [/code]

Member Avatar for mahela007
0
101
Member Avatar for saisai81

Well, i know my christmas present this year because i had to help plan it. Im coming to the US! :)

Member Avatar for saisai81
0
149
Member Avatar for ffs82defxp
Member Avatar for vegaseat
0
332
Member Avatar for Dave Sinkula

New button? I dont see anything new :( But im missing that favourite forum thing quite a lot... I used it to see if i needed to visit a forum or if i had read all the posts in it anyway. I want it back! :)

Member Avatar for lllllIllIlllI
0
321
Member Avatar for mrnutty

Yeah i still like python even though it has no brackets and curly braces. But there really is something nice about languages like C/C++ and Java with their very explicit syntax.

Member Avatar for ddanbe
0
247
Member Avatar for santosh.ssit

Stop. More information, spent an extra 2 minutes posting your question and it will save a lot of time in the long run. So. What GUI toolkit? Tk? wxPython? Qt? What exactly are you wanting to find? Once you have answered that, we will find it easier to answer you.

Member Avatar for lllllIllIlllI
0
82
Member Avatar for lllllIllIlllI

Hi guys, I have 5 google wave invitations left, and just wondered if anyone wanted to have a look at the preview. If so, pop on a reply. :) Cheers Paul

Member Avatar for Kenny_Zhou
0
82
Member Avatar for hughv

hughv -> Waa waa waa.. They don't agree with me. Get over it, really, if you want ideas, accept them, discuss them, never just completely discount them. Thats why its called a Discussion Forum. My personal opinion is that the amount of raw materials as well as money required to …

Member Avatar for GrimJack
2
594
Member Avatar for AutoPython

I tried wing IDE personally, i got the personal version. Though i do not use it any more, it actually wasn't nearly as good as it looked like it would be. Now i just use Netbeans with a python plugin, it works a charm :)

Member Avatar for Gribouillis
0
174
Member Avatar for Garee

For storing them you can use a dictionary: [code] lines = text.split("\n") lineDic = {} for i,l in enumerate(lines): lineDic["Line %i"%s] = l print lineDic [/code] Hope that helps :) EDIT: woo! 900 posts :P

Member Avatar for masterofpuppets
0
105
Member Avatar for ffs82defxp

Here is another page you also might enjoy [url]http://docs.python.org/library/email-examples.html[/url]

Member Avatar for vegaseat
0
86
Member Avatar for Musafir

Isnt it possible that you could just have two large buttons side to side? When you click them you can set the label (if you are using wxPython) via wx.Button.SetLabel("Label Here") Then you can bind it to an event so every time the user click a button it updates the …

Member Avatar for vegaseat
-3
282
Member Avatar for leegeorg07

Why dont you just have it that it reads the first line of project1 and that can have a simple string telling you what version it is. Then if there is a newer one replace Have this as the first line: [quote] "12" [/quote] [code] f = open('proj1.py') lineOne = …

Member Avatar for Stefano Mtangoo
0
200
Member Avatar for lllllIllIlllI

Hi, I thought it would be nice to go on IRC today and see if anything is happening. But i went in and entered my username "Paul Thompson" as my name and halfway through logging on it went like this: [quote] +++ Paul Thompson set to mode +iwx (Something about …

Member Avatar for The Dude
0
1K
Member Avatar for Ancient Dragon

I am in an accelerated uni course at high school. This means i get windows 7 for only $50 AUS. :) Sooo excited

Member Avatar for vegaseat
1
426
Member Avatar for Stefano Mtangoo

Have you tried the python challenge? [url]http://www.pythonchallenge.com/[/url] It is a bit obscure sometimes yet a lot of fun and can really test how efficient your code can be.

Member Avatar for elasolova
0
184
Member Avatar for AndreRet

Im going sailing on my boat, i used to live on it for a number of years sailing up and down Queensland and NSW. So we are going back out on that these holidays... and i have a massive programming job to be done, so not all holiday for me …

Member Avatar for Sodabread
0
139
Member Avatar for ffs82defxp

I think this is what you need: [code] import os os.startfile('filename.py') [/code] Hope that helps :)

Member Avatar for vegaseat
0
131
Member Avatar for pyboii

Please post the code that you have written, or a specific problem that you have. We are *not* here to do your homework

Member Avatar for lllllIllIlllI
0
166

The End.