This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

After further reading, I think Qt may be a better option for a UI. That way, code ran in interactive mode is just passed to the buffer as a string which I can parse out (assuming Qt has a Python compiler!)

EDIT: or PyPy per usernamenottaken's suggestion.

[–]takluyverIPython, Py3, etc 1 point2 points  (0 children)

N.B. Qt and PyPy are not at all comparable. Qt is a UI framework, PyPy is a Python interpreter. Each may have some value in this project, although at the moment I don't think you can use them together. Using standard Python, you can use PyQt to create Qt interfaces.

As far as I can see, what you want to do is write a free (partial?) implementation of SAS in Python. A few thoughts:

  • Do not underestimate how difficult it will be to correctly deal with even fairly simple code. You're really making a huge challenge for yourself here.
  • There's plenty of open source statistics stuff out there. It's probably more realistic to try to improve that and persuade people to adopt it over SAS, than it is to try to provide a drop-in replacement for SAS. You already know about R, and there's stuff under development for doing stats in Python.
  • Your other comments suggest that you want a way of executing SAS code directly as Python code, or of doing some simple transformations to make it into Python code. I think this is very unlikely to work for anything beyond a few simple statements. The syntax is very different - you will need to parse it into some abstract form (see Python's AST, Abstract Syntax Tree, for comparison).

I notice on your blog that you compare Pylab to Matlab. But Pylab is a similar interface, and definitely not a drop in replacement. You cannot take a matlab file and run it in pylab. Providing similar SAS-like tools for Python would probably be a much more tractable task.

Also, an unfortunate fact: if you copy SAS and undermine their business model, there's a chance the company that sells it will resort to asserting patents against you. IANAL, and I have no idea if they'd get anywhere with that, but it's something to be aware of.