Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
wx.DirDialog on MacOSX
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
nosirfur  
View profile  
 More options Nov 7 2012, 1:36 pm
From: nosirfur <nosir...@gmail.com>
Date: Wed, 7 Nov 2012 10:36:46 -0800 (PST)
Local: Wed, Nov 7 2012 1:36 pm
Subject: wx.DirDialog on MacOSX

Hi,

I am new in this group and a wx-beginner.
I had a look on the old posts about wx.DirDialog issues but I could not
find a solution for the following problem I have.

The small piece of code attached below should (in my intention) tell the
system to change directory to  the "_selectedDir" folder.  
In the following part of the code (not shown) some commands should be
executed in the  folder "_selectedDir" which contains some input files.
The code does work on Linux (the system changes directory, inputs are found
and commands properly executed).
But the code does NOT work on MacOSX since I get an error message stating
that the input files cannot be found. I did some cross check printing out
the 'pwd' and I find that the directory did not change.

"
  def SetDir(self,event):
    dialog =  wx.DirDialog(self, "Please choose your project directory:",\
    defaultPath=userPath,style=wx.DD_CHANGE_DIR , pos = (10,10))
    if dialog.ShowModal() == wx.ID_OK:
      _selectedDir = dialog.GetPath()
      return _selectedDir
    else:
      _userCancel = dialog.Destroy()
      return _userCancel
    dialog.Destroy()
"
Maybe my code is not properly written?

Thanks in advance and sorry in case this topic was already known.
Best
r.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Dunn  
View profile  
 More options Nov 8 2012, 8:14 pm
From: Robin Dunn <ro...@alldunn.com>
Date: Thu, 08 Nov 2012 17:14:46 -0800
Local: Thurs, Nov 8 2012 8:14 pm
Subject: Re: [wxPython-users] wx.DirDialog on MacOSX
On 11/7/12 10:36 AM, nosirfur wrote:

What version of wxPython?  If 2.9.x then are you using the carbon or the
cocoa build?

Of course there is an easy workaround, you can just call
os.chdir(_selectedDir) yourself.

--
Robin Dunn
Software Craftsman
http://wxPython.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nosirfur  
View profile  
 More options Nov 9 2012, 2:30 am
From: nosirfur <nosir...@gmail.com>
Date: Thu, 8 Nov 2012 23:30:48 -0800 (PST)
Local: Fri, Nov 9 2012 2:30 am
Subject: Re: [wxPython-users] wx.DirDialog on MacOSX

Hi

Thank you for the reply.
I'm using wxPython2.9-osx-2.9.4.0-cocoa-py2.7.

Anyhow the"os.chdir(_selectedDir)" works.
Thanks!

Il giorno venerd́ 9 novembre 2012 02:14:51 UTC+1, Robin Dunn ha scritto:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »