GetPath to variable

C

Connolly

Hey there, new Python user here.

Currently, I'm working on a project in Python for my college work, I chose
to use Python since I heard of its great advantages, now for designing GUI's
I'm using the wxPython package.
What I'm trying to do at the moment is the following;
A file directory browser is created using self.dialong.ShowModal, when the
user chooses the folder they want to use for this program, then
self.dialong.GetPath is created, after this it (would) goes into a variable
and is stored in a config file I'm creating using the ConfigObj module.
My problem here is GetPath does not want to be stored in some kind of
variable, is there a specific method to put this string into a variable to
store in the config file.

Thanks,

- Connolly
 
B

Bruno Desthuilliers

Connolly a écrit :
Hey there, new Python user here.

Currently, I'm working on a project in Python for my college work, I chose
to use Python since I heard of its great advantages, now for designing GUI's
I'm using the wxPython package.
What I'm trying to do at the moment is the following;
A file directory browser is created using self.dialong.ShowModal, when the
user chooses the folder they want to use for this program, then
self.dialong.GetPath is created, after this it (would) goes into a variable
and is stored in a config file I'm creating using the ConfigObj module.
My problem here is GetPath does not want to be stored in some kind of
variable, is there a specific method to put this string into a variable to
store in the config file.

Could you please post the minimal working code reproducing your problem?
And the full traceback if any ? Else we can only try to guess...
 
G

Gabriel Genellina

En Tue, 11 Dec 2007 09:01:30 -0300, Bruno Desthuilliers
Connolly a écrit :
Hey there, new Python user here.
[...] self.dialong.GetPath is created, after this it (would) goes into
a variable
and is stored in a config file I'm creating using the ConfigObj module.
My problem here is GetPath does not want to be stored in some kind of
variable, is there a specific method to put this string into a variable
to
store in the config file.

Could you please post the minimal working code reproducing your problem?
And the full traceback if any ? Else we can only try to guess...

Just guessing, are you sure you are *calling* the method?
self.dialog.GetPath()
The () are required in Python to actually call a function, else you simply
get a reference to the function itself.
 
K

kyosohma

Hey there, new Python user here.

Currently, I'm working on a project in Python for my college work, I chose
to use Python since I heard of its great advantages, now for designing GUI's
I'm using the wxPython package.
What I'm trying to do at the moment is the following;
A file directory browser is created using self.dialong.ShowModal, when the
user chooses the folder they want to use for this program, then
self.dialong.GetPath is created, after this it (would) goes into a variable
and is stored in a config file I'm creating using the ConfigObj module.
My problem here is GetPath does not want to be stored in some kind of
variable, is there a specific method to put this string into a variable to
store in the config file.

Thanks,

- Connolly

Gabriel is correct. It needs the () at the end. Download the wxPython
demo as it shows the basic usage of most of the widgets, including the
FileDialog.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top