WSDL and SSL certification

2008-11-26 Thread jineshpmj
Hi, I have a problem with processing WSDL file using SOAP. I want to call Rhapsody webservice using Python. But i have SSL certification key and cert , how to pass this information when i calling wsdl file. eg: Expand|Select|Wrap|Line Numbers file = 'RhapsodyDirectSearch.wsdl' file1= "RhapsodyD

Re: asp versus cgi

2008-11-26 Thread Tim Roberts
davidj411 <[EMAIL PROTECTED]> wrote: > >when i use cgi, i never get a 500 error but i can see how it might >take on overhead if many users are hitting the site at once. so to >avoid this, i looked into registering the python engine for ASP >requests. It is easy to overestimate the overhead of CGI.

Re: end of print = lower productivity ?

2008-11-26 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >When I write "print", it is both effortless and instantaneous : my >hands do not move, a wave goes through my fingers, it all happens in a >tenth of a second. > >Contrast this with what one has to go through to catch the SHIFT key, >and then the "(" : move the left hand,

Re: special editor support for indentation needed.

2008-11-26 Thread Eric S. Johansson
Andreas Roehler wrote: > > with python-mode.el from > > http://sourceforge.net/projects/python-mode/ I think there's something wrong with the site because it tells me it's version 1.0 from year 2005. > Meanwhile I'll reflect a draft addressing your needs. there is a rather sizable set of thin

Re: Getting in to metaprogramming

2008-11-26 Thread Rafe
On Nov 27, 12:11 pm, Rafe <[EMAIL PROTECTED]> wrote: > On Nov 27, 11:41 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> > wrote: > > > > >  "Steven D'Aprano" wrote: > > > > Well, I don't know about "any problem". And it's not so much about > > > whether metaprograms can solve problems that can't be s

Confused about class relationships

2008-11-26 Thread John O'Hagan
Apologies if this is a D.Q., I'm still learning to use classes, and this little problem has proved too specific to find in the tutorials. I have two classes with a relationship that I find confusing. One is called Engine, and it has a method (bar_builder) which generates instances of the other

Re: newbie question

2008-11-26 Thread Asun Friere
On Nov 27, 6:11 am, Nan <[EMAIL PROTECTED]> wrote: > Hello, >    I just started to use Python. I wrote the following code and > expected 'main' would be called. > > def main(): >   print "hello" > > main Not an answer to your question, but I dislike functions named 'main' because the situation the

Re: Getting in to metaprogramming

2008-11-26 Thread Rafe
On Nov 27, 11:41 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: >  "Steven D'Aprano" wrote: > > > > > Well, I don't know about "any problem". And it's not so much about > > whether metaprograms can solve problems that can't be solved by anything > > else, as whether metaprograms can solve pro

Re: Exhaustive Unit Testing

2008-11-26 Thread Steven D'Aprano
On Wed, 26 Nov 2008 18:54:52 -0800, Emanuele D'Arrigo wrote: > Hi everybody, > > another question on unit testing, admittedly not necessarily a python- > specific one... > > I have a class method about 60 lines long (*) and due to some 9 non- > trivial IFs statements (3 and 2 of which nested) th

rejecting newlines with re.match

2008-11-26 Thread r0g
Hi, I want to use a regex to match a string "poo" but not "poo\n" or "poo"+chr(13) or "poo"+chr(10) or "poo"+chr(10)+chr(13) According to http://docs.python.org/library/re.html '.' (Dot.) In the default mode, this matches any character except a newline. If the DOTALL flag has been specified, thi

datig girls - Free Access

2008-11-26 Thread porphyrymoralesnh
datig girls . . . Free Online Dating . ***CLICK HERE*** http://dating365.co.cc/datig-girls * . Free Online Dating . . . . . . . . . . datig girls -- http://mail.python.org/mailman/listinfo/python-list

online dateing service - Free Access

2008-11-26 Thread porphyrymoralesnh
online dateing service . . . Free Online Dating . ***CLICK HERE*** http://dating365.co.cc/online-dateing-service * . Free Online Dating . . . . . . . . . . online dateing service -- http://mail.python.org/mailman/listinfo/python-list

internet dateing - Free Access

2008-11-26 Thread porphyrymoralesnh
internet dateing . . . Free Online Dating . ***CLICK HERE*** http://dating365.co.cc/internet-dateing * . Free Online Dating . . . . . . . . . . internet dateing -- http://mail.python.org/mailman/listinfo/python-list

black dateing - Free Access

2008-11-26 Thread porphyrymoralesnh
black dateing . . . Free Online Dating . ***CLICK HERE*** http://dating365.co.cc/black-dateing * . Free Online Dating . . . . . . . . . . black dateing -- http://mail.python.org/mailman/listinfo/python-list

free online dateing - Free Access

2008-11-26 Thread porphyrymoralesnh
free online dateing . . . Free Online Dating . ***CLICK HERE*** http://dating365.co.cc/free-online-dateing * . Free Online Dating . . . . . . . . . . free online dateing -- http://mail.python.org/mailman/listinfo/python-list

dateing girls - Free Access

2008-11-26 Thread porphyrymoralesnh
dateing girls . . . Free Online Dating . ***CLICK HERE*** http://dating365.co.cc/dateing-girls * . Free Online Dating . . . . . . . . . . dateing girls -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the behavior expected?

2008-11-26 Thread Alphones
all the discussions are very helpful to me. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the behavior expected?

2008-11-26 Thread Alphones
On 11月27日, 上午12时07分, Peter Otten <[EMAIL PROTECTED]> wrote: > Alphones wrote: > > On 11月26日, 下午9时28分, [EMAIL PROTECTED] wrote: > >> Alphones: > > >> > it is a little deferent from other script language. > > >> See also here:http://en.wikipedia.org/wiki/Dynamic_scope#Dynamic_scoping > > >> Python do

Re: hello from colombia

2008-11-26 Thread fel
On Nov 26, 8:19 pm, "Tim Rowe" <[EMAIL PROTECTED]> wrote: > 2008/11/26 fel <[EMAIL PROTECTED]>: > > > how can I convince them that Python is better > > You can't, because it isn't. you are right, it isn't, but for the particular task at hand (DB Sybase programming) I feel somehow that the team i

Exhaustive Unit Testing

2008-11-26 Thread Emanuele D'Arrigo
Hi everybody, another question on unit testing, admittedly not necessarily a python- specific one... I have a class method about 60 lines long (*) and due to some 9 non- trivial IFs statements (3 and 2 of which nested) the number of possible paths the program flow can take is uncomfortably large,

Re: what's so difficult about namespace?

2008-11-26 Thread Dimiter "malkia" Stanev
Hi Xah, I myself am proponent of namespace-lessness... That was until I discovered CLOS and the multi-methods... For any other language I would pick Apple's approach approach to Objective C, and the frameworks that they've put (libraries) - e.g. use couple of letters to prefix your class/fun

Re: help with class

2008-11-26 Thread Chris Rebert
On Wed, Nov 26, 2008 at 5:21 PM, tekion <[EMAIL PROTECTED]> wrote: > Hi, > so I am assuming global name space refers to the location of where the > module is imported, for example my previous example where I call the > gzip module from test_class class, like so: > > class test_class: > import gzi

Re: help with class

2008-11-26 Thread tekion
Hi, so I am assuming global name space refers to the location of where the module is imported, for example my previous example where I call the gzip module from test_class class, like so: class test_class: import gzip did not work because of scoping. So global name space in this case is declar

Re: what's so difficult about namespace?

2008-11-26 Thread Aaron Brady
On Nov 26, 6:57 pm, Kaz Kylheku <[EMAIL PROTECTED]> wrote: > The theory is that the adoption of some technology is driven by > a function of the ratio: > >    perceived crisis >     >    perceived pain of adoption > > These perceptions may not be accurate. The crisis may be larger

Re: hello from colombia

2008-11-26 Thread Tim Rowe
2008/11/26 fel <[EMAIL PROTECTED]>: > how can I convince them that Python is better You can't, because it isn't. I'd better explain that, before I'm lynched. The thing is, no language is better than another language. A language is better than another language *for a particular purpose*. SPARK Ada

Re: Getting in to metaprogramming

2008-11-26 Thread Aaron Brady
On Nov 26, 6:29 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 27 Nov 2008 06:41:47 +0200, Hendrik van Rooyen wrote: > > I am using the term in the restricted sense of Python writing Python > > source. > > > Given that, can anybody think of an example that you could not do with a > > clas

Re: is it possible to integrate Python into VBS ?

2008-11-26 Thread alex23
On Nov 27, 10:15 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > How can I call Python from within VBS ? Hey Stef, The Windows Scripting Host (WSH) allows you to add other scripting languages, such as Python (I _think_ this might even happen automatically with ActivePython.) Script Components are a

Re: [2.5.1] ShiftJIS to Unicode?

2008-11-26 Thread MRAB
Gilles Ganault wrote: Hello I'm trying to read pages from Amazon JP, whose web pages are supposed to be encoded in ShiftJIS, and decode contents into Unicode to keep Python happy: www.amazon.co.jp /> But this doesn't work: == m = try.search(the_page) How can you have name "try

Re: Python surpasses Perl in popularity?

2008-11-26 Thread Steven D'Aprano
On Wed, 26 Nov 2008 11:17:21 -0500, Steve Holden wrote: > Xah Lee wrote: ... >> your remark is a bit overzealous. After all, we all know that site is >> websearh based. Although it not some kinda scientific report, but it >> does give some good indication of language popularity, however you >> def

Re: what's so difficult about namespace?

2008-11-26 Thread Kaz Kylheku
On 2008-11-26, Xah Lee <[EMAIL PROTECTED]> wrote: > Can you see, how you latched your personal beef about anti software > crisis philosophy into this no namespace thread? I did no such thing. My post was about explaining the decision process that causes humans to either adopt some technical soluti

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread Steven D'Aprano
On Wed, 26 Nov 2008 13:24:25 -0800, Jason Scheirer wrote: > On Nov 26, 11:40 am, Terry Reedy <[EMAIL PROTECTED]> wrote: >> def Skipper(object): >>      def Skip(): pass >> skipper = Skipper() >> >> def _On_Menu_File_Open ( self, event = skipper ): >>     event.Skip () >> >> etc. > > I think this

Re: what's so difficult about namespace?

2008-11-26 Thread Steven D'Aprano
On Wed, 26 Nov 2008 17:42:43 +0100, Stefan Behnel wrote: > Xah Lee wrote: >>> The IT community has enough trouble getting a few ISPs to upgrade >>> their DNS software. How are you going to get millions of general users >>> to upgrade? >> >> alright, that's speaks for Javascript. >> >> But how's

Re: what's so difficult about namespace?

2008-11-26 Thread alex23
On Nov 27, 9:28 am, Xah Lee <[EMAIL PROTECTED]> wrote: > Hi Stefan, try not to be a moron. Hi Xah, try not to be an asshole. [and in a separate post] > your post is too much verbiage and enthusiasm. The hypocrisy here would be funny if I didn't think you were serious. -- http://mail.python.org/m

Iowa Python Users Group Meeting (Dec. 1, 2008)

2008-11-26 Thread Mike Driscoll
Hi, The 3rd meeting of the Iowa Python Users Group (Pyowa) is getting together next Monday, December 1st, 7-9 p.m. Be sure to mark your calendars! We currently have one presentation scheduled and a workshop where we hope to have teams work on easy to intermediate problems in an effort to learn and

Re: [2.5.1] ShiftJIS to Unicode?

2008-11-26 Thread skip
Gilles> == Gilles> m = try.search(the_page) Gilles> if m: Gilles> #UnicodeEncodeError: 'charmap' codec can't encode characters in Gilles> position 49-55: character maps to Gilles> title = m.group(1).decode('shift_jis').strip() Gilles> ==

Re: Getting in to metaprogramming

2008-11-26 Thread Steven D'Aprano
On Thu, 27 Nov 2008 06:41:47 +0200, Hendrik van Rooyen wrote: > I am using the term in the restricted sense of Python writing Python > source. > > Given that, can anybody think of an example that you could not do with a > class? (excepting the "stored procedure" aspect) GUI designer. You write

Re: hello from colombia

2008-11-26 Thread alex23
On Nov 27, 8:25 am, fel <[EMAIL PROTECTED]> wrote: > perhaps a python advocacy page? http://www.google.com/search?q=python advocacy -- http://mail.python.org/mailman/listinfo/python-list

[2.5.1] ShiftJIS to Unicode?

