Re: best GUI library for vector drawing program

2007-08-18 Thread Hendrik van Rooyen
"pierbre.it" <[EMAIL PROTECTED]> wrote: > I used wxWidgets for a work like that. I found it quite easy to use and > I found simple to create a Gui with wxdev which is quite rad. > bye > Pier Paolo There is also pycad, but apart from knowing that it exists, I know nothing about it. - Hendri

Overriding Thread.join in derived class.

2007-08-18 Thread Graham Dumpleton
If one creates a thread using threading.Thread and makes it a daemon by calling setDaemon(), then when Python is exiting it will not attempt to call join() on that thread and wait for it to complete first. The problem with this is that the daemonised thread will continue to run while atexit regist

Canceling events on COM objects

2007-08-18 Thread Oliver Nelson
I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod MapPointMod = win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-

Re: Encryption and hashing

2007-08-18 Thread Laszlo Nagy
> These are the algorithms supported in the last version of PyCrypto: > > $ ls pycrypto-2.0.1/src/ > AES.c Blowfish.c DES.cIDEA.c > RIPEMD.c winrand.c > ARC2.ccast5.c _dsa.c MD2.c > _rsa.c XOR.c > ARC4.cCAST.c

Re: Encryption and hashing

2007-08-18 Thread Paul Rubin
Laszlo Nagy <[EMAIL PROTECTED]> writes: > OK sorry, I was wrong. Isn't blowfish a better version of twofish anyway? No. -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption and hashing

2007-08-18 Thread Kless
On 18 ago, 00:20, Paul Rubin wrote: > Kless <[EMAIL PROTECTED]> writes: > > So it haven't Twofish, Serpent, neither Whirlpool. Neither many others. > > Unless you have an interoperability requirement or some other specific > issue, you should stick with AES and the SHA2 f

Guitars, amps, tabs and more!!

2007-08-18 Thread mobilendd
Reviews of latest models of best guitars, fender, gibson, yamaha, and many more, with pictures and prices. http://pro-guitars.blogspot.com/ And if you want to win a free guitar go here http://freeguitars.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting the result of a process after exec*()

2007-08-18 Thread markacy
On 17 Sie, 16:33, AndrewTK <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to write a Python script that takes a ZIP file from a web > form (using CGI) and uses either of the UN*X unzip, gunzip, tar, > bunzip2 utilities to expand it. > > I can use Python to save the script to disk; but processing

Re: How to say $a=$b->{"A"} ||={} in Python?

2007-08-18 Thread Nick Craig-Wood
beginner <[EMAIL PROTECTED]> wrote: > On Aug 16, 5:43 pm, [EMAIL PROTECTED] (Lawrence Oluyede) wrote: > > beginner <[EMAIL PROTECTED]> wrote: > > > I'd like to do the following in more succint code: > > > > > if k in b: > > > a=b[k] > > > else: > > > a={} > > > b[k]=a > > > > b.setdefa

Re: Naming dictionaries recursively

2007-08-18 Thread TYR
That sounds like a solution. I think the core of the question is as follows; if I was to call the dict() function for each line, thus creating a dictionary, and then rename it to dict['name'], will there be a namespace collision on the next loop when dict() is called again? Obviously the first dict

passing arguments with ampersands

2007-08-18 Thread SHY
hey, i have a win32 gui application that accepts filenames as arguments (either via command line or via associating an extension to the application) which are then opened in it. the problem is that as soon as the filename contains characters like '&', the process fails at the very beginning (sys.

Re: unexpected optparse set_default/set_defaults behavior

2007-08-18 Thread samwyse
[EMAIL PROTECTED] wrote: > Some rather unexpected behavior in the set_default/set_defaults > methods for OptionParser that I noticed recently: [...] > Why does set_default not raise an exception when passed a key that it > doesn't recognize? > > Bad typysts bewaer. > > The only reason I can think

Re: passing arguments with ampersands

2007-08-18 Thread O.R.Senthil Kumaran
> Quote:D:\ftp\Music\Mixes & Compilations\Above & Beyond - Essential > Mix\001_Essential_Mix_2004-06-06_-_Above_and_Beyond.txt > when i put 'print sys.argv[1:]' at the very beginning of the script, all i > get is this: > > Quote:['D:\\ftp\\Music\\Mixes'] > Can you share the portion of the code?

swapping

2007-08-18 Thread Beema shafreen
hi everbody, i have a file with data: fhl1fkh2 dfp1chk1 mal3alp14 mal3moe1 mal3spi1 mal3bub1 mal3bub3 mal3mph1 mal3mad3 hob1nak1 i have written code to check the redudant pairs my code: data = [] data1 = [] fh = open('sheet1','r') for line in fh: if

Re: How to say $a=$b->{"A"} ||={} in Python?

2007-08-18 Thread Nick Craig-Wood
Paul McGuire <[EMAIL PROTECTED]> wrote: > Carl Banks' post using defaultdict is the correct solution. The > raison d'etre for defaultdict, and the reason that it is the solution > to the OP's question, is that instead of creating a just-in-case > default value every time, the defaultdict itsel

Re: Python and Tkinter Programming--Expensive!

2007-08-18 Thread Nick Craig-Wood
W. Watson <[EMAIL PROTECTED]> wrote: > Why is the book in Subject (author is Grayson) so expensive? $100 on Amazon > and $195 on ABE. Aren't there alternatives? There is an excellent section (266 pages) on TKinter in "Programming Python" by Mark Lutz. I've got the 2nd edition. Lutz concentrate

Re: Naming dictionaries recursively

2007-08-18 Thread Paddy
On Aug 18, 11:44 am, TYR <[EMAIL PROTECTED]> wrote: > That sounds like a solution. I think the core of the question is as > follows; if I was to call the dict() function for each line, thus > creating a dictionary, and then rename it to dict['name'], will there > be a namespace collision on the nex

Re: passing arguments with ampersands

2007-08-18 Thread Steve Holden
O.R.Senthil Kumaran wrote: >> Quote:D:\ftp\Music\Mixes & Compilations\Above & Beyond - Essential >> Mix\001_Essential_Mix_2004-06-06_-_Above_and_Beyond.txt > >> when i put 'print sys.argv[1:]' at the very beginning of the script, all i >> get is this: >> >> Quote:['D:\\ftp\\Music\\Mixes'] >> > Can

Re: passing arguments with ampersands

2007-08-18 Thread SHY
theres no special portion of code, just the one that handles filenames with spaces. the problem is that when i associate a file extension to my application and i open it, the filename is not quoted before passed as an arguement. i dont know if its the problem of windows or something, or it was just

Python hash

2007-08-18 Thread Paddy
On Aug 18, 12:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > I think that if you truly want to emulate a perl hash then you would > want this which does the above but recursively. > > from collections import defaultdict > > class hash(defaultdict): > def __init__(self): > defaultdi

wxPython with directpython

2007-08-18 Thread vedrandekovic
Hello, I'am using DirectPython 0.8, wxPython 2.8.4.2 (ansi) for Python 2.5 and I'm running it on windows XP SP2. When I run my wx program, and this program run directpython code: (I run it under wx frame) example code: import d3dx fr=d3dx.Frame(unicode("My frame")) fr.mainloop() .this cod

Re: python video editing libs

2007-08-18 Thread vedrandekovic
On 18 kol, 05:01, math2life <[EMAIL PROTECTED]> wrote: > On Aug 17, 5:55 pm, DavidM <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > Does anyone know of any python or python-wrapped libs for video editing? > > > My requirements: > > - open video files in any of the popular containers (avi, mov, ogg,

Re: wxPython with directpython

2007-08-18 Thread kyosohma
On Aug 18, 8:08 am, [EMAIL PROTECTED] wrote: > Hello, > > I'am using DirectPython 0.8, wxPython 2.8.4.2 (ansi) for Python 2.5 > and I'm running it on windows XP SP2. > When I run my wx program, and this program run directpython code: > > (I run it under wx frame) > > example code: > > import d3dx

Re: Canceling events on COM Objects in python

2007-08-18 Thread kyosohma
On Aug 17, 11:54 pm, Oliver Nelson <[EMAIL PROTECTED]> wrote: > I have MapPoint working in Python, and I'm trying to cancel events on > the map, but I can't seem to make that happen. I'm responding to the > events successfully in my panel object. My code is like this: > > global MapPointMod > Map

Re: What does this thread have to do with classical music,

2007-08-18 Thread Art Deco
ah <[EMAIL PROTECTED]> wrote: >Art Deco wrote: >> ah <[EMAIL PROTECTED]> wrote: >>>Art Deco wrote: ah <[EMAIL PROTECTED]> wrote: >Art Deco wrote: >> ah <[EMAIL PROTECTED]> wrote: >>>Art Deco wrote: ah <[EMAIL PROTECTED]> wrote: >Art Deco wrote: >> Who wrote

Re: wxPython with directpython

2007-08-18 Thread vedrandekovic
On 18 kol, 15:35, [EMAIL PROTECTED] wrote: > On Aug 18, 8:08 am, [EMAIL PROTECTED] wrote: > > > > > Hello, > > > I'am using DirectPython 0.8, wxPython 2.8.4.2 (ansi) for Python 2.5 > > and I'm running it on windows XP SP2. > > When I run my wx program, and this program run directpython code: > > >

Re: clarification

2007-08-18 Thread samwyse
samwyse wrote: > Scott David Daniels wrote: > >> lefts = set() >> rights = set() >> with open('sheet1', 'r') as fh: >> for line in fh: >> trimmed = line.strip() >> if trimmed: # Skip blanks (file end often looks like that) >> left, right = line.strip()

Re: Python and Tkinter Programming--Expensive!

2007-08-18 Thread W. Watson
Thanks. I'm borrowing it from a library and see the URL on the back of the book. James Stroud wrote: > W. Watson wrote: >> Why is the book in Subject (author is Grayson) so expensive? $100 on >> Amazon and $195 on ABE. Aren't there alternatives? > > > Read the fine print. Its available as an

Re: Python and Tkinter Programming--Expensive!

2007-08-18 Thread W. Watson
Thanks. I'll test the waters on Amazon. Nick Craig-Wood wrote: > W. Watson <[EMAIL PROTECTED]> wrote: >> Why is the book in Subject (author is Grayson) so expensive? $100 on Amazon >> and $195 on ABE. Aren't there alternatives? > > There is an excellent section (266 pages) on TKinter in "Progr

Re: clarification

2007-08-18 Thread Tim Williams
On 17/08/07, Beema shafreen <[EMAIL PROTECTED]> wrote: > hi everybody, > i have a file with data separated by tab > mydata: > fhl1fkh2 > dfp1chk1 > mal3alp14 > mal3moe1 > mal3spi1 > mal3bub1 > mal3bub3 > mal3mph1 > mal3mad3 > hob1nak1 > hob1wsp1 > hob1

Re: clarification

2007-08-18 Thread Alex Martelli
samwyse <[EMAIL PROTECTED]> wrote: ... > Finally, does anyone familar with P3K know how best to do the reduction > without using 'reduce'? Right now, sets don't support the 'add' and > 'multiply' operators, so 'sum' and (the currently ficticious) 'product' > won't work at all; while 'any' and

Re: Memory leak when creating lots of object

2007-08-18 Thread Paul Moore
On 17 Aug, 04:51, Godzilla <[EMAIL PROTECTED]> wrote: > On Aug 16, 1:13 am, Paul Moore<[EMAIL PROTECTED]> wrote: > > On 14 Aug, 05:57, Godzilla <[EMAIL PROTECTED]> wrote: > > Do you see memory growth with precisely this code? Over what period? > > How much? > > I have it running for more than 1 ho

Re: wxPython with directpython

2007-08-18 Thread kyosohma
On Aug 18, 9:46 am, [EMAIL PROTECTED] wrote: > On 18 kol, 15:35, [EMAIL PROTECTED] wrote: > > > > > On Aug 18, 8:08 am, [EMAIL PROTECTED] wrote: > > > > Hello, > > > > I'am using DirectPython 0.8, wxPython 2.8.4.2 (ansi) for Python 2.5 > > > and I'm running it on windows XP SP2. > > > When I run m

Re: Canceling events on COM Objects in python

2007-08-18 Thread Oliver Nelson
Mike, Thank you for the suggestion. I will ask over there also. The event is sent back from the COM interface as the code illustrates. MakeActiveXClass allows me to pass the object that will receive events. I don't understand much more detail about how it works. It is certainly a differen

Re: Cancelling events on a COM Object

2007-08-18 Thread Oliver Nelson
Roger, I tried modifying my code so that I have def OnBeforeClick(self, Button, Shift, X, Y, Cancel): print "click" Cancel = True return Cancel But this doesn't seem to have changed anything. Am I doing this wrong? OLIVER Roger Upole wrote: > Oliver Nelson wrote: > >>

sort dictionary by specific values

2007-08-18 Thread dorje tarap
Hi, I need to perform some horrible functions in python I need to do, using sort in a similar way that Excel can. With a dictionary like: Code: ( text ) 1. >>> d 2. {8: (99, 99), 9: [(55, 67), (77, 66), (67, 88)], 4: [(45, 78), (56, 78), (99, 78)], 5: (67, 77)} I want to sort the ent

creating weblogo-like .png output

2007-08-18 Thread dorje tarap
Hi, For the new program I am creating I want to display some data in a format similar to weblogo. Basically I want to create .png output of a table I have that shows percentage of DNA. There is a python implementation for this, but I can only

Re: sort dictionary by specific values

2007-08-18 Thread Gary Herron
dorje tarap wrote: > Hi, > > I need to perform some horrible functions in python I need to do, > using sort in a similar way that Excel can. > > With a dictionary like: > Code: ( text ) > > 1. > >>> d > 2. > {8: (99, 99), 9: [(55, 67), (77, 66), (67, 88)], 4: [(45, 78), > (56,

Re: sort dictionary by specific values

2007-08-18 Thread Arnau Sanchez
dorje tarap escribió: >2. > {8: (99, 99), 9: [(55, 67), (77, 66), (67, 88)], 4: [(45, 78), > (56, 78), (99, 78)], 5: (67, 77)} > > > I want to sort the entire dictionary based on the last values in each > line. First for [-1][0] and then[-1][0] Each "line" means each value in t

[Announce] PyGooCanvas 0.9.0

2007-08-18 Thread Gian Mario Tagliaretti
I am pleased to announce version 0.9.0 of the Python bindings for Goocanvas. It is available at: https://developer.berlios.de/projects/pygoocanvas/ The bindings are updated with the new Goocanvas API PyGooCanvas 0.9.0 (Aug 18 2007) = o Wrap goo_canvas_item_get_bounds (Gi

Symbolic Link

2007-08-18 Thread mosscliffe
I am trying to create a link to a file, which I can then use in an HTML page. The system is Linux on a hosted web service, running python 2.3. Other than that I have no knowledge of the system. The link is created OK, but when I try to use it as filename for the IMG TAG, it does not get displayed

Re: Drawing a graph

2007-08-18 Thread baalbek
Ghirai wrote: > Hello list, > > I need to draw a graph, 2 axes, 2D, nothing fancy. > One of the axes is time, the other one is a series of integers. > > I don't care much about the output format. > > Are there any specialized libraries for this, or should i use PIL? > > Thanks. > Hey dude, wh

Parser Generator?

2007-08-18 Thread Jack
Hi all, I need to do syntax parsing of simple naturual languages, for example, "weather of London" or "what is the time", simple things like these, with Unicode support in the syntax. In Java, there are JavaCC, Antlr, etc. I wonder what people use in Python? Antlr also has Python support but I'm n

PEP 11 update - Call for port maintainers to step forward

2007-08-18 Thread skip
I made a quick update to PEP 11, "Removing support for little used platforms". I added details about ending support for AtheOS/Syllable and BeOS. I also added a yet-to-be-fleshed out section entitled "Platform Maintainers". I intend that to the extent possible we document the responsible parties

Re: Parser Generator?

2007-08-18 Thread Diez B. Roggisch
Jack schrieb: > Hi all, I need to do syntax parsing of simple naturual languages, > for example, "weather of London" or "what is the time", simple > things like these, with Unicode support in the syntax. > > In Java, there are JavaCC, Antlr, etc. I wonder what people use > in Python? Antlr also ha

Re: python video editing libs

2007-08-18 Thread Samuel
On Sat, 18 Aug 2007 12:55:47 +1200, DavidM wrote: > Does anything like this exist? GStreamer/GNonLin might possibly support what you are looking for, though I have not tested this. http://docs.programmers.ch/index.php/Using_Gnonlin_with_GStreamer_and_Python -Samuel -- http://mail.python.org/m

Re: Symbolic Link

2007-08-18 Thread Diez B. Roggisch
mosscliffe schrieb: > I am trying to create a link to a file, which I can then use in an > HTML page. > > The system is Linux on a hosted web service, running python 2.3. > Other than that I have no knowledge of the system. > > The link is created OK, but when I try to use it as filename for the

How to call module functions inside class instance functions?

2007-08-18 Thread beginner
Hi Everyone, I have encountered a small problems. How to call module functions inside class instance functions? For example, calling func1 in func2 resulted in a compiling error. "my module here" def func1(): print "hello" class MyClass: def func2(): #how can I call func1 her

How to make a module function visible only inside the module?

2007-08-18 Thread beginner
Hi Everyone, Is there any equivalent version of C's static function in Python. I know I can make a class function private by starting a function name with two underscores, but it does not work with module functions. For exmaple, __func1 is still visible outside the module. mymodule.py """my modu

Re: Parser Generator?

2007-08-18 Thread beginner
On Aug 18, 5:22 pm, "Jack" <[EMAIL PROTECTED]> wrote: > Hi all, I need to do syntax parsing of simple naturual languages, > for example, "weather of London" or "what is the time", simple > things like these, with Unicode support in the syntax. > > In Java, there are JavaCC, Antlr, etc. I wonder wha

"constructor" or initialization function for module

2007-08-18 Thread beginner
Hi Everyone, An extended module (.pyd) written in C have an init function that is called when the module is imported. Does anyone know if there is a way to provide an init function for a module written in python? Thanks, Geoffrey -- http://mail.python.org/mailman/listinfo/python-list

Re: Fatest standard way to sum bytes (and their squares)?

2007-08-18 Thread Dan Stromberg
On Sun, 12 Aug 2007 02:26:59 -0700, Erik Max Francis wrote: > For a file hashing system (finding similar files, rather than identical > ones), I need to be able to efficiently and quickly sum the ordinals of > the bytes of a file and their squares. Because of the nature of the > application, i

Re: How to call module functions inside class instance functions?

2007-08-18 Thread Zentrader
On Aug 18, 5:40 pm, beginner <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > I have encountered a small problems. How to call module functions > inside class instance functions? For example, calling func1 in func2 > resulted in a compiling error. > > "my module here" > > def func1(): > print "

Re: How to call module functions inside class instance functions?

2007-08-18 Thread Steve Holden
beginner wrote: > Hi Everyone, > > I have encountered a small problems. How to call module functions > inside class instance functions? For example, calling func1 in func2 > resulted in a compiling error. > > "my module here" > > def func1(): > print "hello" > > class MyClass: >def f

Re: "constructor" or initialization function for module

2007-08-18 Thread Steve Holden
beginner wrote: > Hi Everyone, > > An extended module (.pyd) written in C have an init function that is > called when the module is imported. Does anyone know if there is a way > to provide an init function for a module written in python? > The body of a Python module is executed the first time i

Re: How to call module functions inside class instance functions?

2007-08-18 Thread Lawrence Oluyede
beginner <[EMAIL PROTECTED]> wrote: > I have encountered a small problems. How to call module functions > inside class instance functions? For example, calling func1 in func2 > resulted in a compiling error. > > "my module here" > > def func1(): > print "hello" > > class MyClass: >def

Re: How to make a module function visible only inside the module?

2007-08-18 Thread Lawrence Oluyede
beginner <[EMAIL PROTECTED]> wrote: > Is there any equivalent version of C's static function in Python. I > know I can make a class function private by starting a function name > with two underscores, but it does not work with module functions. The trick for the name mangling does not work at modu

Re: How to call module functions inside class instance functions?

2007-08-18 Thread beginner
On Aug 18, 8:18 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > beginner wrote: > > Hi Everyone, > > > I have encountered a small problems. How to call module functions > > inside class instance functions? For example, calling func1 in func2 > > resulted in a compiling error. > > > "my module here"

Re: How to call module functions inside class instance functions?

2007-08-18 Thread beginner
On Aug 18, 8:13 pm, Zentrader <[EMAIL PROTECTED]> wrote: > On Aug 18, 5:40 pm, beginner <[EMAIL PROTECTED]> wrote: > > > > > > > Hi Everyone, > > > I have encountered a small problems. How to call module functions > > inside class instance functions? For example, calling func1 in func2 > > result

Re: "constructor" or initialization function for module

2007-08-18 Thread beginner
On Aug 18, 8:25 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > beginner wrote: > > Hi Everyone, > > > An extended module (.pyd) written in C have an init function that is > > called when the module is imported. Does anyone know if there is a way > > to provide an init function for a module written i

Re: How to make a module function visible only inside the module?

2007-08-18 Thread beginner
On Aug 18, 8:27 pm, [EMAIL PROTECTED] (Lawrence Oluyede) wrote: > beginner <[EMAIL PROTECTED]> wrote: > > Is there any equivalent version of C's static function in Python. I > > know I can make a class function private by starting a function name > > with two underscores, but it does not work with

Weekly Python Patch/Bug Summary

2007-08-18 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 417 open (+13) / 3855 closed ( +0) / 4272 total (+13) Bugs: 1069 open ( +4) / 6800 closed (+10) / 7869 total (+14) RFE : 262 open ( -1) / 296 closed ( +1) / 558 total ( +0) New / Reopened Patches __ Replacing

Re: How to call module functions inside class instance functions?

2007-08-18 Thread Zentrader
> By the way, the reason I am naming it __module_level_func() is because > I'd like __module_level_func() to be private to the module, like the C > static function. If the interpreter cannot really enforce it, at least > it is some sort of naming convention for me. re the above: set file permissio

Re: Parser Generator?

2007-08-18 Thread Tommy Nordgren
On 19 aug 2007, at 00.22, Jack wrote: > Hi all, I need to do syntax parsing of simple naturual languages, > for example, "weather of London" or "what is the time", simple > things like these, with Unicode support in the syntax. > > In Java, there are JavaCC, Antlr, etc. I wonder what people use >

Searching for pixel color

2007-08-18 Thread michael maver
Hello, I was just wondering if anyone knew of a way to search the screen for a certain color in Python. I know it is possible to do this in other languages, but I'm not sure how I'd go about doing this in Python. Just to let you know, I'm running windows XP and I don't really need it to be a cr

Segmentation Fault in 2.5 Installation

2007-08-18 Thread martinezfive
Hi. I was attempting to instal the 2.5 release on my Ubuntu box. Config went fine. Make went fine. Make instal, not so much. I get: Compiling /usr/local/lib/python2.5/test/test_compare.py ... Compiling /usr/local/lib/python2.5/test/test_compile.py ... Compiling /usr/l

ANN: UliPad 3.7 released!

2007-08-18 Thread limodou
UliPad is a flexible editor, based on wxPython. It's has many features,just like:class browser, code auto-complete, html viewer, directory browser, wizard, etc. The main feature is the usage of mixin. This makes UliPad can be extended easily. So you can write your own mixin or plugin, or simple scr

Re: Parser Generator?

2007-08-18 Thread Jack
Thanks for all the replies! SPARK looks promising. Its doc doesn't say if it handles unicode (CJK in particular) encoding though. Yapps also looks powerful: http://theory.stanford.edu/~amitp/yapps/ There's also PyGgy http://lava.net/~newsham/pyggy/ I may also give Antlr a try. If anyone has ex

Understanding closures

2007-08-18 Thread Ramashish Baranwal
Hi, I want to use variables passed to a function in an inner defined function. Something like- def fun1(method=None): def fun2(): if not method: method = 'GET' print '%s: this is fun2' % method return fun2() fun1() However I get this error- UnboundLocalError: loc

Re: Understanding closures

2007-08-18 Thread Alex Martelli
Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > Hi, > > I want to use variables passed to a function in an inner defined > function. Something like- > > def fun1(method=None): > def fun2(): > if not method: method = 'GET' > print '%s: this is fun2' % method > return >

Re: How to call module functions inside class instance functions?

2007-08-18 Thread Alex Martelli
beginner <[EMAIL PROTECTED]> wrote: ... > testmodule.py > - > """Test Module""" > > def __module_level_func(): > print "Hello" > > class TestClass: > def class_level_func(self): > __module_level_func() > > > main.py > -- > import testmodule >

Re: Understanding closures

2007-08-18 Thread happyriding
On Aug 18, 11:03 pm, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > Hi, > > I want to use variables passed to a function in an inner defined > function. Something like- > > def fun1(method=None): > def fun2(): > if not method: method = 'GET' > print '%s: this is fun2' % method

Re: Symbolic Link

2007-08-18 Thread mosscliffe
On 18 Aug, 23:49, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > mosscliffe schrieb: > > > > > I am trying to create a link to a file, which I can then use in an > > HTML page. > > > The system is Linux on a hosted web service, running python 2.3. > > Other than that I have no knowledge of the sys