Auto execute python in USB flash disk

B

Brian Erhard

I am still fairly new to python and wanted to attempt a home made
password protection program. There are files that I carry on a USB
flash drive that I would like to password protect. Essentially, I
would like to password protect an entire directory of files. Is there
a way to auto execute a python script after a user double clicks to
open a folder on the USB drive? How can you capture that double click
event on a specific folder?

Thanks.
 
E

Ene

I am still fairly new to python and wanted to attempt a home made
password protection program. There are files that I carry on a USB
flash drive that I would like to password protect. Essentially, I
would like to password protect an entire directory of files. Is there
a way to auto execute a python script after a user double clicks to
open a folder on the USB drive? How can you capture that double click
event on a specific folder?

Thanks.

Install the free PortablePython from http://www.portablepython.com/ on
your USB
flash drive, and go from there.
 
K

kyosohma

I am still fairly new to python and wanted to attempt a home made
password protection program. There are files that I carry on a USB
flash drive that I would like to password protect. Essentially, I
would like to password protect an entire directory of files. Is there
a way to auto execute a python script after a user double clicks to
open a folder on the USB drive? How can you capture that double click
event on a specific folder?

Thanks.

I've never done this before, but it sounds cool. You would need to
create some kind of python file object to do this properly. So instead
of actually clicking a folder, you would click a pickled file or
something. I found some cool info about encrypting files here:

http://www.methods.co.nz/python/

There's also a python cryptography kit: http://www.amk.ca/python/writing/pycrypt/

Finally, I found a fellow python programmer that wrote his own:
http://mail.python.org/pipermail/python-list/2006-April/378510.html

There's also PortablePython...

Enjoy!

Mike
 
T

Tim Golden

Brian said:
Is there
a way to auto execute a python script after a user double clicks to
open a folder on the USB drive? How can you capture that double click
event on a specific folder?

That would depend on what desktop / Operating System you're
using. If it's Windows, you need a shell extension (which
is non-trivial to understand and write). If it's one of the
Linux desktops, someone else had better chip in!

TJG
 
S

Shane Geiger

That would depend on what desktop / Operating System you're
using. If it's Windows, you need a shell extension (which
is non-trivial to understand and write). If it's one of the
Linux desktops, someone else had better chip in!

http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_15.shtml#e390


--------------------------------------------------


There is a new version of `Movable Python
<http://www.voidspace.org.uk/python/movpy/>`_
available.

This is available for **Movable Python** for Python 2.2.3, 2.3.5, 2.4.3
and 2.5rc2 from :

`The Movable Python Groups Page
<http://voidspace.tradebit.com/groups.php>`_



What is Movable Python
==================

Movable Python is a portable distribution of Python for windows,
designed to be run off a USB stick or computers that don't have Python
installed. It features an IDE (Pythonwin and IDLE are included - but
you can also use SPE), and a GUI launcher.

It can be configured to use multiple interpreters from a single
interface, including acting as a GUI for any executable.

It has a host of other features (like logging all output from files,
enabling psyco for all scripts, etc).

See the following link for a list of all the new features in Movable
Python 2.0.0 :


http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_15.shtml#e390

For an overview of the most important features (with screenshots) see :


http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_22.shtml#e396

Other uses for Movable Python include testing programs with different
versions of Python, and providing clean install 'sandboxes' for testing
programs. It is also an ideal launcher for IronPython.




--
Shane Geiger
IT Director
National Council on Economic Education
(e-mail address removed) | 402-438-8958 | http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy
 
L

Larry Bates

Brian said:
I am still fairly new to python and wanted to attempt a home made
password protection program. There are files that I carry on a USB
flash drive that I would like to password protect. Essentially, I
would like to password protect an entire directory of files. Is there
a way to auto execute a python script after a user double clicks to
open a folder on the USB drive? How can you capture that double click
event on a specific folder?

Thanks.
Unless you are just doing this to learn, I would suggest you purchase
USB key with encryption included. They are REALLY cheap.

http://www.kingston.com/flash/DataTravelers_enterprise.asp

-Larry
 
B

Ben Finney

Ene said:
Install the free PortablePython from http://www.portablepython.com/
on your USB flash drive, and go from there.

To be clear: In addition to being a zero-cost download, Portable
Python is free software:

Python® distribution included in Portable Python is licensed under
PSF License, SciTE is licensed under SciTE license and Portable
Python scripts are licensed under GPL license.

<URL:http://www.portablepython.com/site/download/>
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top