tag:blogger.com,1999:blog-5117699627628650163.post1496138632494538583..comments2022-12-06T23:03:59.225-06:00Comments on Marc of the Web: Using a Simple File Mutex to Integrate Complex Disparate ApplicationsMarc of the Webhttp://www.blogger.com/profile/14493433486166637987noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5117699627628650163.post-52178754365142151502007-08-18T02:22:00.000-05:002007-08-18T02:22:00.000-05:00That's the whole point, Ed. :-) It's generally p...That's the whole point, Ed. :-) It's generally pretty trivial in any programming language to delete a file. I could've used any language that supported an automation interface. That's why this works well as a makeshift mutex in a multiplatform environment.<BR/><BR/>To be fair to VB6, the code to actually delete a file is less than ten; it's more like three. In my count, I was also including the method signature, retrieving the user's temp directory, checking that the file exists, and returning a boolean result about whether or not the method succeeded.<BR/><BR/><B>' The IDE imports the namespace nicely for me.<BR/>Dim oFso As New FileSystemObject<BR/>oFso.DeleteFile sFilePath</B><BR/><BR/>I would guess that you can do automation with Python or other similar languages if you'd like. I'm not familiar myself, but I'd bet there are libraries designed to do just that in most popular languages. Remember, the concepts are always more important than the language itself.Marc of the Webhttps://www.blogger.com/profile/14493433486166637987noreply@blogger.comtag:blogger.com,1999:blog-5117699627628650163.post-57079896697303105972007-08-17T22:33:00.000-05:002007-08-17T22:33:00.000-05:00I haven't done VB6 in a while, and never automatio...I haven't done VB6 in a while, and never automation, so I don't really know what I'm talking about here -- but <EM>ten lines</EM> to delete a filename argument?<BR/><BR/>Python, Ruby, etc. have spoiled me ;-)<BR/><B>import sys<BR/>sys.remove(sys.argv[1])</B><BR/><BR/>Also, thank you for that icon set -- a couple of them will come in quite useful for a certain wxPython app I'm developing right now...Ed Branninhttps://www.blogger.com/profile/15654456118246646405noreply@blogger.com