2008-11-26 Thread Gilles Ganault
Hello I'm trying to read pages from Amazon JP, whose web pages are supposed to be encoded in ShiftJIS, and decode contents into Unicode to keep Python happy: www.amazon.co.jp But this doesn't work: == m = try.search(the_page) if m: #UnicodeEncodeError: 'charmap' codec can'

is it possible to integrate Python into VBS ?

2008-11-26 Thread Stef Mientki
hello, We use a commercial database application (Ultimo), that has embedded VBS (Visual Basic Script) editor / execution. Knowing Python now, VBS seems quit clumsy. We can't replace the build-in scripting completely, because the VBS (which has to have some predefined strctures) is interpreted b

Re: Python+Pyjamas+V8=ftw

2008-11-26 Thread alex23
On Nov 27, 6:20 am, "inhahe" <[EMAIL PROTECTED]> wrote: > Python should [...] The problem with statements like this is that Python itself can't do anything, only members of the Python community can. But I do understand and agree with your main point. I'm hoping that the PyPy project will allow fo

Re: tkFileDialog, askopenfiles in v2.6 question

2008-11-26 Thread MRAB
fransstil wrote: To select a group of files works fine in 2.5 ... from tkFileDialog import askopenfiles fnames = askopenfiles(title = "Select files", initialdir = "C:\\temp", filetypes=[("All", "*.*")]) for i in range(len(fnames)):

Re: How to get a directory file descriptor?

2008-11-26 Thread greg
Steve Holden wrote: Anyway, when I try to use O_RDONLY on Vista I get "Permission denied": According to the library ref, fchdir() is Unix-only, so there probably isn't a use case for getting a file descriptor for a directory on Windows in the first place. -- Greg -- http://mail.python.org/mail

Re: Getting in to metaprogramming

2008-11-26 Thread Aaron Brady
On Nov 26, 10:41 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: >  "Steven D'Aprano" wrote: > > > > > Well, I don't know about "any problem". And it's not so much about > > whether metaprograms can solve problems that can't be solved by anything > > else, as whether metaprograms can solve pro

Re: Python C/API simple debugging

2008-11-26 Thread Aaron Brady
On Nov 26, 5:27 am, k3xji <[EMAIL PROTECTED]> wrote: > Hi all, > > I am new to Python C API and finding it difficult to debug C > extensions. So, basically I want to see the value of an integer value > during the C API. Here is the code: > > #define LAST_MIX_VAL 0xDEADBEEF > > static PyObject * > c

Re: asp oddness , why specify ASP twice

2008-11-26 Thread Rob Williscroft
davidj411 wrote in news:a08906ab-ba98-4ce0-a5f9-330f4b287423 @z27g2000prd.googlegroups.com in comp.lang.python: > > for some reason this code works: > * > <%@ LANGUAGE = Python%> The above is a Directive, in this case it tells ASP what language to use,

Re: what's so difficult about namespace?

2008-11-26 Thread Xah Lee
Dear Kaz Kylheku, your post is too much verbiage and enthusiasm. Why? because you went into the la la land of philosophy. Although, i do think you did give some good exposition on your views. Now, let me detail some analysis of your post. In summary, you are saying a few things about namespace

Matplotlib on Leopard Mac OS

