473,394 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

GetPath to variable

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
Dec 11 '07 #1
3 1323
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...

Dec 11 '07 #2
En Tue, 11 Dec 2007 09:01:30 -0300, Bruno Desthuilliers
<br********************@wtf.websiteburo.oops.comes cribi�:
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.

--
Gabriel Genellina

Dec 12 '07 #3
On Dec 11, 5:42 am, "Connolly" <cho.hat...@gmail.comwrote:
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
Dec 12 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: nome | last post by:
as URL.getFile() and URL.getPath() seem allways to return the same value, wy did one introduce getPath() in 1.3? can i use both methods to get the full file name? I'd prefer getFile, because...
0
by: nome | last post by:
found the solution myself: getFile() returns path + query example: http://posting.google.com/post?cmd=post&name=myName getFile() returns post?cmd=post&name=myName getPath() only post
1
by: Scott | last post by:
I have an XML Document in a format like: <Variable name="Bob">ABCDEFG</Variable> <Variable name="Steve">QWERTYUI</Variable> <Variable name="John">POIUYTR</Variable> <Variable...
4
by: Frederik Sørensen | last post by:
I include a xslt stylesheet with variables for all the error messages in my system. <xsl:variable name="Banner_error_1"> errormessage 1 for banner </xsl:variable> <xsl:variable...
134
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
10
by: Blaxer | last post by:
There is probably a really easy way to do this, so please forgive me but I would like to set the value of a variable from a variable, an example would be... function Calculate_Something(ByVal...
23
by: Russ Chinoy | last post by:
Hi, This may be a totally newbie question, but I'm stumped. If I have a function such as: function DoSomething(strVarName) { ..... }
1
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.