tags:

views:

163

answers:

5

I'm thinking about rewriting an MS Access db I wrote years ago into a stand-alone Python app.

Other than a college class called "Intro to C++" (console only, with OOP concepts) and the Access db itself, I have no experience, so I need to ask if the basis for my decision to go with Python is correct. Is it true that:

1) Python is relatively easy to pick up?

2) Python apps can run as "portable" (ie from one directory, no registry needs, nothing needs to be pre-installed on a Windows PC) as long as I use an embedded db?

+1  A: 

1) Yes, if you grasped the material in your intro to C++ class you should be able to pick up the basics of Python without too much trouble
2) It can be. There's Py2Exe which can include the necessary python files to run standalone. Otherwise Python will need to be installed.

Davy8
Thanks for he info. No, I'll be creating the db the app will use from scratch. Is that a problem?
ChrisC
@ChrisC I removed that bit since I think I know what you mean. I was just making sure that you weren't intending on creating the database *engine* i.e. creating a replacement for MS Access or SQL Server, etc.
Davy8
@Davy8, thanks.
ChrisC
+3  A: 

Python is widely considered an easy language to learn, being simple and readable. For easy running of Python on any Windows PC I recommend Portable Python (other platforms such as Macs and Linux distros typically come with Python, so there's usually no need for such measures there). For running a pre-made, pre-package app with its own sqlite database, I recommend pyInstaller, which is also cross-platform.

Alex Martelli
+1  A: 

Python is like the game Go, the rules are easy, but it's hard to master. You'll get started easily, but if you wind up using it as an interpreted version of VB, or C, you'll be missing much of the point.

More to the point, if your Access application is UI-centric, Python is not necessarily the natural platform to port it to. Python does not specialize, or particularly excel, in building UIs and there's no "visual"-style application builder (that I know of) as in Access.

If your application is more oriented towards reading, manipulating, and writing data, however, Python is ideal.

Larry Lustig
Thanks for your reply. Actually, my app is heavily oriented to entering onto, and reading data from, the screen. Are you meaning that Python isn't, and can't easily be made to be, above average in UI "looks"? Where can I go to see what my UI "look" options are?
ChrisC
PyQt and PyGTK are mature, robust, cross-platform GUI toolkits for Python. I'm not wildly familiar with the former, but the latter is used extensively in the Ubuntu distribution for many system and general purpose applications. Indeed, PyGTK does so well (in the hands of a competent designer) that I'd been using Ubuntu for a year before I realized that many of the tools I used were Python. The Tkinter library that is often bundled with Python is beginning to show its age, and I'd probably not bother.
msw
+1  A: 

to answer your questions:

1) yes, it is relatively easy to pick up. however, as @Larry mentions, it still takes time and experience to master. i've been using it for 14 straight years, and i still feel like i know less than half of everything out there. of course, the Python universe continues to expand every day, so that may be the cause. :-)

2) Python is indeed portable, but as @Alex mentions, only POSIX systems (i.e., Mac OS X, Linux, *BSD, etc.) come with Python installed while PCs require a download, thus making PortablePython an option for moving around a directory tree which can be used for development. More specifically, you can use PyInstaller (multi-platform) or py2exe (PCs only; py2app is a Mac equivalent) to generate standalone executables that can be distributed to computers that don't require Python to already be installed.

To develop apps for MS Access, you will likely need to download the Python Extensions for Windows package (win32all) and use a COM interface. (Although I do not have an example of an Access app in my Python book, I do have COM client Python examples interacting with Word, Excel, PowerPoint, and Outlook in Chapter 23 of Core Python Programming.) A more modern alternative is to use IronPython on the .NET or Mono platforms. As far as UI stuff goes, win32all also gives you access to creating MFC apps.

wescpy
A: 

Python is easy to pick up, yes. That doesn't mean you master it as easily :)

You can use Portable Python if on Windows (or even py2exe) for the portability part, and perhaps Dabo will be close enough to Access for the database+GUI part.

ΤΖΩΤΖΙΟΥ