Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Visual Python 0.1 Loosed 92

realberen writes: "Visual Python 0.1 is released. Quoting the Web site: Visual Python, at its current stage of development, is a set of components aimed at GNOME and KDE application developers to enable them to easily add scripting capabilities to their applications. Ah, how I love Python! :)" Does this neatly counteract the argument that MS Office applications are necessary for complex, scripted integration (via Visual Basic)?
This discussion has been archived. No new comments can be posted.

Visual Python 0.1 Loosed

Comments Filter:
  • For the most part Python is one of my favourite languages, however I do feel that the Object Orientated abilities draw far too much from C++, and consequently seem like a bit of an afterthought (since OO was, quite literally, an afterthought with C/C++).
    I think, though, that many people give Java a hard time purely because it is cool to do so. I, for one, think Java is the best language available - it is carefully thought out, and with new JIT technologies it is much faster than Python. Its implementation of OO is also much more natural IMHO.

    --

  • by 11223 ( 201561 ) on Monday July 17, 2000 @03:20AM (#928563)
    Does this neatly counteract the argument that MS Office applications are necessary for complex, scripted integration (via Visual Basic)?

    Actually, it neatly counteracts the argument that Linux (and other OSS) are immune to the kind of complex bloatware that plagues Windows like an integrated programming language and web browser in the Office suite.

  • I really dislike the lack of in-line evaluation, so you can't do things like while(fgets(fp,...)){}. What could be the motivation for such brain-damage?

  • That's called "bug-for-bug compatability", and I'm not sure StarOffice is quite bug-for-bug compatible (yet). It's a good thing that it'll be GPL'ed though, so we can work on cloning those MS Office *ahem* features...
  • man, there's lots of problems with vb. 1) it is not an oop language. IMHO, it does a worst job in doing oop than standard c does, especially in the hands of the average vb programmer (as oposed to c in the hands of the average c programmer).

    2) it sort of hides everything from you. you're never quite sure what is being done in the background until you install your app in another machine, and what a nightmare of fiddling that is. i found much easier to recompile gcc than to understand the rules of dependency. and pleeeaaaase dont tell me it is easy when you read about it because this procedure just dont make any sense. i'm not talking about having a super duper gui to make this for me, i'm talking about having all of it revised so it makes sense to normal human beings.

    3) going back to 1), because of the bad use of some oop ideas you get "objects" but you cant hack them to increase functionality - unless you want to use a client supplier relationship and write 10x more than you would with inheritance. also, most of them are bloated to start of with; modularity when each module is a meg, well thats as bad as no modularity...

    i understand people want rad, but rad != bad code. but then again, the problem is not with vb. have you haver hacked the windows api in c? makes gtk look like the monalisa... :-)))))

    __soup_dragon__

    "Ostinato rigore."
    Leonardo Da Vinci
  • It is a library of objects for use in Python scripts that are interpreted through a Python interpreter that is embedded in a regular application. The visual part comes in, because the GUI widgets are GNOME/KDE independant. So if you run your script under GNOME you get GTK+ widgets, but the same script will give you QT widgets if run with KDE.

    ./configure
    make comment
    make post
  • Python and Java are quite similar but for the grand depature in syntax, as you have stated. Java is like C(++), Python is like few else (Makefiles?).

    I think Python's syntax is great. If you are like me, and already write code that is visually organized to the point of being painful, then Python is a godsend, because it forces everyone else to be as anal as you. Even Ruby does not enforce this because it has textual block terminators, i.e. "end". I find C(++)/Java code can be downright nasty, though Perl, with it's C-like syntax and natural language paradigm, seems to unashamedly encourage unaesthetic "poetry."

    If Python has a weeknesses, they are:

    • No protection for internal objects, though this can be partially remedied by translating to C and compiling (use the awesome py2c utility).
    • Little support for bit-basic objects -- bit shifting, block object casting, etc. For example, can you write a full-fledged disk-real filesystem easily in Python? There are the marshall and pickle modules, but this is bolted-on functionality.

    All in all, I would say that Python makes as functional a scripting language as Java, Javascript or VB, i.e. be watchful of bloat and security problems. Overall, however, Python is superior because it has syntax so clean that it's damn near pseudo-code. I'd like to think I'm not a zealot on the the syntax bit, but objectively, I am.


    *** Proven iconoclast, aspiring epicurean ***

  • uh.

    Yeah, this is true, but I could write a script in perl that makes perpetual requests to a mailserver, and distribute it to users on my linux network with the same results. It's easy to exploit user privileges. Users are stupid.
  • by jfm3 ( 2260 )

    Wisdom:

    How much space is in a tab?

    Commentary:

    Any C style guide that describes tab stops will fail. Why then build it into the language syntax?

    And when did we all stop believing in real garbage collectors?

  • Yeah, the Python 1.6 download page [python.org] says that Python 1.6 beta1 will be done on July 1, and beta 2 on July 14. It's July 17 now, and the only available download is alpha 2....

    ./configure
    make comment
    make post
  • Guess this means i have to go write "Visual Rep [sourceforge.net]" now
  • Er, i have worked with VB, and I like it, though I do recognize it has limitations. It's just that I so often hear it decried and so infrequently hear reasons.
    The "13 ways" list is quite interesting, and some may be valid, but it mostly seems to be personal "peeves." For instance, I think "Dim" is a bit intuitive, as in "Dimension." Also, I don't see why similarity in syntax for referring to arrays and functions is a reason for loathing. Mild annoyance if you are very attached to another language's way of doing things, maybe. The fact that Integers are 16-bit is the way VB is. Use another type if you need more. An If missing an End If is an error.
    Many of these arguments seem that they could be boiled down to "It doesn't work exactly like [insert language of choice, eg C++, C, Perl, Pascal...]!" No, it doesn't. It's not [language of choice]. It's VB.

    So I can understand how one can dislike (or hate, if you're feeling extreme) VB if one has a great deal of experience with other languages, like Delphi in your case. But for myself, who learned to program in QBasic, it's fine.

    Oh, and the author of the list does get bonus points for the bit about annoying dialog boxes. It has only gotten worse with each verison.
    -J
  • I guess I am too used to being able to do something like


    if(!(fp = fopen("afile.txt","r"))) exit(1);

    while(fgets(s, sizeof(s), fp)) printf("%s\n", s);

    fclose(fp);
    One of the things I have in the general utilities module I import into almost every program I write is a "File" class that reads lines lazily (only when it's subscripted, as it implicitly is in a for...in loop). Your three lines would turn into:

    for line in File("afile.txt"): print line

    Of course, if you actually prefer to type all that extra punctuation... :-)

    In my experience, if you're using in-line evaluation for its most common tasks, something you've done hundreds of times before, there's already a Python idiom that will do the same thing with comparable simplicity. If you're using in-line evaluation to do something rare and different, something you've almost never done before, you're asking for trouble. But if you're determined to be a masochist in Python, there's always the "eval" function.

  • Python also comes with the tools to run the interpreter in a "restricted environment". This makes it rather straightforward for the developer to run python scripts inside a secure runtime.

    It should be trivial for the developer to create a restrictued environment (or multiple environments with varying degress of flexibility), then allow an end user to decide which one the scripts run in.

    (defaulting to most secure, i'd hope!)
  • You might be saddened to hear that that project will be windows only... ie: use MS's common language runtime.
  • (more python exposure is great, but taking a multi-platform language and tying it down to one platform isn't.)

    pythonware has had a "visual" python builder for many months. as a plus, they use tcl/tk + their advanced python imaging library for gui, so their solution is truly multi-platform. it's not free or open, but it is available now (their web site FAQ says they will make an evalution version available july 20th.)

    http://www.pythonware.com/products/works/faq.htm

    jim

  • From reading the web page, it doesn't seem as though this is a product to do the same thing as VB. VB is a rapid application development tool, with strengths in database integration. The web page for Visual Python indicates that that it is meant for embedding in your application as a scripting language. (Now, you can already do that in Python itself....for more information look at http://www.python.org/doc/current/ex t/ext.html [python.org]. What appears to make Visual Python unique is that it provides a uniform interface to the underlying desktop environment. So, if I interpret their web page correctly, a script would have QT widgets if the user had KDE. However, that same script would have GTK+ widgets if the user was on GNOME.

    I suppose you could do application development using the Visual Python environment, however, if I may quote an answer to the question "What's the relationship between Visual Python and PyQt/PyKDE?" from the Visual Python FAQ [thekompany.com]: They are intended to serve different purposes. PyQt/PyKDE (and I guess the same applies to GNOME-Python) are intended to be used by developers to create full-blown applications in Python rather than C++. Developing the GUI is an important part of this development. Visual Python is intended to be used by end-users who just want to get a job done quickly and the last thing they want is to spend lots of time having to write GUI code.

    Speaking of Python, does anyone know what's up with Python 1.6^H^H2.0? A while back, python.org [python.org] had said that version 1.6 would be out on June 1. Then there was an announcement, mid-June that it would be delayed. Then at the end of June, this [pythonlabs.com] link was placed on python.org, and it was stated that the Python interpreter, version 1.6, was renamed to 2.0, and the first beta would be available on July 1. Now, on July 17, that link has been removed from python.org (although the webpage still exists), and the release schedule is gone!

    ./configure
    make comment
    make post

  • I don't think it's vaporware, because you can download it off their website. Also, it being a library, it would be hard to get a screenshot of it ;-)

    ./configure
    make comment
    make post
  • Probably not. Announcing a name isn't sufficient. YOu actually have to use it in commerce to get the trademark.
    -russ
  • by TheTomcat ( 53158 ) on Monday July 17, 2000 @03:45AM (#928581) Homepage
    what measures are beeing taken to ensure that VP does not expose *nix to some of the same problems that plauge Windows.

    If I'm not mistaken, the real problem(s) with VBScript don't lie within the language, but within the security 'sandbox'. If, for instance, Outlook had a properly set up security sandbox, melissa, and IloveYou would never have happened. We can't blame a LANGUAGE for this.

    We don't blame perl if the admin are stupid enough to set perl suid root. We blame the admin.

    Also, as you mentioned, no, users don't get root. So, a user takes a big risk any time (s)he runs untrusted code, but at least it's impossible for this code to screw over other users.
  • Actually, to nit-pick for a minute here, VBA is an interpreted scripting language that is embedded in nearly every Microsoft application, and a bunch of others. VB itself is a seperate product, that is not a scripting language. You can write full-out applications in it. In addition, you can compile it to native code if you would like.

    ./configure
    make comment
    make post
  • Is this the start of what will end in Linux having viruses like the ones we find in Windows?
  • >>1) Their product is not GPL/OpenSource

    i said it wasn't free or open. no arguement here :> (BUT, check out boa, potentially a better open source alternative, because it is also cross platform. http://boa-constructor.sourceforge.net/ )

    >>2) > as a plus, they use tcl/tk How is the use >>of TCL in a supposed Python tool a plus?

    multiplatform, baby! they also have an abstract layer, so they can support other widget toolkits in the future. just say no to platform lock!

    jim

  • Interesting that you think Python's OO features are added on and inspired by C or C++. Classes have been in Python since at least Python 0.9, which was released internally at CWI in 1991.

    I don't want to speak for Guido, but I believe Modula-3 was much more of an inspiration than C++. What features do you think of as inspired by C++?

  • "complex bloatware" ... "integrated programming language" ... "web browser" ...

    Oh, I get it now! You must be talking about Emacs [fsf.org], right?
  • People who think that other people whine about Microsoft because it is trendy, probably have never spent much time working with those products, or they have only worked with those products and don't realize what else is out there.

    I have the displeasure of working with VB and VC++, after coming from a Delphi shop. The more I work with these tools, the more I think, "You've got to be kidding."

    Check out 13 ways to loathe VB [exe.co.uk] to satisfy your curiosity, or pick up a copy of VB and hack away!

  • This sort of solution is something I'd expect of BASIC. It's just not pretty.

  • VB is a rapid application development tool, with strengths in database integration

    Closer to the truth:

    VB is a vapid application development tool, with strengths in developer assimilation.

    I hate MS "Visual" BASIC. The win API was rapid enough.

  • python 1.6 will be out in august
    check the downloads page of www.python.org
    or checkout the pythonlabs at www.beopen.com
    where most of the core python developers opened shop
  • "Visual" C++, "Visual" Basic, "Visual"Python - except none of them are. I wish these vendors would stop slapping the "visual" moniker on every programming environment that allows you to move GUI widgets around. The underlying code is not visual, it's textual. For true visual programming, you have to use something like LabView or Prograph.

    Don

  • Or, more verbosely:
    Readability which leads to easier maintenance which leads to quicker bugfixing, fewer accidentally introduced bugs (are there any other kind) and far more solid robust code.

    If I come across while(fgets(fp,...)){} in someone elses code, I have to work out what each function return is, how it applies to the next method, and effectively separate out the line of code in my head. To be honest, when working on someone elses code, I almost always refactor such lines of code and rewrite them in a readable manner.

    The other advantage of course, is if that line of code bugs, if it is 7 lines of code not 1 then you know which of the 7 the bug occurs on.

    I hate programmers that can't type. I am a lazy programmer - but I'm also not stupid; I recognise that typing a little extra now saves me a whole ton of work later. Keep me away from people in their first year or two of large-scale coding until they work out what coding standards are for.

    ~Cederic
    ps: sorry, seem to be ranting

  • you can't do things like while(fgets(fp,...)){}.

    Is something like this what you're trying to do?

    testfile = open("c:\\winzip.log", "r")
    for line in testfile.readlines(): print line

    Python has pretty solid iteration capabilities.

  • Python does way more than web-scripting. I'm a PHP user myself when it comes to web, but when it comes to most other things (especially building userinterfaces) I use Python (and Glade, of course :) )
  • Bad programmers can create unmaintainable code using any tool. By not quantifying what makes your other projects maintainable you provide a high noise to signal post. In the meanime, I would suggest you add Design Patterns by Gamma, et al to your reading list for understanding OO architecture and design from an engineering aspect if you haven't done so. An alternative OO solution to the Zope/Python duo would be the Java/Enhydra solution (it's next on my list to evaluate.)

    I'm just starting out on zope, so i don't have too much to say. But there are a few things that should preclude you from using zope:

    1) If you don't understand OO architectures. Zope is OO from the ground up, and because documentation is sparse, you will need to "get" OO in order to use it, specifically, Digital Creations use of OO.

    2) If you have no web experience. Don't start with Zope. Zope leverages an internal DOM, a scripting language (DTML), user defined objects (Zclasses), a built in OO database, and python methods to get the job done. Clearly not for beginners.

    3) Static sites. Zope is highly dynamic and would probably be overkill.

    4) High volume combined with intensive server side processing without a distributed architecture. Zope is built with Python. Python is interpreted byte code. If you have intensive processing going on and you want the benefits of a highly dynamic environment, you will pay for it in CPU and Memory use.

    Why you might use Zope: 1) You are an OO developer. Zope supports containers and user objects. In Zope, everything is an object with properties. Zope supports inheritence through its folder containers, thus allowing child folders to benefit from parent properties. If used in this regard you can build some very easy to maintain sites. Zope has built in persistence and indexing available via inheritence. Even the concept of users and groups are built in, and attachable to any object in the system.

    2) You need a mid size, highly dynamic website with an emphasis on content management. this is where Zope excels IMHO.

    3) You need to build server side web applications that will run on NT or Linux or BSD ...

    4) You need an excuse to learn Python ;>

    Cheers,
    Jim

  • ELisp is not a strongly-typed language, yet I have never seen a bug in Emacs lisp code. (I've seen one on the XEmacs C code, though)
  • Sounds like AREXX - the first cross application scripting language I learned. Funny, but no one delivered nasty "I love you's" via Arexx, or LotusScript or......
  • Java is a statically typed, batch-compiled language with existing implementations that perform generational garbage collection and dynamic compilation to efficient native code. Python is a dynamically typed language with reference counting and a highly dynamic object model that is hard to compile to native code. Java has an extensive library (including GUI) that is platform independent that is almost completely written in pure Java, while Python at best has bindings to Tcl/Tk and wxWindows. Java and Python are about as different as languages come.

    As for the "Sun-control-freak-mentality", I don't see how Sun's control over Java is any different from the control Guido exercises over Python.

    Python is a nice scripting language and a passable extension language. Java is a nice applications programming language and a lousy extension language. Neither is a replacement for the other, and both have their limitations and problems.

  • It is true that some of the complaints on the 13 ways list may be the author's pet peeves, but working with VB can get one peeved.

    The reason one doesn't want to refer to functions the same as arrays is that if you are maintaining a large code base that someone else wrote, why do extra cross referencing to determine if that thing's a variable or a function? The concepts are not vaguely related, so why the same syntax?

    An #1 deserves to be there:

    Result = Funcname(parm1,parm2) 'passes parameters by value

    Funcname(parm1,parm2) 'passes parameters by reference

    Call Funcname(parm1,parm2) 'passes parameters by value!

    And I think you misunderstood the author's complaint about the missing End If. The problem is that the compiler was unable to catch this error.

    If these issues don't mean much to you, this the very reason why developers hate VB so much. It tries to hide details about programming, so you end up with an army of programmers who are ignorant about these important details.

    As for me, I have language preferences, but for work I have used as many as 5 languages in 1 day. My experience starts with MSDOS Basic on a TRS-80, then Pascal and assembly on an Apple ][. From there I have done large projects with C, C++, Java, Motorola Assembly, PIC Basic, PIC Assembly, Delphi, and Lisp. I think that amount of experience allows me to have some objectivity regarding a language's shortcomings. When someone says they like [language of choice] and not VB, realize that the reason VB is not the language of choice is not always someone parrotting what they heard on /.

    MotoMannequin

    "With all appliances and means to boot." - William Shakespeare

  • >Does this neatly counteract the argument that MS Office applications are necessary for complex, scripted integration (via Visual Basic)?

    Hey, the guy never said it was a GOOD argument! :>)

    Actually, this same basic point was made by a writer at Dr. Dobbs who said in his article Python, C++, and Other Religions [ercb.com]:

    If you want to use all the programming tools that come with a full Linux installation these days, or use a metatool l ike autoconf, you have to master Perl, Python, Tcl, Emacs Lisp, two major flavors of shell, and several slightly different flavors of regular expressions. That is simply too high a price for someone who is already running as fast as she can to stay on th e leading edge of fluid mechanics research. Advocating it is about as sensible as suggesting that online help should be written in whatever mix of English, Esperanto, and Klingon appeals to individual developers, and betrays a self-centeredness that may g o a long way toward explaining why so much of today's software is so hard to use.

    So Python it is. If you haven't looked at the language already, it is to Perl or Visual Basic what Java is to C++ (but without any marketing hype).

    Curi ous George

  • From the FAQ:

    Why bother to provide a common interface to GNOME and KDE?

    In the real world people pick applications that solve problems for them. It is likely that these will be a mixture of GNOME and KDE programs.

    So, does Visual Python offers something like the integration of Guile into parts of GNOME, or is it a language binding that happens to integrate with both GNOME and KDE? If so, can anyone tell me what it offers beyond the regular bindings already available (for GNOME at least)?

    Chris
  • I mean a visual programmer on top of a web scripting language. What next?

    Whatever next indeed; they'll be developing GUIs for other scripting languages like Tk soon!

  • I mean a visual programmer on top of a web scripting language. What next? Visual Javascript? Visual HTML?
  • oh thank god, sot hing else to compete with the evil that is VB, Its time that making guis in open source was this easy. Lets not make it as stupid VB though
  • by Jon Erikson ( 198204 ) on Monday July 17, 2000 @02:19AM (#928605)

    If there's one thing that Python truly excels at, it's providing scripting extensions for other programs. Apart from all of the other reasons I like it, the fact is that in many large projects scripting is a definite plus feature, either for users (things like rule engines and the like) or for developers (for easy bespoke development).

    At the last place I worked we had a large client/server MIS system using CORBA for communications. All of the CORBA objects were written in C++ and then wrapped using the Python extension libraries and given a Python script frontend - to the end-user they simply appeared as straight Python objects with all of the flexibility that entailed.

    The clients then had the Python engine embedded into them and could load and run scripts, which then used the CORBA wrappers to interface with the servers, allowing you to set up entire sequences of events in a simple script. And because this functionality is part of Python the amount of work is fairly minimal.

    Apart from that Python's excellent object orientation makes it ideal for GUI libraries - see wxPython for a good example. All that'll be required for developers to use this is to embed an interpreter within their program - not that difficult at all - and then wrap enough of the program objects to provide the desired functionality. The wrapping is fairly straightfoward - we had a script that converted CORBA .IDLs to the C++ wrapping code - and shouldn't take long at all.

    All in all, this is a great idea for anyone who wants to add scripting to an application, but didn't want to spend ages coding it.

    ---
    Jon E. Erikson

  • by Friday ( 27240 ) on Monday July 17, 2000 @02:13AM (#928606)
    Why aren't there any screen shots?

    --
    Is this gonna hurt my Karma?
  • As many here probably know, I've been quick to rise to the occasion of defending VB. It's what I do for a living, day in day out (although I'm actually taking a new web development position, still be doing some VB COM objects). Anyway, I took a look at Python recently and liked what I saw. Has some needed OO features TODAY -- no wating for VS7. Plus, with the Win32 COM extensions, you can hook into Windows COM objects (note: this is all of the Windows side -- I haven't looked at the Linux part of it).

    Anyway, I was pretty impressed. What it is lacking is a good front-end builder (MFC? Bleah...). the author of the Win32 extensions (can't recall the name, sorry.) says he uses VB to throw together a front end and puts all the business logic in Python objects. I could see that. It sounds like this visual toolkit could eventually become a cross-platform GUI builder, rather than building with different things (vb on Winx, whatever on Linux).

    Anyway, I think these guys are right on track for a VB-type language in Linux. Plus, it's multi-platform (lots of platforms). I could see it as a great way to do cross-platform work...


    ---
  • Does this neatly counteract the argument that MS Office applications are necessary for complex, scripted integration (via Visual Basic)?

    Uhm... where'd you get that argument? The only reason MS Office applications would be used for 'complex, scripted integration' is if one of their document types was needed. Maybe you should rephrase that to say, 'Does this neatly counteract the argument that the Visual Basic Runtime and Microsoft Transaction Server are necessary for complex, scripted integration (via Visual Basic)?'
  • by Emil Brink ( 69213 ) on Monday July 17, 2000 @02:23AM (#928609) Homepage
    Um, I've never used Python (I have issues with the block syntax), but I think most users of it would seriously protest against your classification of Python as a "web scripting language". In fact, by reading the What is Python? [python.org] page over at www.python.org [python.org], I get the impression that Python is "an interpreted, interactive, object-oriented programming language". See? Nothing about it being specifically for the web there...
  • by Shimbo ( 100005 ) on Monday July 17, 2000 @02:35AM (#928610)
    I see that it appears to be unrelated to the other VisualPython [activestate.com] under development by Activestate. Looks like the lawyers will have fun on this one.
  • > Um, I've never used Python (I have issues with the block syntax)

    Well, you cannot have issues with something you have never tried. Write a couple Python scripts and *then* if you have "issues", you have a right to complain, and only then if you have a reason other than "I have issues with foo".

    The only reason I say this is because I too used to "have issues" with the whitespace meaningful block syntax. Then I got over my prejudices and actually started learning and using the Python. I have to say now, if your only reason for not learning a language is because you have a preconception about syntax, then you are missing out.

    > See? Nothing about it being specifically for the web there...

    Yeah, the same can be said for Perl. But I think everybody knows that Perl owes its popularity and widespread use greatly to its use as a "web scripting language", whatever that is anyway.

    Nothing can possiblai go wrong. Er...possibly go wrong.
    Strange, that's the first thing that's ever gone wrong.
  • by hey! ( 33014 ) on Monday July 17, 2000 @03:49AM (#928612) Homepage Journal
    I dunno; scripting certainly opens a can of worms, but I think that it isn't necessarily a security nightmare.

    It depends on the application, doesn't it? The Melissa type trojan depends on the insecurity of outlook and MS office, not VB per se. It's outlook/office's fault for launching scripts in a hostile environment with no attempt to verify that the script should be trusted.

    Lotus Notes provides an almost identical scripting language called Lotuscript, but the application requires that scripts be cryptographically signed by a trusted party.

  • Somene is already working on a Python GUI builder, called Boa Constructor [sourceforge.net]
  • by tytso ( 63275 ) on Monday July 17, 2000 @03:58AM (#928615) Homepage

    One thing which many folks don't seem to realize is that in many ways Python has a number of the desireable features which Java has --- it has a portable bytecode which can be moved across different platforms, and you can even make a security sandbox for Python. And of course, it has the advantage that it doesn't suffer from the Sun-control-freak-mentality problem which Java has.

    Python is actually a very flexible language. It's a pity most people don't see past the admittedly very strange whitespace-is-significant part of Python (which I'm not a fan of myself, but whatever). Maybe this announcement help encourage more people to take a look at the language.

  • by hatless ( 8275 ) on Monday July 17, 2000 @03:58AM (#928616)
    Does this neatly counteract the argument that MS Office applications are necessary for complex, scripted integration (via Visual Basic)?

    Say what? That's quite a leap in logic. No, MS Office applications are still necessary for scripted integration compatbile with MS Office, though. Python's a nonstarter here. Corel WP Office now uses a language with VBA syntax (but not its object model) as its scripting language. StarOffice also has a VBA-clone language with its own object model, as well as the options to script in Javascript and from Java. Lotus and Vistasource/Applix each have their own scripting languages.

    This means Corel and StarOffice users can leverage skills honed on MS Office without being able to reuse any macros directly.. and Lotus users can leverage Notes skills. What advantages Applix offers to people who have used office software for eludes me.

    So no, you never needed MS Office to script and integrate office suites. You just need it to script and integrate with MS Office.

    Will someone please enroll Tim in a remedial /. editor's course? I'm sure you're a swell coder/hardware geek/washroom attendant/whatever at BSI, dude, but the stories you post.. and the comments you make.. Heavens. ;]
  • Great. Now we'll have to worry about macro viruses on Linux as well as Windoze.
  • If it were available on Win32 and MacOS (Not to mention BeOS). The world would be a lot safer for operating system diversity if there were a VB like rapid application development platform that could target multiple back ends.

    It'd also make it very desirable to put your eggs in this particular open source basket. My company made a commitment to PowerBuilder so we could build cross platform Windows/Mac apps and promptly got screwed by Sybase, who didn't think cross platform was an important enough issue to bother supporting MacOS.

    I like Linux a lot, but it is years from any kind of desktop dominance. The pieces I think in gaining corporate IT support for non-Windows OSs are:

    Cross platform office suite.
    Cross platform file sharing and authentication.
    Cross platform RAD platform.

    The RAD is the only thing that is missing. Of course there is tremendous inertia behind MS office and VB; however until all the pieces are in place, you can't replace Windows on the corporate desktop unless you are willing to live with a bingo card kind of situation as to which things you can do on any particular machine.
  • It's the implementation that I object to. The weak security model, coupled with it being all over the place in MS apps and Win98/NT means that all those using MS desktops (whether willingly or otherwise) are endlessly vulnerable to bored script kiddies with nothing better to do.
  • by thogard ( 43403 ) on Monday July 17, 2000 @04:16AM (#928620) Homepage
    I've been looking into the Python/Zope as a "real world" development platform and so far I have not seen any inprovement over doing the stuff the hard way (not using any include CGI crud) and the results so far....

    Its no better than giving a coder VB and saying "develop this...". In the end I've got nothing that can be maintained (assuming the coder leaves) and the load on the machine is about 100 times what my stuff (no include, pure perl or C or whatever-- no external modules) would do. The new system has 4 times more time involved reaching where we were and there is still 0 maintainability.

    I'm FSCKing sick of the holy grail solution. Write the damn code the hard way and get over it!

  • Don't get me wrong -- I love Python -- but it's not a Java replacement, except in the usage of "portable sandboxable language".

    While it may be possible to write complex programs much faster in Python than Java -- and I believe that it is -- making _reliable_ code in Python, or any other very-weakly-typed language is difficult. I can't count the number of bugs that would have been compile-time in another language that end up being found at runtime in my Python scripts.

    However, a strongly typed Python (or even an option similar to Perl's "use strict") isn't likely, from what little I know of Python's internal politics and whatnot.

    A pity, that.
  • Um, why do we need a VB[A] translator? Why not just a VB[A] interpeter/compiler?

    The advantage of having a VB[A] translator is that further development work of that VB program/script can be done in a native OSS language. A VB[A] interpreter/compiler is also useful as an interim measure, but given that it'll be much more likely that people will spend a lot of time focusing their efforts on optimizing interpreters, compilers, JIT's, etc. for mainline OSS languages, such as Perl, Python, PHP, guile/Scheme, etc., having a translator also will mean in the long run that we'll be able to make those VB[A] scripts run faster.... of course, they won't be written in VB[A] any more.

  • Python has been completely implemented in Java, it's called JPython [jpython.org]. It runs on any JVM and you have access to the entire Java class library. It's wonderful for scripting Java applications or even writing complete applications and standalone scripts that utilize Java classes (in addition to the rich selection of Python clasess). You also get real garbage collection and threads, thanks to the JVM.

    One of the best things, however, is the JPython interactive shell. It is a fantastic way to prototype and play with Java; interactive access to Java classes! woo hoo!

    JPython is way cool.

    Burris

  • Ok, that's great. Now what if the file has 1 million or so lines? The readlines() method reads everything in at once, so I am told.

    I guess I am too used to being able to do something like

    if(!(fp = fopen("afile.txt","r"))) exit(1);

    while(fgets(s, sizeof(s), fp)) printf("%s\n", s);

    fclose(fp);

    So call me a small-time coder. At least I'm honest. I like inline evaluations. I miss them.
  • what measures are beeing taken to ensure that VP does not expose *nix to some of the same problems that plauge Windows.

    Python has some features [python.org] that Visual Basic does not have.

    - Sam

  • >Ok, that's great. Now what if the file has 1 million or so lines?

    Well then, you do this:

    fp = open("afile.txt", "r")
    line = fp.readline()
    while line:
    print line
    line = fp.readline()

    Note that this is "readline" (single) as opposed to "readlines" (plural). One gives you a line at a time, the other gulps them all in a single shot. This will work fine, no matter *how* many lines you have. In fact, this is pretty common usage - if you say you don't like Python and you haven't gotten *this* far, it doesn't sound like you've given Python enough of a chance yet.
  • Wow! I got a comment (at 0) from some TrollAxOr dude saying that was a troll, and someone sacrificed a perfectly good mod point to say it was funny.... Umm, thanks, I guess? ?
    ---
  • Heh. This is probably as silly as it gets, answering old posts that noone will ever read, ever. ;^) Anyway, I think I'm entitled to have issues with something from just reading or hearing about it, i.e., without actually trying it. Of course you may disagree; that's just the way I am. Also, I thought I was defending Python here, not doing some kind of attack against its choice of block syntax. I'm sorry for trying.
  • Sorry Pfhreakaz0iod, I mucked up. I *meant* to give it an 'Insightfull' but slipped on the KB and hit funny. It was a fine comment good sir :) Unfortunately it appears the moderate thing doesn't have a preview... Verry embarassing. Blew that one. Maybe I kill the 'willing' option, better still, just don't use it at 2am. Much appologies.
  • I'll take perl's $%@{[()]} soup over python's forced indentation any day. No language I'll ever write in starts by assuming I can't write good code.
  • Now that's the pot calling the kettle black. You're code include no variable with more than 2 characters, which is a maintainability nightmare. Furthermore, all it seems to do it repeatedly read in a fixed size buffer, with no regard to the contents (such as newlines) and spit them out with a newline appended, whereas the Python code he wrote actually automatically breaks a line at the presence of a newline and prints them out in an intelligently formatted fashion.

    What you wrote was much uglier (and arguably less useful) that what he did, and what he wrote took me half the time to understand, despite the fact that I've been coding in C on UNIX for over 2 years, while I only coded Python for 2 weeks over 3 months ago.
  • Most VB-based viruses don't take advantage of any of the "Visual" features of the language. Most VB apps I've seen don't include the ability to execute external scripts as a feature. So, why should a Visual Python app be inherently insecure?

    Any Linux app could include unsafe virus-executing functionality be exploiting scripting languages that already exist, like Python or Perl, with little regard to security. The reason we don't have this problem now is that there are no major networked Linux apps that take advantage of automatic scripting like MS Office does.

    This is just a RAD tool, not the beginning of the end of Linux security. All the problems with VB as a virus don't come from the language itself, but with the applications that make use of it. (Of course, an exception to this is the 2 lines of code at the beginning of a Word macro virus I once caught in action that turned off user-notification and then virus-checking. WTF? They let scripts do that?)
  • by RPoet ( 20693 ) on Monday July 17, 2000 @02:50AM (#928633) Journal
    theKompany, which are the guys behind Visual Python, also supports the development of KDE Studio [thekompany.com] which is a C++ IDE that in many respects are more advanced than KDevelop [kdevelop.org]. Have a look at some nifty screenshots here [thekompany.com].

    They also finance two developers working on KWord for two years. Great initiative.
    --

  • I couldn't find the license agreement on the web site. I downloaded the VisualPython-0.1 .tar.gz file [demon.co.uk]. After extracting same, I found the file /VisualPython-0.1/Copying that appears to contain the license. That file states:
    Terms and Conditions
    Copyright (c) 2000 Phil Thompson (phil@river-bank.demon.co.uk)
    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    Except as contained in this notice, the name of the copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the copyright holder.
    At first glance, this appears to be a variation of the BSD license.

    The addtional paragraph stating that, except as provided, "the name of the copyright holder shall not be used in advertising" is interesting. The purpose of this paragraph appears to be to address, or at least attempt to address, the same trademark concerns the Abisource people have regarding trademarks. [abisource.com].

  • This will be another great tool since it is trying to work with any GUI toolkit also this allows people to stop worrying about the desktop war fare and write good code
  • Yeah.
    And you'll actually be able to quickly and visually program any functionality into the damn thing. This can arguably be one of Windows' key route to success, since everyone and their grandmother could program very simple visual programs in Visual Basic.
    Can't people stop whining about this? I mean, it's not like anyone in the right frame of mind runs any X-application as root, anyway? (okay, I'm being sarcastic)
    Python has a sandbox feature (cryptically called rexec) that can restrict execution of running scripts.
    The 'easier scripting leads to more hackers and viruses' argument is just as lame as the 'open source leads to decreased security' one.
    Can we move on to more advanced arguments, such as 'why is this Gnome and KDE only? Why not aim it at Wine too?'
  • by codemonkey_uk ( 105775 ) on Monday July 17, 2000 @02:57AM (#928637) Homepage
    Visual Basic (VB Script) is often blamed for (some of) the security issues that Windows suffers from, especially with regards to viruses.

    If Visual Python is addressing interlopibility (sic?) and a so called "scriptability issue" with X apps, what measures are beeing taken to ensure that VP does not expose *nix to some of the same problems that plauge Windows.

    Of course, I understand that users "dont get root" but their home directories can be messed with, and if apps can be scripted then viri can be propergated.

    Thad

  • I think it's a bunch of whiny Perl hackers that think that all source files should look like: $ cat /bin/bash

    I dunno. Take a look at the Everything2 node [everything2.com] and see if Rob or Kurt make any legitimate arguments against it.

    As a contribution to your argument, I would like to say that Delphi, though quite similar to VB, is neither M$ nor BASIC. Notice the Everything2 writeup [everything2.com] for Delphi. Not a bad thing is said about it! Hmmm...

  • is this incorporated with Glade [pn.org]. While one of the strengths of Linux, and open source in general, is the diversity of solutions available, I think it's important that there's a movement towards a well integreted set of tools.

    Gingko

  • No, MS Office applications are still necessary for scripted integration compatbile with MS Office, though. Python's a nonstarter here.

    Indeed, if what you want is to lure people away from MS Office, what is needed is a language translator which can adapt VB to some other language. I've been told by some well informed-sources that when MS was first looking at how to deal with Java, their Java team came up with an impressive set of tools, including ones which could translate VB into Java, and gave seamless integration between VB and Java. When it came time for Project Review, Gates was in the room, and midway through the review, he interrupted the meeting with the interjection "And this is the 'Screw Microsoft' strategy?!?" The Java team was told to go off and start from scratch again, this time taking MS's business needs into consideration.

    Whether or not this story is true (it's from a friend of a friend who works at Microsoft and was in the room; so I know the provenance in terms of who told it to whom, and trust all of the links in the chain :-), it does bring up a very interesting point. One of the big wins of VB is the huge base of deployed code out there that uses. (Like it or not, it's true....) So if it were possible to give these people a way of transitioning away from VBA into a more open language, it could deal Microsoft a huge blow.

    A useful way of doing this would be to write a front-end translator which can convert VBA into some other language. Say, as part of Guile, or as a front-end pre-processor to Perl or Python. Combine this with hooks so that you can call commercial VB components that come in .DLL (they are written in C, but designed to be called by VB programs as components) using Wine, and it might be possible to help free a large base of VB users from Microsoft's tyranny. :-)

  • I just hope that this project includes some security considerations. Otherwise it's just all about writing a fabulous tool for virus-writing. Imagine a nice attachment in your fancy integrated mail-reader with scripting enabled that says ``Run me!'' and then proceeds to trash your home directory. Tres uncool.

    Remember that all of this will (unfortunately) propagate to some idiot-user's desktop sooner or later. And that user's files will get trashed---at which point everyone will start screaming that Linux/*BSD/whatever is insecure, has virus issues, was overhyped as being immune, etc.

    I am not saying that there is no place for scripting-enabled applications. But a casual perusal of the project's web page did not reveal any information about what the authors are doing to build security into their app. Not good.

  • It isn't really that VB is to blame, or even that OE has a bad security model ( though that does contribute ). It's that Users are allowed to execute foreign code. It wouldn't matter if IE had a really good security model, and the viruses were written in assembly. So long as the User could activate foreign code that could get to local resources, the virus could probagate.

    The simplest security measure is to not run untrusted code. The next level is to have an isolated environment in which the code can run ( a la protected login accounts in UNIX, and to a tiny degree; in NT ). The next level would be to limit the resources that trusted code can access ( e.g. Java security box, or tainted mode in perl, etc, but more directly, preventing access to OE material ).

    The fact that VB or VP are scripting languages is really irrelevant. The only time that it is a serious issue is when you can pass code as a parameter; unchecked parameters can break out as new compiled code and do virtually anything that the interpreter will let them ( which typically includes access to files and the internet ). But a good programmer runs tainted mode, etc. Thus, scripting languages are merely more suseptible to bad programming. A common error would be inserting data into a database through a web form. I could close off the SQL statement, put a semi-colon, then begin a new SQL query which could create a new account ( assuming I knew enough about the target database ).. So on and so forth.

    I agree that the addition of too many powerful widget APIs opens up a user for security risks. But so long as we don't give important access to users, we should be fine at level 2. In fact, if you were really paranoid about such things, you could create an account for all your important activities. Your development could be done as a seperate user, your financial data would definately run as a seperate user, your browser would probably be it's own user ( since it's the most suseptible to attacks ), etc. This of course, assumes that you have a box at home where you can create an unlimited number of accounts. Course, most of us are too lazy; We'd probably set up .rhost files so that we could have our desktop icons rexec to the proper user names... thereby leaving the Xserver account as a dangerous point of virus-infestation.

    Essentially, a good security model would have a permission tree. User can login. Login users can start X. X-users can spawn netscape. Netscape users can run a limited set of programs ( such as Java ). Course, you'd have to make heavy use of group execute permissiosn, and major apps, like netscape java, etc could not be world executable. Therefore, I believe it's definately possible to secure Linux against API attacks, but it's definately not convenient.

    All of this security would be necessary if the API is to be opened up so widely. But, I am much more afraid of another daunting issue; That of stability. Windows is unstable, in part, because there are so many interfaces that there are too many resource dependancies. A component can open up a resource channel, then fail.. The the resource could block indefinately, thereby tying up other components. I believe that UNIX does a good job of releasing a resource when a process fails; the idea that a process should be completely killable. However, with a GUI, it's entirely possible that a connection is so complex that programmers will get lazy and not take care of failed connections at random points.

    The only solution to this latter matter is one of foundation building. Meaning, always building application components on top of concrete models that take care of all conditions. This has both the advantages of preventing the developer from making stupid mistakes, and the reduction in code for each component.

    -Michael
  • Ooh, thanks for the reference. Lessee. Legitimate arguments?

    It promotes sloppy code and completely lacks elegance
    Er. That's a statement, not argument. I don't see how, and I think elegance is amtter of perspective.

    Mind you this requires something like 28 megs of DLLs for the runtime, and 16 megs of RAM just to launch a Hello World program.
    Not with my VB3 for win3.1, I know that. Hmmm.

    I still don't see any legit reasoning behind VB being as evil as people seem to claim.
    Interesting, though, that the Delphi node includes the following quote:
    [Delphi] is powerful, easy to use, and fast. ...for those who absolutely crave a bloated, random, cryptic language, there is also C++ Builder.

    Now I'm even more confused.
    -J
  • VB isn't good at all. It's a shitty interpreted scripting language that's extremely slow. Using perl+Win32::API or whatever it's called, I'm sure perl would be more efficient than VB for doing almost everything, and it's easy, too!
  • It just makes me wonder, how many outstanding bugs are on file for StarOffice for failing to properly execute viruses? :)

    When I worked at olivetti, they would have been slavishly duplicated [Yep, "It doesnt' crash when I XXX" was a valic bug if XXX would cause a PC to crash . . .]
  • I'll refuse to use a language where I have to assume everyone ELSE can't write code. All the Perl code I've had to look at was written by people who know they'll never have to see it again after it's passed on to the next guy. Python is used by people who actually care what the next guy has to see, even if it's themselves in 6 months.

    Forced indentation is good. It forces you to make your logic visible. There probably will never be a Obfuscated Python contest, while I consider the Obfuscated Perl contest to be a redundant celebration of the language's greatest flaw.
  • To be fair to the people releasing Python, I'll point out for this audience that Guido van Rossum left CNRI with several key Python developers around the end of June. They landed at BeOpen.com where they will concentrate on Python development. Check out PythonLabs [pythonlabs.com]. The delays that you are currently experiencing are because of wrangling between CNRI and BeOpen.
  • This is a troll but it makes to clear mistakes that should be corrected...
    MS SQL is not the market leader.. a diffrent commertal product is.. Oracal.

    ESR wrote FetchMail not SendMail...
    SendMail was made for e-mail servers, fetchmail for workstations. SendMail on a workstation is a problem.
  • True. Lisp in general is... interesting. I haven't seen any bugs related to people mistakenly passing in items of the wrong data type in lisp either.

    Whatever it is that makes lisp's lack of strong typing harmless, however, doesn't apply to python in my experience. I _have_ made typing mistakes in python, and have found out about them only at runtime. Just annoying, as I've thus far only used python for quick utility software (stuff for internal use). It could be a very bad thing, however, if such bugs slipped out to a client.
  • I ask this in innocent and honest curiosity (so flaming shouldn't be necessary): What is so bad about VB?
    Besides being based on BASIC and being a Microsoft product, that is.
    (I don't have any problem with either of the above, but some people do, I guess)
    -J

  • Quoting myself:
    "the same trademark concerns the Abisource people have regarding trademarks."
    Duh! Sorry. Talk about redundant. That is what I get for posting prior to my first cup of coffee. Obviously, the above should be something like "the same concerns the Abisource people have regarding trademarks."

  • Well, I guess you could say that netscape composer and Microsoft Front Page and the many other WYSIWYG HTML editors are already hybrid "visual" HTML editors. I am not really that big on visual editors but if someone can crank out code a little faster with one, them let them use it and get more work done.
  • They will probably have to change their product's name [activestate.com].

Single tasking: Just Say No.

Working...