Re: New assignmens ...

2021-10-24 Thread Alan Bawden
w the target to be as general as possible! I'm guessing that about 70% of you will think that this is a horrible idea, 10% of you will find it compelling, and the remaining 20% will find themselves conflicted. You can count me in that last category... -- Alan Bawden -- https://mail.python.o

Re: Advantages of Default Factory in Dataclasses

2021-11-16 Thread Alan Bawden
David Lowry-Duda writes: ... For the same reason that the following code doesn't do what some people might expect it to: ```python def add_to(elem, inlist=[]): inlist.append(elem) return inlist list1 = add_to(1) list2 = add_to(2) print(list1) # prints [1

Re: Advanced ways to get object information from within python

2021-12-23 Thread Alan Gauld
xv', 'exceptions', 'http', 'item', 'link', 'linkextractors', 'selector', 'signals', 'spiders', 'twisted_version', 'utils', 'version_info'] > I wish there was a convenient way for me

Re: Best way to check if there is internet?

2022-02-08 Thread Alan Bawden
ps://en.wikipedia.org/wiki/Delay-tolerant_networking https://datatracker.ietf.org/doc/html/rfc4838 https://datatracker.ietf.org/doc/html/rfc5050 -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-08 Thread Alan Bawden
And I missed one that was just published last month: https://datatracker.ietf.org/doc/html/rfc9171 Unlike RFC 5050, this version of the protocol actually claims to be a "Proposed Standard". -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Fwd: Re: Long running process - how to speed up?

2022-02-19 Thread Alan Gauld
somewhere. But it might be possible to divide and conquer and get better speed. It all depends on what you are doing. We can't tell. We cannot answer such a vague question with any specific solution. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon

Python app on a Mac

2022-04-15 Thread Alan Gauld
escript or somesuch? Alan G. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python app on a Mac

2022-04-15 Thread Alan Gauld
I displays but so does a Terminal in the background. The SO answer does mention you can get the Terminal to close when the script terminates whhich would be better than now. However, another answer mentions something called Automator, which I'll need to Google... Thanks for the pointer thou

Re: Usenet Gateway

2018-05-23 Thread Alan Bawden
Gene Heskett writes: > You are stating an opinion, but no facts to back it up, so describe your > environment that makes you write that, please. If he describes his environment and why he likes it, will that be a "fact"? Or will you dismiss that as just another "opinion"? You asked: > can so

Re: List replication operator

2018-05-26 Thread Alan Bawden
uldn't there also be a concatenation operator that performs a copy of some kind on its operands? -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Quickest way to concatenate strings

2018-10-12 Thread Alan Bawden
an f'{x}{y}{z}'. Apparently the overhead of making just _one_ temporary intermediate string is enough to tip the balance. I'm a bit surprised that it doesn't take a few more than that. Although I imagine that that balance might tip at a different point in future releases of Python (I tested using 3.6.6). -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Python indentation (3 spaces)

2018-10-14 Thread Alan Bawden
e encountered since the mid 1970s (for any programming language or operating system) has assumed either this convention or, slightly less often, its 4-column variant. It's surprising that you've never encountered it. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Python indentation (3 spaces)

