A few newbie questions 
Author Message
 A few newbie questions

Quote:


> > Is there a python extension to allow GUI programming on the Macintosh?


> yes stdwin

Also:

  The macintosh beta binaries at <ftp://ftp.cwi.nl/pub/jack/python/mac/>
  have some support for native mac toolbox & windows calls - but they are
  undocumented and don't do much or any testing of args so you can crash
  the Mac if you give a mac toolbox call a bad arg. There are some
  examples and the beginning of some higher level modules ( easydialogs,
  framework, etc. ), but beware - these are basically a snapshot of what
  Jack Jansen and Guido were working on at the time and there are a few
  incomplete or buggy files. ( I got one of them to mostly work just by
  adding a few missing imports. )

  Tk4.1a is out in alpha with support for the Mac and windows - there
  are no Mac binaries released yet, but tkinter for the Mac is just
  around the corner.

  [ What is the status of Mac ports of any of other GUI's ? ]


---|  Computer Systems Engineer          University of {*filter*}ia  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  Box 449 Health Science Center    C{*filter*}tesville,VA 22908  |---
 [ "The grass is always greener, except at t=0" - Stan Kelly-Bootle ]



Sun, 08 Mar 1998 03:00:00 GMT  
 A few newbie questions
I'm a newbie to Python, but not to programming in general.

My questions:

Python related-

How do you modify variables passed into a function?  Basically, what
is the Python equivalent of passing pointers in C or using the VAR
declaration in Pascal?

Why do you have to use statements such as

        L = {} or L = []

if you are going to fill an array or dictionary?  Shouldn't the
array/dictionary spring into existence when you access a member?

Is there a Python extension to allow GUI programming on the Macintosh?

Is there a regular expression library for Python?

Non-Python related -

is there a Python mode available for the Macintosh Alpha editor?

Regards,

JoE
--
-------------------------------------------------------------------------


  College Station, TX  77840            ---------------------------------



Sun, 08 Mar 1998 03:00:00 GMT  
 A few newbie questions

Quote:
>How do you modify variables passed into a function?  Basically, what
>is the Python equivalent of passing pointers in C or using the VAR
>declaration in Pascal?

You can't exactly (except by truly horrible hacking).  As I mentioned
yesterday, a singleton list can be used to share references in structures
  Init:     ref = [value]
  Modify:   ref[0] = newvalue
  Deref:    x = ref[0]
And to return multiple values from a function, use a tuple return value:
  def rotate(x,y,z):
      return (y,z,x)
  ...
  (a, b, c) = rotate(a, b, c)
With a little massaging, you can transliterate pascal or c "pass by reference"
using these tricks, except your code may be more readable in Python.

Quote:
>Shouldn't the
>array/dictionary spring into existence when you access a member?

NO! If I reference a non-initialized structure I want my beloved
runtime error to let me know I screwed up.  In fact, I still would
like to see an "implicit none" option in Python with a "local
var1,var2" construct (or some such), to even prevent nonsense
variables from "springing into existence" accidentally.
"Conveniences" like this in other languages are a mistake.
In some languages typing y = x + 2 may automatically initialize
x to "the appropriate value", even though any programmer who types
this with a non-initialized x is either introducing a bug, or
creating unreadable, unmaintainable code, or both, most likely.

No comments on the other stuff...       Aaron Watters
===
According to the Economist Internic has granted Procter&Gamble
the domains "badbreath.com", "pimples.com", and others
"giving it a {*filter*}space monopoly on irritating hygiene related
ills."  Other cosmetics companies are bringing out the lawyers...



Tue, 10 Mar 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. A few newbie questions...

2. a few newbie questions...

3. A few newbie questions

4. A few more newbie questions..

5. Few newbie syntax questions

6. newbie....a few questions

7. Please asm newbie with few questions

8. Newbie here, a few questions

9. A few more newbie questions

10. Newbie has a few questions

11. Some questions on elided text in the text widget (and a few other text widget questions)

12. Newbie Question (Was: Newbie Question...)

 

 
Powered by phpBB® Forum Software