471,354 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

wxPython Dropfile app for mac

Hi,
I have created a python app for macOsx but I cannot get it to process a file that is dropped on it in the argv when i use the py2app. Whenever it runs it only gets sys.argv[0] as the scriptname itself. Has anyone ever seen this before, or have any suggestions on how to get this to work?
Cheers
N
Oct 12 '07 #1
1 1120
bartonc
6,596 Expert 4TB
Hi,
I have created a python app for macOsx but I cannot get it to process a file that is dropped on it in the argv when i use the py2app. Whenever it runs it only gets sys.argv[0] as the scriptname itself. Has anyone ever seen this before, or have any suggestions on how to get this to work?
Cheers
N
wx may be eating the args. They may be available in wxApp::argv in your OnInit() handler:
Expand|Select|Wrap|Line Numbers
  1. class MyApp(wx.App):
  2.     def OnInit(self):
  3.         print self.argv
  4.         self.main = hetap_welcome.create(None)
  5.         self.main.Show()
  6.         self.SetTopWindow(self.main)
  7.         return True
  8.  
  9. def main():
  10.     application = MyApp(redirect=False)
  11.     application.MainLoop()
But I've never tried that.
Oct 12 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Logan | last post: by
7 posts views Thread by SeeBelow | last post: by
15 posts views Thread by Grant Edwards | last post: by
25 posts views Thread by BJörn Lindqvist | last post: by
1 post views Thread by timothy.williams | last post: by
1 post views Thread by James Stroud | last post: by
reply views Thread by Robin Dunn | last post: by
reply views Thread by Robin Dunn | last post: by
4 posts views Thread by stef | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.