2018-10-14 Thread Alan Bawden
Chris Angelico writes: > On Mon, Oct 15, 2018 at 9:56 AM Alan Bawden wrote: > > In my experience this is a very common way to assume that tabs will be > > interpreted. Virtually every source-code file I have encountered since the > > mid 1970s (for any programming languag

Re: Instalação

2016-03-30 Thread Alan Evangelista
more popular Python 2 version. Its latest version is 2.7.11. I recommend you download the Python 2.7.11 x86_64 MSI installer in https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi - run the installer Python is installed. You can run it from the command line. Regards, Alan

Re: PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread Alan Evangelista
looking at it. I favor a more intuitive syntax over a more concise one. Regards, Alan Evangelista -- https://mail.python.org/mailman/listinfo/python-list

Re: for / while else doesn't make sense

2016-05-23 Thread Alan Evangelista
On 05/23/2016 02:52 PM, Ian Kelly wrote: On Mon, May 23, 2016 at 11:44 AM, Random832 wrote: On Mon, May 23, 2016, at 13:33, Chris Angelico wrote: and then you can use the special "tagged literal" syntax, like with special forms of string literal: f*22/7 + f*2/11 Fraction(256, 77) I like t

Re: Recommendation for Object-Oriented systems to study

2016-05-29 Thread Alan Evangelista
pers see Python as more pragmatic, more flexible and quicker/easier/less bureaucratic to develop than Java, so my opinion may be controversial. Regards, Alan Evangelista -- https://mail.python.org/mailman/listinfo/python-list

Re: Recommendation for Object-Oriented systems to study

2016-06-02 Thread Alan Evangelista
On 06/02/2016 02:44 AM, Lawrence D’Oliveiro wrote: On Monday, May 30, 2016 at 7:17:47 AM UTC+12, Alan Evangelista wrote: - Java forces everything to be implemented in OO model (classes) After you have spend a few months battering your head against the rigidity and verbosity of Java, you will

Re: Structure of program development

2016-07-04 Thread Alan Evangelista
I am new to this programming adventure. I've gotten past the introductory chapters in 'How to..." books and now want to start developing a much more complicated program that I will use repeated for different applications. When I worked in Perl there was an option to write a program in a text

Re: Odd truth result with in and ==

2018-11-23 Thread Alan Bawden
SyntaxError: invalid syntax 3.6> not [1,2,3] == (not True) True 3.6> not [] == (not True) True 3.6> (not []) == (not True) False -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Improvement Request

2018-11-24 Thread Alan Bawden
table of contents disappears off the top. It's a reasonable request, but this probably isn't the most effective place to make it. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Lifetime of a local reference

2019-02-26 Thread Alan Bawden
tation. I suspect that given the history of Python, pretty much everybody has always assumed that a Python implementation will not delete local variables early. But I agree with you that the Python Language Reference does not appear to address this question anywhere! -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Lifetime of a local reference

2019-02-27 Thread Alan Bawden
Gregory Ewing writes: > Alan Bawden wrote: > > the Java Language > > Specification contains the following language: > >Optimizing transformations of a program can be designed that reduce > >the number of objects that are reachable to be less than those wh

Re: Lifetime of a local reference

2019-03-01 Thread Alan Bawden
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Alan Bawden writes: > >The Java compiler has no way to know whether a variable references an > >object with a finalize() method that has side effects > > java.lang.Object#finalize() is deprecated since Java 9. And we

Re: Testing the data type of a value

2019-05-13 Thread Alan Bawden
8:24:23) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> isinstance(True, int) True >>> type(True) == int False >>> type(True) -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: FDs will be closed after exception automatically in python2.7?

2019-06-10 Thread Alan Bawden
quot;,"w+") as fd: That makes the window smaller, but it doesn't actually eliminate it. Look at the generated byte code. In both cases the call to open() is over and the open file is created _before_ the SETUP_WITH instruction is executed. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: FDs will be closed after exception automatically in python2.7?

2019-06-11 Thread Alan Bawden
D'Arcy Cain writes: > On 2019-06-10 15:46, Alan Bawden wrote: > > D'Arcy Cain writes: > >> with open("file","w+") as fd: > > > > That makes the window smaller, but it doesn't actually eliminate it. Look > > at the generate

Re: My pseudocode to Python?

2019-08-19 Thread Alan Bawden
r...@zedat.fu-berlin.de (Stefan Ram) writes: > for i in range( len( list )- 1, 0, -1 ): > if list[ i ]is None: del list[ i ] list = [x for x in list if x is not None] -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: My pseudocode to Python?

2019-08-19 Thread Alan Bawden
Alan Bawden writes: > r...@zedat.fu-berlin.de (Stefan Ram) writes: > > for i in range( len( list )- 1, 0, -1 ): > > if list[ i ]is None: del list[ i ] > > list = [x for x in list if x is not None] Except 'list' is a bad name to use... -- Alan Bawden --

Re: What make function with huge list so slow

2019-08-25 Thread Alan Bawden
storage here. Depending on how much physical memory you have, you much actually be swapping before you're done. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: An "Object" class?