2008-11-26 Thread Massi
Hi everyone, I've got some problems trying to install matplotlib on my mac (Leopard OS). I'm following the instructions I found in the official site to install it from the egg file (http:// matplotlib.sourceforge.net/users/installing.html), but when I run easy_install ./matplotlib-0.98.3-py2.5-maco

tkFileDialog, askopenfiles in v2.6 question

2008-11-26 Thread fransstil
To select a group of files works fine in 2.5 ... from tkFileDialog import askopenfiles fnames = askopenfiles(title = "Select files", initialdir = "C:\\temp", filetypes=[("All", "*.*")]) for i in range(len(fnames)): fnames[i]

Re: hello from colombia

2008-11-26 Thread bearophileHUGS
fel: > they are starting a new project (insurance stuff) using Java, and I > just hate that eventually I'l be debugging someone-else's java code > how can I convince them that Python is better, and get them to re- > think their strategy? The choice of the language for a program isn't easy. Maintai

Re: hello from colombia

2008-11-26 Thread fel
On Nov 26, 5:17 pm, r <[EMAIL PROTECTED]> wrote: > On Nov 26, 2:58 pm, fel <[EMAIL PROTECTED]> wrote: > > > I work in a small software company using php all day, I wish the usage > > of Python was more common within my company > > they are starting a new project (insurance stuff) using Java, and I

Re: Python/C API: using from a shared library

2008-11-26 Thread Graham Dumpleton
On Nov 26, 10:29 pm, Robie Basak <[EMAIL PROTECTED]> wrote: > On 2008-11-25, Robie Basak <[EMAIL PROTECTED]> wrote: > > > If I use dlopen() to open a shared library that I've written, and that > > shared library tries to use the Python/C API, then it fails. I've > > reduced the problem to the test

Re: Apache & mod_python: I don't receive anything with POST method

2008-11-26 Thread Graham Dumpleton
On Nov 27, 12:21 am, [EMAIL PROTECTED] wrote: > Hi, > > I'm using a simple form to make possible the users of our site upload > files. > > >     >     >     >         >         >     >     > > > The "upload.py" looks like this: > > from mod_python import apache, util; > > def index(req): >

Re: hello from colombia

2008-11-26 Thread r
On Nov 26, 2:58 pm, fel <[EMAIL PROTECTED]> wrote: > I work in a small software company using php all day, I wish the usage > of Python was more common within my company > they are starting a new project (insurance stuff) using Java, and I > just hate that eventually I'l be debugging someone-else's

Re: what's so difficult about namespace?

2008-11-26 Thread Wojtek
Kaz Kylheku wrote : Javascript programs are scanned at the character level by the browser as part of loading a page. So there are severe practical limitations on how large Javascript programs can be. Namespaces are useful only in very large programs. But even more useful where you are getti

Re: help with class

2008-11-26 Thread r
On Nov 26, 4:08 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > tekion <[EMAIL PROTECTED]> writes: > > Hello, > > I am playing with class.  Below is the code snippet: > > #!/usr/bin/python > >       2 > >       3 class test_class: > >       4    #import gzip > >       5    def __init__(self,file)

Re: help with class

2008-11-26 Thread Arnaud Delobelle
tekion <[EMAIL PROTECTED]> writes: > Hello, > I am playing with class. Below is the code snippet: > #!/usr/bin/python > 2 > 3 class test_class: > 4#import gzip > 5def __init__(self,file): > 6 self.file = file > 7def open_file(self): > 8

Re: Tkinter and asyncronous socket

2008-11-26 Thread maxlosblob
On 26 Nov, 13:42, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi all, I'm new to python and I've been spending the last week on GUI > > that refresh its content based on data periodically coming from a > > remote socket. > > I succeded in doing it (thanks newsgroups and o

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread M.-A. Lemburg
On 2008-11-26 18:55, Stef Mientki wrote: > hello, > > I've the idea that I always have a lot of useless code in my programs, > like the next example. > > def _On_Menu_File_Open ( self, event = None ): >if event : > event.Skip () > > instead of > > def _On_Menu_File_Open ( self, event

Re: what's so difficult about namespace?

2008-11-26 Thread Tamas K Papp
On Wed, 26 Nov 2008 21:32:24 +, Kaz Kylheku wrote: > See: > http://arcfn.com/2008/07/why-your-favorite-programming-language-is- unpopular.html That was 404 for me, but http://arcfn.com/2008/07/why-your-favorite-language-is-unpopular.html works. Interesting, thanks for mentioning it. Tamas

Re: Python surpasses Perl in popularity?

2008-11-26 Thread Hrvoje Niksic
Xah Lee <[EMAIL PROTECTED]> writes: > Bourne Shell, is pretty much replaced by Bash since several years ago. > For example, as far as i know, linuxes today don't have Bourne Shell > anymore. “sh” is just a alias to bash with some compatibility > parameter. That used to be the case, but these days

help with class

2008-11-26 Thread tekion
Hello, I am playing with class. Below is the code snippet: #!/usr/bin/python 2 3 class test_class: 4#import gzip 5def __init__(self,file): 6 self.file = file 7def open_file(self): 8 try: 9 print "file: %s" % self.file

Re: what's so difficult about namespace?

2008-11-26 Thread MRAB
Kaz Kylheku wrote: On 2008-11-26, Xah Lee <[EMAIL PROTECTED]> wrote: comp.lang.lisp,comp.lang.functional,comp.lang.perl.misc,comp.lang.python,comp.lang.java.programmer 2008-11-25 Recently, Steve Yegge implemented Javascript in Emacs lisp, and compared the 2 languages. http://steve-yegge.blogs

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread Stef Mientki
Jason Scheirer wrote: On Nov 26, 11:40 am, Terry Reedy <[EMAIL PROTECTED]> wrote: Stef Mientki wrote: hello, I've the idea that I always have a lot of useless code in my programs, like the next example. def _On_Menu_File_Open ( self, event = None ): if event : ev

Re: what's so difficult about namespace?

2008-11-26 Thread Kaz Kylheku
On 2008-11-26, Xah Lee <[EMAIL PROTECTED]> wrote: > comp.lang.lisp,comp.lang.functional,comp.lang.perl.misc,comp.lang.python,comp.lang.java.programmer > > 2008-11-25 > > Recently, Steve Yegge implemented Javascript in Emacs lisp, and > compared the 2 languages. > > http://steve-yegge.blogspot.com/

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread Stef Mientki
Alternative (if you *really* want to save the explicit test) is to attach the behaviour modification to the *relevant* class: class NonEvent(Event): def do_nothing(self): pass skip = jump = hop = waltz = saunter = do_nothing def __len__(self): return 0 NON_EVENT = NonEvent(

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread Jason Scheirer
On Nov 26, 11:40 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > Stef Mientki wrote: > > hello, > > > I've the idea that I always have a lot of useless code in my programs, > > like the next example. > > >  def _On_Menu_File_Open ( self, event = None ): > >    if event : > >     event.Skip () > > > in

asp oddness , why specify ASP twice

2008-11-26 Thread davidj411
for some reason this code works: * <%@ LANGUAGE = Python%> <% Response.Write ("test") %> * but this code does NOT: * <%@ LANGUAGE = Python Response.Write ("test") %>

hello from colombia

2008-11-26 Thread fel
I work in a small software company using php all day, I wish the usage of Python was more common within my company they are starting a new project (insurance stuff) using Java, and I just hate that eventually I'l be debugging someone-else's java code how can I convince them that Python is better, a

asp versus cgi

2008-11-26 Thread davidj411
when i use cgi, i never get a 500 error but i can see how it might take on overhead if many users are hitting the site at once. so to avoid this, i looked into registering the python engine for ASP requests. when i use asp (C:\WINDOWS\system32\inetsrv\asp.dll fileversion info:"--a-- W32i DLL ENU

Re: Python equivalent of Common Lisp Macros?

2008-11-26 Thread dpapathanasiou
On Nov 26, 2:30 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Wed, Nov 26, 2008 at 11:13 AM, dpapathanasiou > > <[EMAIL PROTECTED]> wrote: > > I'm using the feedparser library to extract data from rss feed items. > > > After I wrote this function, which returns a list of item titles, I > > not

Python+Pyjamas+V8=ftw

2008-11-26 Thread inhahe
I don't know how much the community knows about this - i haven't been participating much of late - but here's something amazing. Apparently javascript is just as dynamic as python, because someone made a python-to-javascript converter in just 1200 line (pyjamas). Meanwhile google's new javascr

Re: what's so difficult about namespace?

2008-11-26 Thread Gene
On Nov 26, 9:15 am, Xah Lee <[EMAIL PROTECTED]> wrote: > On Nov 26, 5:45 am, Joshua Cranmer <[EMAIL PROTECTED]> wrote: > > > > i cannot fathom what could possibly be difficult of > > > introducing or implementing a namespace mechanism into a language. > > > Namespaces go to the very core of a langu

Re: Python equivalent of Common Lisp Macros?

2008-11-26 Thread J Kenneth King
dpapathanasiou <[EMAIL PROTECTED]> writes: > I'm using the feedparser library to extract data from rss feed items. > > After I wrote this function, which returns a list of item titles, I > noticed that most item attributes would be retrieved the same way, > i.e., the function would look exactly th

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread Terry Reedy
Stef Mientki wrote: hello, I've the idea that I always have a lot of useless code in my programs, like the next example. def _On_Menu_File_Open ( self, event = None ): if event : event.Skip () instead of def _O So I would like to extend the None-type (if that's possible), with a dum

Re: Python equivalent of Common Lisp Macros?

2008-11-26 Thread Arnaud Delobelle
dpapathanasiou <[EMAIL PROTECTED]> writes: > I'm using the feedparser library to extract data from rss feed items. > > After I wrote this function, which returns a list of item titles, I > noticed that most item attributes would be retrieved the same way, > i.e., the function would look exactly th

Re: Getting in to metaprogramming

2008-11-26 Thread Terry Reedy
Hendrik van Rooyen wrote: I am using the term in the restricted sense of Python writing Python source. Given that, can anybody think of an example that you could not do with a class? (excepting the "stored procedure" aspect) I am not sure I understand your question. def iterize(recursive_f

Re: Python equivalent of Common Lisp Macros?

2008-11-26 Thread Diez B. Roggisch
dpapathanasiou schrieb: I'm using the feedparser library to extract data from rss feed items. After I wrote this function, which returns a list of item titles, I noticed that most item attributes would be retrieved the same way, i.e., the function would look exactly the same, except for the sing

Re: Python equivalent of Common Lisp Macros?

2008-11-26 Thread Chris Rebert
On Wed, Nov 26, 2008 at 11:13 AM, dpapathanasiou <[EMAIL PROTECTED]> wrote: > I'm using the feedparser library to extract data from rss feed items. > > After I wrote this function, which returns a list of item titles, I > noticed that most item attributes would be retrieved the same way, > i.e., th

Re: Instance attributes vs method arguments

2008-11-26 Thread Aahz
In article <[EMAIL PROTECTED]>, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > >It is always good practice to provide default values for instance >variables in the class definition, both to enhance readability and to >allow adding documentation regarding the variables, e.g. Actually, my company uses a

Re: newbie question

2008-11-26 Thread Chris Rebert
On Wed, Nov 26, 2008 at 11:11 AM, Nan <[EMAIL PROTECTED]> wrote: > Hello, > I just started to use Python. I wrote the following code and > expected 'main' would be called. > > def main(): > print "hello" > > main > > But I was wrong. I have to use 'main()' to invoke main. The python > interprete

Re: newbie question

2008-11-26 Thread Albert Hopkins
On Wed, 2008-11-26 at 11:11 -0800, Nan wrote: > Hello, >I just started to use Python. I wrote the following code and > expected 'main' would be called. > > def main(): > print "hello" > > main > > But I was wrong. I have to use 'main()' to invoke main. The python > interpreter does not giv

Python equivalent of Common Lisp Macros?

2008-11-26 Thread dpapathanasiou
I'm using the feedparser library to extract data from rss feed items. After I wrote this function, which returns a list of item titles, I noticed that most item attributes would be retrieved the same way, i.e., the function would look exactly the same, except for the single data.append line inside

newbie question

2008-11-26 Thread Nan
Hello, I just started to use Python. I wrote the following code and expected 'main' would be called. def main(): print "hello" main But I was wrong. I have to use 'main()' to invoke main. The python interpreter does not give any warnings for the above code. Is there any way/tool to easily d

Re: best IDE

2008-11-26 Thread Mike Driscoll
On Nov 26, 11:59 am, asit <[EMAIL PROTECTED]> wrote: > Which one is the best IDE for python You'll probably also want to take a look at the Python wiki: http://wiki.python.org/moin/PythonEditors Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread John Machin
On Nov 27, 4:55 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I've the idea that I always have a lot of useless code in my programs, > like the next example. > >   def _On_Menu_File_Open ( self, event = None ): >     if event : >      event.Skip () > > instead of > >   def _On_Menu_File_

Re: Reg Expression - Get position of >

2008-11-26 Thread Jorgen Grahn
On Wed, 26 Nov 2008 01:48:59 -0800 (PST), M_H <[EMAIL PROTECTED]> wrote: > On Nov 25, 11:06 pm, r <[EMAIL PROTECTED]> wrote: >> On Nov 25, 4:33 pm, Jorgen Grahn <[EMAIL PROTECTED]> wrote: ... >> > Depends on if you have an irrational fear of REs or not ... I agree >> > that REs are overused for t

Re: Getting in to metaprogramming

2008-11-26 Thread Kay Schluehr
On 27 Nov., 05:41, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > Given that, can anybody think of an example that you could not do with > a class? (excepting the "stored procedure" aspect) I just noticed that corepy 1.0 [1] has been released. Corepy is an embedded DSL for synthesizing machin

Re: Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread Chris Rebert
On Wed, Nov 26, 2008 at 9:55 AM, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I've the idea that I always have a lot of useless code in my programs, > like the next example. > > def _On_Menu_File_Open ( self, event = None ): > if event : >event.Skip () > > instead of > > def _On_Men

Re: best IDE

2008-11-26 Thread asit
On Nov 26, 11:09 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Wed, Nov 26, 2008 at 9:59 AM, asit <[EMAIL PROTECTED]> wrote: > > Which one is the best IDE for python > > This was recently discussed. To avoid needlessly rehashing said > discussion, see the thread > athttp://groups.google.

Re: best IDE

2008-11-26 Thread Chris Rebert
On Wed, Nov 26, 2008 at 9:59 AM, asit <[EMAIL PROTECTED]> wrote: > Which one is the best IDE for python This was recently discussed. To avoid needlessly rehashing said discussion, see the thread at http://groups.google.com/group/comp.lang.python/browse_thread/thread/7fd136aef1c63e47/fbaff9006

best IDE

2008-11-26 Thread asit
Which one is the best IDE for python -- http://mail.python.org/mailman/listinfo/python-list

Is it possible (and wise) to extend the None-type ?

2008-11-26 Thread Stef Mientki
hello, I've the idea that I always have a lot of useless code in my programs, like the next example. def _On_Menu_File_Open ( self, event = None ): if event : event.Skip () instead of def _On_Menu_File_Open ( self, event = None ): event.Skip () So I would like to extend the None-ty

Re: import in a class

2008-11-26 Thread Chris Rebert
On Wed, Nov 26, 2008 at 9:30 AM, TP <[EMAIL PROTECTED]> wrote: > Hi everybody, > > Here is a file "test_import_scope.py": > ## > class a(): > import re > def __init__( self ): > if re.search( "to", "toto" ): > self.se = "ok!" > def print_se( self ): > print self.se >

import in a class

2008-11-26 Thread TP
Hi everybody, Here is a file "test_import_scope.py": ## class a(): import re def __init__( self ): if re.search( "to", "toto" ): self.se = "ok!" def print_se( self ): print self.se a().print_se() ## When python executes this file, we obtain an error:

Re: Getting in to metaprogramming

2008-11-26 Thread Hendrik van Rooyen
"Steven D'Aprano" wrote: > > Well, I don't know about "any problem". And it's not so much about > whether metaprograms can solve problems that can't be solved by anything > else, as whether metaprograms can solve problems more effectively than > other techniques. > > If you include factory

Re: what's so difficult about namespace?

2008-11-26 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > And before anyone bothers to point it out, yes, I know PHO now (finally) > has namespaces. I cannot resist oulling the oiss... Its not the first time... :-) - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: what's so difficult about namespace?

2008-11-26 Thread Xah Lee
Xah Lee wrote: > i cannot fathom what could possibly be difficult of > introducing or implementing a namespace mechanism into a language. Joshua Cranmer wrote: >> Namespaces go to the very core of a language, name resolution. >> Retroactively adding such a feature is extremely difficult because th

Re: what's so difficult about namespace?

2008-11-26 Thread Xah Lee
On Nov 26, 8:42 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > XahLeewrote: > >> The IT community has enough trouble getting a few ISPs to upgrade their > >> DNS software. How are you going to get millions of general users to > >> upgrade? > > > alright, that's speaks for Javascript. > > > But how

Re: what's so difficult about namespace?

2008-11-26 Thread George Sakkis
On Nov 26, 11:42 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Xah Lee wrote: > >> The IT community has enough trouble getting a few ISPs to upgrade their > >> DNS software. How are you going to get millions of general users to > >> upgrade? > > > alright, that's speaks for Javascript. > > > But h

Re: what's so difficult about namespace?

2008-11-26 Thread Stefan Behnel
Xah Lee wrote: >> The IT community has enough trouble getting a few ISPs to upgrade their >> DNS software. How are you going to get millions of general users to >> upgrade? > > alright, that's speaks for Javascript. > > But how's that apply to, say, Scheme lisp, Emacs lisp, PHP? Think before you

  1   2   >