2019-08-28 Thread Alan Bawden
. `type.mro' tells you something about the _implementation_ of `int' and `float' that you _usually_ shouldn't concern yourself with. Stick to `isinstance' and `issubclass' and everthing looks pretty kosher. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: a,b = 2,3 and [a,b] = [2,3]

2019-09-01 Thread Alan Bawden
iler optimized the tuple away, but failed to optimize the list away! -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: a,b = 2,3 and [a,b] = [2,3]

2019-09-02 Thread Alan Bawden
Chris Angelico writes: > On Mon, Sep 2, 2019 at 12:36 PM Alan Bawden wrote: ... > > > > a,b = 2,3 and [a,b] = [2,3] ... > > It looks to me like they generate identical code. The first one calls the > > construction of a tuple, where the second one calls for the cons

Re: WedWonder: Scripts and Modules

2019-09-11 Thread Alan Bawden
x27; in the process. In fact, I have been known to add `if __name__' to my colleagues' Python scripts, just so that I can safely `pydoc' them. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: A small quiz

2020-01-03 Thread Alan Bawden
.« statement). Can you guess what it is? Well, there's sys.stdin. But I would expect beginning students to find the effect of typing "next(sys.stdin)" to the commnd prompt to be a bit confusing... -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Re: Magnitude and ProtoMagnitude ABCs — primarily for argument validation

2020-03-10 Thread Alan Bawden
rly an error. Kahan doesn't think much of signalling NaNs, writing that they "exist mainly for political reasons and are rarely used". -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test the data type of a variable

2020-04-23 Thread Alan Bawden
in Python3.8 to test the data type, e.g. > is_floate(var) > is_string(var) > etc. ? You should probably be using isinstance(), as in: isinstance(var, float) isinstance(var, str) -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: IP address to binary conversion

2020-05-08 Thread Alan Bawden
al.alex...@gmail.com writes: > Just for the records and to have a fully working bidirectional solution: > > >>> ip > '10.44.32.0' > >>> struct.unpack('L', socket.inet_aton(ip))[0] > 2108426 > >>> socket.inet_ntoa(struct.pack(' '10.44.32.0' > >>> > > Good luck ;-) This will not work as expected

Re: Class Definitions

2020-11-12 Thread Alan Bawden
like: class Main: value = [] def add(self, x): self.value += [x] and be suprised by the resulting behavior. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Control stript which is runing in background.

2020-12-31 Thread Alan Bawden
n {PIPE_BUF} bytes may have data interleaved, on arbitrary boundaries, with writes by other processes, whether or not the O_NONBLOCK flag of the file status flags is set. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Control stript which is runing in background.

2021-01-01 Thread Alan Bawden
jak writes: Il 01/01/2021 06:23, Alan Bawden ha scritto: > jak writes: > > Running the command: > > $ cat bible.txt > cmdpipe & cat bible.txt > cmdpipe & cat bible.txt > cmdpipe > > the three texts do not mix >

Re: Control stript which is runing in background.

2021-01-02 Thread Alan Bawden
jak writes: Il 02/01/2021 01:07, Alan Bawden ha scritto: > jak writes: > > Il 01/01/2021 06:23, Alan Bawden ha scritto: > > jak writes: > > > > Running the command: > > > > $ cat bible.txt &g

Re: 1 Million users.. I can't Scale!!

2005-09-28 Thread Alan Kennedy
transmitting your SMSs? 2. If you disable the actual transmission, how many SMSs can your application generate per second? HTH, -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-10-04 Thread Alan Balmer
On Tue, 04 Oct 2005 17:14:45 GMT, Roedy Green <[EMAIL PROTECTED]> wrote: >On Tue, 23 Aug 2005 08:32:09 -0500, l v <[EMAIL PROTECTED]> wrote or quoted : > >>I think e-mail should be text only. > >I disagree. Your problem is spam, not HTML. Spam is associated with >HTML and people have in Pavlovi

Re: Jargons of Info Tech industry

2005-10-10 Thread Alan Balmer
On Sat, 08 Oct 2005 20:43:12 GMT, Roedy Green <[EMAIL PROTECTED]> wrote: >On Tue, 04 Oct 2005 17:57:13 -, [EMAIL PROTECTED] (Gordon >Burditt) wrote or quoted : > >>HTML enables a heck of a lot of problems: "web bugs" in email, >>links to fake sites that appear as real ones in what shows up >>

Re: Jargons of Info Tech industry

2005-10-10 Thread Alan Balmer
On 9 Oct 2005 13:12:43 -0700, [EMAIL PROTECTED] wrote: >> My grandma doesn't put captions in her photo album, >> and she doesn't need captions on her photos in email. > >She doesn't need captions in the album because she will explain the >pictures, at length, every single one of them, to anyone wh

Re: Jargons of Info Tech industry

2005-10-10 Thread Alan Balmer
On Sun, 09 Oct 2005 00:03:05 +0200, Lasse Vågsæther Karlsen <[EMAIL PROTECTED]> wrote: >In any case, html email is here to stay. Or perhaps I should remove html >and say "richly formatted", whatever that might mean in the future. > >But trying to keep your email world into a pure text-based >no-

Re: Microsoft Hatred FAQ

2005-10-17 Thread Alan Balmer
On Sat, 15 Oct 2005 02:31:33 GMT, Roedy Green <[EMAIL PROTECTED]> wrote: >On 14 Oct 2005 19:01:42 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote or >quoted : > >> >>Q: Microsoft's Operating System is used over 90% of PCs. If that's >>not monopoly, i don't know what is. > >They got where they are

Re: Microsoft Hatred FAQ

2005-10-19 Thread Alan Connor
On comp.os.linux.misc, in <[EMAIL PROTECTED]>, "Michael Heiming" wrote: This is your 7th post on this thread, Michael. You spend a lot of time griping about trolls. Maybe you should consider not feeding them, you stupid hypocrite. To all the shit-for-brains trolls that are polluting these group

Re: Microsoft Hatred FAQ

2005-10-20 Thread Alan Connor
On comp.os.linux.misc, in <[EMAIL PROTECTED]>, "Tim Slattery" wrote: Three OS's from corporate kings in their towers of glass, Seven from valley lords where orchards used to grow, Nine from dotcoms doomed to die, One from the Dark Lord Gates on his dark throne In the Land of Redmond where the

Re: Microsoft Hatred FAQ

2005-10-23 Thread Alan Connor
"Matt Garrish" wrote: That does it. From this point on my newsfilter is killing (leaving on the server) any articles cross-posted to more than three groups. To all of the snivelling punks polluting the Usenet with their verbal diarrhea here: Shut up and go away. Done. (I haven't read a single

Re: help with concurrency control (threads/processes & signals)

2005-10-27 Thread Alan Kennedy
o infrastructure development required. http://www.zope.org/Members/tim_one/spread/ http://www.python.org/other/spread/ The latter page has links to the original C spread module, which has documentation, FAQs, etc. -- alan kennedy -- email

Re: WTF?

2005-11-02 Thread Alan Kennedy
troll Xha Lee gets to post > all sorts of profanity and ranting without any problem? Take a look at the source of XL's messages: he posts through Google Groups, thus completely avoiding the SPAM filter on python.org. http://groups.google.com/group/comp.lang.python/msg/762c8dad1928e

Re: Python and MySQL

2005-11-02 Thread Alan Kennedy
fe's too short to spend your time hacking around artificial barriers to progress. -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list

Re: XML DOM: XML/XHTML inside a text node

2005-11-04 Thread Alan Kennedy
need to be aware of. See the following archive post for how to clean up untrusted (x)html. http://groups.google.com/group/comp.lang.python/browse_thread/thread/fbdc7ae20353a36d/91b6510990a25f9a HTH, -- alan kennedy -- email alan: h

Re: modifying source at runtime - jython case

2005-11-05 Thread Alan Kennedy
n ( String args[] ) { PythonInterpreter interp = new PythonInterpreter(); interp.exec(my_class_source); interp.exec(create_instance); interp.exec(invoke_hello); interp.exec(overwrite_meth); interp.exec(invoke_hello); } } //

Re: modifying source at runtime - jython case

2005-11-06 Thread Alan Kennedy
class, e.g. their methods, by modifying the class itself. Any reference to the method on the instance will resolve to the method definition from its class, provided you haven't overwritten the method on the individual instance. Resolving the method is done at invocation time, beca

Re: Threading-> Stopping

2005-11-07 Thread Alan Kennedy
FAQ. Isn't that what FAQs are for? Maybe the FAQ needs to be turned into a wiki? -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Map of email origins to Python list

2005-11-07 Thread Alan Kennedy
The Commitments" can attest, is a deep insult a born-and-bred Northsider such as myself ;-) -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Map of email origins to Python list

2005-11-07 Thread Alan Kennedy
[Alan Kennedy] >>So presumably "chcgil" indicates you're in Chicago, Illinois? [EMAIL PROTECTED] > Yes, but why, then, is my name logged into Mountain View, CA? Presumably the creators of the map have chosen to use a mechanism other than NNTP-Posting-Host IP addr

Re: Map of email origins to Python list

2005-11-07 Thread Alan Kennedy
[Claire McLister] > Thanks, Alan. You are absolutely right, we are not using the > NNTP-Posting-Host header for obtaining the IP address. Aha, that would explain the lack of precision in many cases. A lot of posters in this list/group go through NNTP (either with an NNTP client or throug

Re: Map of email origins to Python list

2005-11-08 Thread Alan Kennedy
[Claire McLister] > I've made the script available on our downloads page at: > > http://www.zeesource.net/downloads/e2i [Alan Kennedy] >> I look forward to the map with updated precision :-) [Claire McLister] > Me too. Please let me know how we should modify the script

Re: Inserting Records into SQL Server - is there a faster interface than ADO

2005-11-11 Thread Alan Kennedy
no", then you can use the "bcp" (Bulk CoPy) utility to transfer data into SQLServer *very* quickly. http://msdn.microsoft.com/library/en-us/coprompt/cp_bcp_61et.asp http://www.sql-server-performance.com/bcp.asp thought-it-was-worth-mentioning-ly y'rs, -- alan kennedy --

Re: Making a persistent HTTP connection

2005-11-14 Thread Alan Kennedy
mples.html However, even httplib is "synchronous", in that it cannot pipeline requests: the response to the first request must be competely read before a second request can be issued. HTH, -- alan kennedy -- email alan: h

Re: Making a persistent HTTP connection

2005-11-14 Thread Alan Kennedy
l However, even httplib is "synchronous", in that it cannot pipeline requests: the response to the first request must be competely read before a second request can be issued. HTH, -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] need a tutorial in tokens ,different types

2005-11-20 Thread Alan Gauld
ata types in python The official documentaton explains most of it. You can try the Raw Materials topic in my tutorial if you like. Alan G Author of the learn to program web tutor http://www.freenetpages.co.uk/hp/alan.gauld -- http://mail.python.org/mailman/listinfo/python-list

Accessing a database from a multithreaded application

2005-11-22 Thread Alan Kemp
information would be greatly appreciated. Thanks for your time, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: xpath support in python 2.4

2005-11-29 Thread Alan Kennedy
of the standard library? No, it's not. Not sure if it ever was. > if not, what should I use? Install PyXML http://pyxml.sourceforge.net HTH, -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://

Re: XML and namespaces

2005-12-02 Thread Alan Kennedy
uot;http://webdav.org"; xmldoc = xml.dom.minidom.Document() xmlroot = xmldoc.createElementNS(DAV_NS_U, "DAV:xpg") xmlroot.setAttributeNS(xml.dom.XMLNS_NAMESPACE, "xmlns:DAV", DAV_NS_U) xmldoc.appendChild(xmlroot) print xmldoc.toprettyxml()

Re: XML and namespaces

2005-12-03 Thread Alan Kennedy
silly for DOM to produce malformed >>XML+XMLNS, and of course it is not meant to. The minidom behavior >>needs fixing, badly. [Alan Kennedy] > My interpretation of namespace nodes is that the application is > responsible for creating whatever namespace declaration attribute nodes

Re: XML and namespaces

2005-12-05 Thread Alan Kennedy
decl, element_ns_uri) > I'd love to hear how many actual minidom users would agree with you. > > It's currently a bug. It needs to be fixed. However, I have no time > for this bewildering fight. If the consensus is to leave minidom the > way it is, I&#x

Re: XML and namespaces

2005-12-05 Thread Alan Kennedy
se expectations match with the guesses made on their behalf will find that their software is not portable between DOM implementations. With something as finicky as XML namespaces, you can't just make ad-hoc decisions as to what the user "really wants". That's why DOM L2 punted on the whole problem, and left it to DOM L3. -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list

Re: XML and namespaces

2005-12-05 Thread Alan Kennedy
[Alan Kennedy] >>On the contrary, once you start second guessing the standards and making >>guesses about what users are really trying to do, and making decisions >>for them, then some people are going to get different behaviour from >>what they rightfully expect according

Re: XML and namespaces

2005-12-06 Thread Alan Kennedy
eturn db.newDocument() def serialise(doc): format = OutputFormat( doc ) outbuf = StringWriter() serial = XMLSerializer( outbuf, format ) serial.asDOMSerializer() serial.serialize(doc.getDocumentElement()) return outbuf.toString() doc = create_document() root = doc.createElementNS("DAV:", &qu

Re: XML and namespaces

2005-12-06 Thread Alan Kennedy
ong on this ", "you misunderstand ", "you're guessing .", etc, then you should be prepared to back them up, not state them and then say "but I'm too busy and/or important to discuss it with you&quo

Re: XML and namespaces

2005-12-06 Thread Alan Kennedy
toolkits. """ http://cheeseshop.python.org/pypi/libxml2dom [Alan Kennedy] >>Will you accept Apache Xerces 2 for Java as a widely used DOM >>Implementation? [Fredrik Lundh] > sure. > > but libxml2 is also widely used, so we have at least two ways to interpr

Re: XML and namespaces

2005-12-07 Thread Alan Kennedy
that > different developers have interpreted the specification in different ways ? What specification? Libxml2 implements none of the DOM specifications. -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list

Re: XML and namespaces

2005-12-07 Thread Alan Kennedy
[Alan Kennedy] >>Don't confuse libxml2dom with libxml2. [Paul Boddie] > Well, quite, but perhaps you can explain what I'm doing wrong with this > low-level version of the previously specified code: Well, if your purpose is to make a point about minidom and DOM standards

Re: Complementary language?

2005-01-01 Thread Alan Gauld
indows users, who are 80+% of my visitors). Javascript is especially useful since its an easy lead in to learning C/C++, Java, even Perl to some extent and a lot of sample code sites use those languages. Alan G. Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http

Re: The Industry choice

2005-01-01 Thread Alan Gauld
tal of 13 languages... with 5 geographically dispersed teams comprising a total of 200 developers (plus about 40 testers). Interesting times...in the Chinese sense! Alan G Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http://mail.python.org/mailman/listinfo/python-list

Re: What can I do with Python ??

2005-01-01 Thread Alan Gauld
assuming I have nothing better to do than play their game. If that's all I wanted to do I'd stick with DOS, or buy a Nintendo... I have a multi tasking PC please let me multi task! ;-) Alan G. Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http

Re: screen clear question

2005-01-02 Thread Alan Gauld
AX terminals too. Finally I think the curses module allows you to clear a window, including the main window - ie the terminal screen. In each case run CLS (or clear) via os.system() But the bottom line is that there is no builtin command because the mechanism is different on each platform. Alan G

Re: Frameworks for "Non-Content Oriented Web Apps"

2005-01-02 Thread Alan Gauld
uses client side Javascript to detect changes and send the data requests to/from the data server... No special frameworks as such... HTH, Alan G. Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http://mail.python.org/mailman/listinfo/python-list

Re: screen clear question

2005-01-02 Thread Alan Gauld
On Mon, 03 Jan 2005 02:15:23 +1000, Nick Coghlan > Alan Gauld wrote: > > But the bottom line is that there is no builtin command > > because the mechanism is different on each platform. > > I'd have said it was because the inpreter is line-oriented rather than &

Re: Securing a future for anonymous functions in Python

2005-01-06 Thread Alan Gauld
ssed the bulk of the discussion over the years. Alan G. Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Alan Gauld
27;ve done great work with your learning to program site > and all the help you've given on the python-tutor list: Aw shucks! Thanks ;-) Alan G. Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Alan Gauld
the principles suddenly made a lot of the "rules of programming" that I'd been taught make perfect sense (no side-effects, avoid globals, etc) Its like the fact that I rarely use Maxwell's equations when designing electronic circuits - but its nice to know what the underly

Textual markup languages (was Re: What YAML engine do you use?)

2005-01-23 Thread Alan Kennedy
page which compares multiple markup languages, in terms of the above requirements. If I can't find such a markup language, then I might instead end up using a WYSIWYG editing component that gives the user a GUI and generates (x)html. htmlArea: http://www.htmlarea.com/ Editlet: http://ww

Re: Textual markup languages (was Re: What YAML engine do you use?)

2005-01-23 Thread Alan Kennedy
[Alan Kennedy] >> From what I've seen, pretty much every textual markup targetted >> for web content, e.g. wiki markup, seems to have grown/evolved >> organically, meaning that it is either underpowered or overpowered, >> full of special cases, doesn't have a mean

Re: Textual markup languages (was Re: What YAML engine do you use?)

2005-01-23 Thread Alan Kennedy
[Alan Kennedy] >>So, I'm hoping that the learned folks here might be able to give me >>some pointers to a markup language that has the following >>characteristics [Paul Rubin] > I'm a bit biased but I've been using Texinfo for a long time and have > been happ

Re: Automatic Windows printer creation?

2005-01-23 Thread Alan Gauld
et-direct-attached printer. The easiest way by far is to use the Windows Script Host objects from winall. WSH makes creating windows resources like printers etc fairly easy. Alan g. Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http://mail.python.org/mailman/listinfo/python-list

Re: how to ncurses on win32 platform

2005-01-24 Thread Alan Gauld
On Mon, 24 Jan 2005 17:06:52 +0100, Brane <[EMAIL PROTECTED]> wrote: > please advice You can use ncurses via cygwin. There are DOS ports too but I couldn't get any of them to work on my XP box, YMMV... Search the Vaults of Parnassus for the DOS Stuff. Alan G. Author of the Le

Re: Textual markup languages (was Re: What YAML engine do you use?)

2005-01-28 Thread Alan Kennedy
[Alan Kennedy] >>However, I'm torn on whether to use ReST for textual content. On the one >>hand, it's looks pretty comprehensive and solidly implemented. But OTOH, >>I'm concerned about complexity: I don't want to commit to ReST if it's >>going t

Re: Suggesion for an undergrad final year project in Python

2005-02-02 Thread Alan Kennedy
a period, do you have available for your project? Best of luck, -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Advice on OSX cocoa app with Python backend

2005-02-02 Thread Alan Gauld
etching it a wee bit, but it does have some OO features certainly. However if you are simply using the DB as persistence in the server and for reporting then an RDBMS should be fine and the technology is well understood. Alan G. Author of the Learn to Program website http://www.freenetpages

"Collapsing" a list into a list of changes

2005-02-04 Thread Alan McIntyre
the way I'm doing this now: def straightforward_collapse(myList): collapsed = [myList[0]] for n in myList[1:]: if n != collapsed[-1]: collapsed.append(n) return collapsed Is there an elegant way to do this, or should I just stick with the code above? Thanks,

Re: Learning Python for a new beginner

2005-02-04 Thread Alan McIntyre
libraries that come as part of the standard Python distribution have made my life a lot easier than it ever was when I was only using C/C++. Of course, your mileage may vary, depending on what sort of programming you'd like to do. :) Hope this helps, Alan McIntyre http://www.esrgtech.com

Re: "Collapsing" a list into a list of changes

2005-02-04 Thread Alan McIntyre
Your first example is along the lines of what I was thinking when I said "elegant." :) I was looking for something that I could drop into one or two lines of code; I may not do that if I'm writing code that will have to be maintained, but it's still nice to know how to do

Re: "Collapsing" a list into a list of changes

2005-02-04 Thread Alan McIntyre
I think you're right; sometimes I'm susceptible to the "I can do that in one line of code" temptation. :) Since this current bit of code will probably end up in something that's going to be maintained, I will probably stick with the straightforward method just to be nice to the maintainer (espe

Re: "Collapsing" a list into a list of changes

2005-02-04 Thread Alan McIntyre
Jack, I'm not using 2.4 yet; still back in 2.3x. :) Thanks for the examples, though - they are clear enough that I will probably use them when I upgrade. Thanks, Alan Jack Diederich wrote: If you are using python2.4, import itertools as it [x[0] for (x) in it.gr

<    1   2   3   4   5   6   7   8   9   10   >