Re: Stupid question: Making scripts python-scripts

2005-07-22 Thread Mike Meyer
Bill Mill <[EMAIL PROTECTED]> writes: > On 7/21/05, Jan Danielsson <[EMAIL PROTECTED]> wrote: >> Hello all, >> >>How do I make a python script actually a _python_ in unix:ish >> environments? >> >> I know about adding: >> #!/bin/sh >> >>..as the first row in a shell script, but when I i

Re: time.time() under load between two machines

2005-07-23 Thread Mike Meyer
[EMAIL PROTECTED] writes: > I am seeing negative latencies of up to 1 second. I am using ntp to > synchronize both machines at an interval of 2 seconds, so the clocks > should be very much in sync (and are from what I have observed). I > agree that it is probably OS, perhaps I should hop over t

Re: Getting a dictionary from an object

2005-07-23 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 23 Jul 2005 11:48:27 +0300, Thanos Tsouanas wrote: >> Hello. >> >> I would like to have a quick way to create dicts from object, so that a >> call to foo['bar'] would return obj.bar. > > That looks rather confusing to me. Why not just call obj.

Re: [path-PEP] Path inherits from basestring again

2005-07-23 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: >> * staticmethod Path.getcwd() -> Path.cwd() >> * bytes() / lines() / text() -> read_file_{bytes,lines,text} methods >> * write_{bytes,lines,text} -> write_file_{bytes,lines,text} methods > Under Linux isn't it possible to open and read from directories mu

Re: [path-PEP] Path inherits from basestring again

2005-07-24 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 23 Jul 2005 17:51:31 -0600, John Roth wrote: > >> I also like to know the number of elements, which seems to make >> sense as len(path). Again, the number of characters in the path seems >> to be utterly useless information - at least, I can't

Re: How to run python script in background after i logout

2005-07-24 Thread Mike Meyer
Thanos Tsouanas <[EMAIL PROTECTED]> writes: > On Sun, Jul 24, 2005 at 12:51:17PM +0300, Thanos Tsouanas wrote: >> On Sun, Jul 24, 2005 at 02:43:44AM -0700, Harlin Seritt wrote: >> > I have a remote linux server where I can only access it via ssh. I have >> > a script that I need to have run all th

Re: Counting processors

2005-07-26 Thread Mike Meyer
"k pur" <[EMAIL PROTECTED]> writes: > You can use > > print os.sysconf("SC_NPROCESSORS_CONF") > > works on Linux Works on FreeBSD as well. It hooks up to the sysconf C call. That's a Posix call, so this should work portably across Posix systems. I know Windows can be made Posix compliant, but I'm

Re: Safest manner to extend search path for modules?

2005-07-26 Thread Mike Meyer
"Joseph Turian" <[EMAIL PROTECTED]> writes: > Hi, > > What is the safest manner to extend search path for modules, minimizing > the likelihood of shooting oneself in the foot? > > The system (which includes scripts and their shared modules) may be > checked out in several different locations, but

Re: multiple inheritance super()

2005-07-27 Thread Mike Meyer
"Michele Simionato" <[EMAIL PROTECTED]> writes: >>I am mostly >>using old style (without type unification) init but this motivate the >>shift for the new style. Is there somewhere a document about this? > Yes, see http://www.python.org/2.3/mro.html by yours truly I'd also recommend reading http:/

Re: [OT] Problems with permissions etc

2005-07-27 Thread Mike Meyer
"Frank Millman" <[EMAIL PROTECTED]> writes: > While developing under linux, I use my own computer, as the only user, > so it has become my habit to login as root and do all my work as a > superuser. I know that this is not desirable, but it has become a > habit, which I am now trying to get out of

Re: searching string url

2005-07-27 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Anyway to the orginally replier - I wish it was homework ;-), that > would mean I wouldnt be trying to find myself a job as a recent > graduate... I decided to crawl something similar to the yellow pages > (do you have them in the US?) for my select area and then find

Re: monitor a folder for file creation, how?

2005-07-28 Thread Mike Meyer
fanbanlo <[EMAIL PROTECTED]> writes: > How do I monitor a folder for new file(s) creation? > How to use thread to do a wait until a new file is 'detected'? There's not a clean portable way to do this. The portable way is to poll the update time of the folder at regular intervals, and act when it

Re: PEP on path module for standard library

2005-07-29 Thread Mike Orr
s. Add .symlinks and .walksymlinks methods. This eliminates an 'if' for programs that want to treat symlinks specially. - I have a .move method that combines .rename, .renames, and .move; and a .copy method that combines .copy, .copy2, and .copytree . I'd appreciate a Cc on replies if your newsreader allows it. -- Mike Orr <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: writing a web client

2005-07-29 Thread Mike Meyer
"Fuzzyman" <[EMAIL PROTECTED]> writes: > Ajar wrote: >> I want to write a program which will automatically login to my ISPs >> website, retrieve data and do some processing. Can this be done? Can >> you point me to any example python programs which do similar things? >> >> Regards, >> Ajar > > Ver

Re: multiple inheritance super()

2005-07-29 Thread Mike Meyer
"Michele Simionato" <[EMAIL PROTECTED]> writes: > adding methods on the fly and metaclasses could live pretty well > without > multiple inheritance. There would be no real loss > of power and hopefully less monstruosities such > a Zope 2. But maybe this is just wishful thinking ... Um, no real lo

A replacement for lambda

2005-07-29 Thread Mike Meyer
I know, lambda bashing (and defending) in the group is one of the most popular ways to avoid writing code. However, while staring at some Oz code, I noticed a feature that would seem to make both groups happy - if we can figure out how to avoid the ugly syntax. This proposal does away with the wel

Re: Block-structured resource handling via decorators

2005-07-29 Thread Mike Meyer
"John Perks and Sarah Mount" <[EMAIL PROTECTED]> writes: > When handling resources in Python, where the scope of the resource is > known, there seem to be two schools of thought: > > (1) Explicit: > f = open(fname) > try: > # ... > finally: > f.close() > > (2) Implicit: let the GC handle i

Re: PEP on path module for standard library

2005-07-30 Thread Mike Orr
. I disagree. But it shows why a "literal" superclass in the stdlib and higher-level subclasses would be useful. I don't see why a little change to avoid an unnecessary IOError is a bad thing. The only programs it would hurt are those that really want to know whether the thing already

Re: A replacement for lambda

2005-07-30 Thread Mike Meyer
[EMAIL PROTECTED] (Bengt Richter) writes: > On Fri, 29 Jul 2005 18:07:31 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: >>I know, lambda bashing (and defending) in the group is one of the most >>popular ways to avoid writing code. However, while staring at some Oz >>cod

Re: Wheel-reinvention with Python

2005-07-30 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Calvin Spealman <[EMAIL PROTECTED]> writes: >> The choice is GUI toolkits is largely seperate from >> Python. Consider that they are just bindings to libraries that are >> developed completely seperate of the language. GUI is should be >>

Re: multiple inheritance super()

2005-07-30 Thread Mike Meyer
"Michele Simionato" <[EMAIL PROTECTED]> writes: I think you're replying to me, but you didn't include any indication so I can't be sure. > If I understand correcly you have a situation like this: > > Base > > | > > Parent1 Mixin > | | > | | > Children1 > > Base > > | > > Paren

Re: Wheel-reinvention with Python

2005-07-31 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> Calvin Spealman <[EMAIL PROTECTED]> writes: >>>> The choice is GUI toolkits is large

Re: Wheel-reinvention with Python

2005-07-31 Thread Mike Meyer
Cliff Wells <[EMAIL PROTECTED]> writes: > On Sun, 2005-07-31 at 00:59 -0400, Mike Meyer wrote: > >> I don't particularly like Tkinter, but it seems to me that it's pretty >> much won. It seems to be installed on every desktop platform along >> with Python.

Re: Wheel-reinvention with Python

2005-07-31 Thread Mike Meyer
Jorge Godoy <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > > [ Having GUI stuff included on a standard installation of Python ] > >> However, you can get compilers for both that come bundled with a good >> GUI library. Could it be that that's what you rea

Re: Wheel-reinvention with Python

2005-07-31 Thread Mike Meyer
Paul Rubin writes: > The others are non-Pythonic because they're not included in the > standard distro and therefore the Pythonic "use the included > batteries" tenet says to use Tkinter despite its flaws. When did "use the included batteries" become pythonic? "import t

Re: multiple inheritance super()

2005-07-31 Thread Mike Meyer
"Michele Simionato" <[EMAIL PROTECTED]> writes: > Mike Meyer: >> I think you're replying to me, but you didn't include any indication >> so I can't be sure. > > Oops, sorry, yes, I was replying to you. > >> These two are cases of wha

Re: Wheel-reinvention with Python

2005-08-01 Thread Mike Meyer
Cliff Wells <[EMAIL PROTECTED]> writes: > On Sun, 2005-07-31 at 14:58 -0400, Mike Meyer wrote: >> And what do I use to bundle my application for Unix? Most of the >> things I build get installed on Unix servers. > You install GUI apps on Unix *servers*? Yup. Thanks to

Re: Wheel-reinvention with Python

2005-08-01 Thread Mike Meyer
Jorge Godoy <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >> We already have multiple distributions of Python: CPython, IronPython, >> and Jython (and there's at least one more). We even have multiple >> distributions of CPython, what with Active State d

Re: Wheel-reinvention with Python

2005-08-01 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> [...] >>> >>> None of us has talked about changing syntax. However, the >>> stan

Re: Wheel-reinvention with Python

2005-08-01 Thread Mike Meyer
[EMAIL PROTECTED] (phil hunt) writes: > In practise any Python GUI is going to contain code from otyher > languages since if it was coded all the way down in python it would > be too slow. Not necessarily. My window manger is Python all the way down - it uses the Python Xlib implementation - and

Re: Wheel-reinvention with Python

2005-08-01 Thread Mike Meyer
Paul McNett <[EMAIL PROTECTED]> writes: > On Windows and Mac, you download the package and run through the wizard. Which package? I'm looking at the sourceforge download site, and don't see any packages for Python 2.4 on OS X 10.4. In fact, I don't see any packages for 10.4 at all. IIRC, they did

Re: Standards not standard

2005-08-01 Thread Mike Meyer
Dark Cowherd <[EMAIL PROTECTED]> writes: > Being able to write a usable GUI is key task for all programmers today No, it isn't. I'm a programmer. I never get paid to write usable GUIs. Most of my programs don't have a GUI at all. For those that do, I get paid to write a functional GUI. Clients tha

Re: Wheel-reinvention with Python

2005-08-02 Thread Mike Meyer
Cliff Wells <[EMAIL PROTECTED]> writes: >> > Regardless, when you say "Unix", what do you mean? You may as well say >> > "OS" as this term has little meaning. Linux (which flavor)? BSD? SCO? >> > HPUX? OS/X? Minix? Whichever way, I suspect that a bit of distutils >> > hacking would solve yo

Re: Wheel-reinvention with Python

2005-08-02 Thread Mike Meyer
Jorge Godoy <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >>> In fact this sounds more like a joke I've heard a while ago: standards, >>> if you don't like the ones out there, create your own. >> Works for me. > What works for you? You believe th

Re: Wheel-reinvention with Python

2005-08-02 Thread Mike Meyer
[EMAIL PROTECTED] (phil hunt) writes: > On Tue, 02 Aug 2005 00:42:53 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: >>[EMAIL PROTECTED] (phil hunt) writes: >>> In practise any Python GUI is going to contain code from otyher >>> languages since if it was coded al

Re: Wheel-reinvention with Python

2005-08-02 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> [...] >>> I'm interested in a language with a big community. This is my >>> definit

Re: Wheel-reinvention with Python

2005-08-02 Thread Mike Meyer
Paul McNett <[EMAIL PROTECTED]> writes: >>>project I've found, but still doable. >> Well, I've got a long history of installing things from source - >> going >> back to v6. On OS X, I like the darwin ports stuff, so I tried that: >> % sudo port install wxpython >> It blew up trying to compile wxpyt

Re: Wheel-reinvention with Python

2005-08-03 Thread Mike Meyer
Cliff Wells <[EMAIL PROTECTED]> writes: > On Tue, 2005-08-02 at 20:17 -0400, Mike Meyer wrote: > >> Um - you're not answering the question I asked. I asked "What app do I >> use to bundle my applications for Unix, ala py2exe (or whatever it is) >> for Wi

Re: Getting a dictionary from an object

2005-08-03 Thread Mike Moum
Thanos Tsouanas wrote: I'm not sure what you're getting at, but have you tried this: class A(object): def __getitem__(self, ky): return self.__dict__[ky] for example: >>> class A(object): def __init__(self,a,b,c): self.a = a self.b = b

Re: Wheel-reinvention with Python

2005-08-03 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> Because such projects attract the greatest number of developers, >>> many of them being amongst

Re: Wheel-reinvention with Python

2005-08-03 Thread Mike Meyer
Cliff Wells <[EMAIL PROTECTED]> writes: > On Wed, 2005-08-03 at 09:47 -0400, Mike Meyer wrote: >> Cliff Wells <[EMAIL PROTECTED]> writes: >> > On Tue, 2005-08-02 at 20:17 -0400, Mike Meyer wrote: >> >> Um - you're not answering the question I asked

Re: Wheel-reinvention with Python

2005-08-03 Thread Mike Meyer
Mike Meyer <[EMAIL PROTECTED]> writes: >> I think you'll find that wxPython installs perfectly on Tiger using >> the package provided. Indeed, the only really painful platform to >> install wxPython on is Linux, where you pretty much need to build from >> source

Re: Standards not standard

2005-08-03 Thread Mike Meyer
Dark Cowherd <[EMAIL PROTECTED]> writes: >> > I really think that the community needs a lot more of STANDARDS not >> > a STANDARD GUI >> >> Standards happen in one of two ways. Either an 800-lb gorrilla >> establishes them by fiat, or a group of people interested in having >> their code play well

Re: Wheel-reinvention with Python

2005-08-04 Thread Mike Meyer
In <[EMAIL PROTECTED]>, Cliff Wells <[EMAIL PROTECTED]> typed: > On Thu, 2005-08-04 at 01:04 -0400, Mike Meyer wrote: > > Right. Let's go back to the original question: What's the app I use on > > Unix that acts like py2exe on Windows and py2app on Unix? >

Re: Python IDE's

2005-08-04 Thread Mike Meyer
bruno modulix <[EMAIL PROTECTED]> writes: > Jon Hewer wrote: >> I do use Vim a lot. I am currently using it for some PHP development >> i'm doing. I'm been using it so much recently that i keep pressing >> ESC and typing vi commands out of vi. >> >> But, if i use Vi, then whenever i want to tes

Re: pain

2005-08-04 Thread Mike Meyer
Grant Edwards <[EMAIL PROTECTED]> writes: > On 2005-08-03, Mage <[EMAIL PROTECTED]> wrote: > >> Isn't jython slower (I mean performance) than java? As well as >> I understand jython code will be interpreted twice. > > Jython gets compiled into Java byte code just like Java gets > compiled into Jav

Re: Wheel-reinvention with Python

2005-08-04 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> Mike Meyer <[EMAIL PROTECTED]> writes: >>>> Torsten Bronger <[EMAIL PROTECTED]> write

Re: Wheel-reinvention with Python

2005-08-05 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> Mike Meyer <[EMAIL PROTECTED]> writes: >>>> Torsten Bronger <[EMAIL PROTECTED]> writ

Re: pain

2005-08-05 Thread Mike Meyer
Kent Johnson <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> The compiled jython will pay a performance penalty for being >> dynamic. Where Java knows the type of objects, and can deduce the >> correct method to call at compile time (well, some of the time, >> a

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Mike Meyer
"Paul McGuire" <[EMAIL PROTECTED]> writes: > Once you find your service based on price/support/etc., send them an > e-mail asking for Python support. The worst they can say is "no, and > we never will," but just as likely they might respond "yes, it's > already there" or "yes, we can add that".

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > A much better idea would be to fix the underlying > situation that makes the global statement necessary. You can't "fix" this. This code (in some python-like langauge that isn't python): x =

Proposed new collection methods

2005-08-06 Thread Mike Meyer
Another thread pointed out a couple of methods that would be nice to have on Python collections: find and inject. These are taken from http://martinfowler.com/bliki/CollectionClosureMethod.html >. find can be defined as: def find(self, test = None): for item in self: if

Re: Fat and happy Pythonistas (was Re: Replacement for keyword 'global' good idea? ...)

2005-08-06 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > However. I see nothing in the existing Python 3000 PEP that does > anything other than inspire a yawn. Sure, it's a bunch of cleanup, and > some of it is definitely needed. Actually, that's pretty much *all* it is. I always figured it was a warning about t

Re: Fat and happy Pythonistas (was Re: Replacement for keyword 'global' good idea? ...)

2005-08-06 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message >>> What I want to see in Python 3000 is an AST based language >>> that lets the editors do the pretty printing. Do you want automatic >>>

Re: Fat and happy Pythonistas (was Re: Replacement for keyword 'global' good idea? ...)

2005-08-06 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> "John Roth" <[EMAIL PROTECTED]> writes: >>>The world is moving on, in ways that I think you're not seeing. >>>And Python is standing still in many of those same ways. >> I fi

Re: Wheel-reinvention with Python

2005-08-07 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On 06 Aug 2005 17:27:33 -0700, Paul Rubin <http://[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Mike Meyer <[EMAIL PROTECTED]> writes: >> > Is there a free language you consider succ

Re: Fat and happy Pythonistas

2005-08-07 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On Sat, 06 Aug 2005 21:37:54 -0400, Mike Meyer <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: >> "The concensus of this group" is a *long* way from "the debate has >> moved on". I

Re: How to determine that if a folder is empty?

2005-08-08 Thread Mike Meyer
James Dennett <[EMAIL PROTECTED]> writes: > Reinhold Birkenfeld wrote: > >> could ildg wrote: >> >>>I want to check if a folder named "foldername" is empty. >>>I use os.listdir(foldername)==[] to do this, >>>but it will be very slow if the folder has a lot of sub-files. >>>Is there any efficient wa

Re: Decline and fall of scripting languages ?

2005-08-08 Thread Mike Meyer
Well, I tried sending this via email, but I can't derive a valid address from Paul's anti-spammed address. My apologies to the rest of you for this. Paul Rubin writes: > Should that bother me? I should say, my interest in Ocaml or Haskell > is not just to try out somet

Re: Recommendations for CVS systems

2005-08-09 Thread Mike Meyer
[EMAIL PROTECTED] writes: > I was wondering if anyone could make recomendations/comments about CVS > systems, their experiences and what perhaps the strengths of each. Perforce. it costs money, but it's worth it. My current client uses subversion, and I generally wind up cursing at it at least on

Re: Python supports LSP, does it?

2005-08-09 Thread Mike Meyer
Andy Leszczynski writes: > wikipedia > (http://en.wikipedia.org/wiki/Python_programming_language#Object-oriented_programming) > says: > """ > Python's support for object oriented programming paradigm is vast. It > supports polymorphism [...] fully in the Liskov substitution > principle-sense for a

Re: Recommendations for CVS systems

2005-08-09 Thread Mike Meyer
In <[EMAIL PROTECTED]>, François Pinard <[EMAIL PROTECTED]> typed: > [Mike Meyer] > > > [...] I generally wind up cursing at [subversion] at least once a day. > Would you accept elaborating a bit on the motivations of the cursing? > Your message says Perforce does

Re: Python supports LSP, does it?

2005-08-10 Thread Mike Meyer
bruno modulix <[EMAIL PROTECTED]> writes: > Clearly, somethingElse is a subtype of baseClass, when derivedClass is > not. Don't confuse suclassing with subtyping. issinstance() let you > check for subclassing, not for subtyping. The only language-level > mechanism I know of that more or less inforc

Re: Recommendations for CVS systems

2005-08-10 Thread Mike Meyer
[EMAIL PROTECTED] (Aahz) writes: > In article <[EMAIL PROTECTED]>, > Erik Max Francis <[EMAIL PROTECTED]> wrote: >> >>It also is free for personal use (up to 2 clients, 2 users) and open >>soruce projects can get free licenses. Or at least it was so the last I >>checked. > > For anything missi

Re: Is there a way of executing a command in a string?

2005-08-10 Thread Mike Meyer
Jeff Schwab <[EMAIL PROTECTED]> writes: > Jerry He wrote: >> Hi, suppose I have the following string >> cmdstr = "b = lambda s: s*s" >> Is there a way to execute this string other than >> copying it onto a file and then importing it? > > >>> exec "b = lambda s: s*s" > >>> b Jeff forgot to w

Re: What are modules really for?

2005-08-10 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Dan wrote: >> You might think of modules in Python as like packages in Java. However, >> putting classes in the same module doesn't give them any additional >> powers to interact with each other. (At least, not that I know of.) > > Use of "global" to rebi

Re: Python supports LSP, does it?

2005-08-11 Thread Mike Meyer
Gregory Bond <[EMAIL PROTECTED]> writes: > phil hunt wrote: >> Let q(x) be a property provable about objects x of type T. Then >> q(y) should be true for objects y of type S where S is a subtype of T >> To me, this is nonsense. Under this definition any subtype must >> behave the same as its pa

Re: Writing a small battleship game server in Python

2005-08-11 Thread Mike Meyer
Dan <[EMAIL PROTECTED]> writes: >> The server should accept connections from new players and be able to handle >> multiple games concurrently. > > Multiple threads would be the way to go for a real application. But if > you want to avoid the complexity involved in threading and > synchronization

Re: Printing literal text of an argument

2005-08-11 Thread Mike Meyer
[Format recovered from top posting] Jeremy Moles <[EMAIL PROTECTED]> writes: > On Thu, 2005-08-11 at 14:04 -0700, Rex Eastbourne wrote: >> Hi all, >> >> I've written the following simple macro called debug(aname, avalue) >> that prints out the name of an expression and its value: >> >> def debug

Re: Jargons of Info Tech industry

2005-08-12 Thread Mike Schilling
"Jürgen Exner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Xah Lee wrote: >> Jargons of Info Tech industry >> >> (A Love of Jargons) >> >> Xah Lee, 2002 Feb >> >> People in the computing field like to spur the use of spurious >> jargons. The less educated they are, the more they

Re: Printing to printer

2005-08-12 Thread Mike Meyer
Kristian Zoerhoff <[EMAIL PROTECTED]> writes: > On 8/11/05, Steve M <[EMAIL PROTECTED]> wrote: >> Kristian Zoerhoff wrote: >> >> > On 8/11/05, Steve M <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> >> >>I'm having problems sending information from a python >> >> script to a printer. I was

Re: Writing a small battleship game server in Python

2005-08-12 Thread Mike Meyer
Michael Goettsche <[EMAIL PROTECTED]> writes: > On Thursday 11 August 2005 18:34, Dan wrote: >> > The server should accept connections from new players and be able to >> > handle multiple games concurrently. >> >> Multiple threads would be the way to go for a real application. But if >> you want t

Re: Why is this?

2005-08-12 Thread Mike Meyer
Peter Mott <[EMAIL PROTECTED]> writes: > If I use concatenation + instead of multiplication * then I get the > result that Jiri expected: > > >>> L = [[]] + [[]] > >>> L[1].append(1) > >>> L > [[], [1]] > > With * both elements are changed: > > >>> L = [[]] * 2 > >>> L[1].append(1) > >>> L >

Re: What are modules really for?

2005-08-12 Thread Mike Meyer
Magnus Lycka <[EMAIL PROTECTED]> writes: > Terry Reedy wrote: >> However, everything is an instance of a class or type. > Except whitespace, comments, operators and statements! > (Did I miss anything?) What makes you think operators qualify as exceptions? >>> type(operator.add) If you're talkin

Re: Running one Python program from another as a different user

2005-08-12 Thread Mike Meyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Greetings- > This is on Linux... I have a daemon running as root and I want to > execute another Python program as another user (a regular user). I have > the name of the user and can use the 'pwd' and 'grp' modules to get > that user's user and gr

Re: Invoking GUI for app running in background with a keypress

2005-08-15 Thread Mike Meyer
Mathias Dahl <[EMAIL PROTECTED]> writes: > How does one go about doing this? I found a small program written in C > (xbindkeys) that can do this and understand that it probably involves > a lot of "low-level" stuff in X which feels a bit "scary" :). Any > clues of doing this "easily" in Python + s

Re: Library vs Framework

2005-08-16 Thread Mike Meyer
Peter Decker <[EMAIL PROTECTED]> writes: > I've written several apps that need to update a database, and each one > had to do the same things: connect, grab data, create controls to > display/edit that data, validate any changes and then stuff the edited > data back into the database. I started pl

Re: open links in a html page

2005-08-16 Thread Mike Meyer
"Ajar" <[EMAIL PROTECTED]> writes: > Hi, > > Using urllib2,ClinetForm and ClinetCookie modules I have logged into my > ISPs web site and managed to fetch the first page. Now, on this page > there is this link: > > Service > Records > > I need to click this link from python code. How do I do it? ch

GIS Related Scripting Issue

2005-08-17 Thread Mike Rose
I am currently using ArcGIS 9.1 and was referred to this list to ask my question.  I am using a python script to loop through a series of features, select all polygons that are within 5 miles, run statistics on those selected polygons, then append the values to a new database(dbf).  I am no

Re: Library vs Framework

2005-08-17 Thread Mike Meyer
Peter Decker <[EMAIL PROTECTED]> writes: > On 8/16/05, Mike Meyer <[EMAIL PROTECTED]> wrote: > >> Well, they may have created a library class that does the job for >> them. Figuring out which is which seemed to be the point of this >> thread. > > I

Re: time.clock() problem under linux (precision=0.01s)

2005-08-18 Thread Mike Meyer
"Szabolcs Nagy" <[EMAIL PROTECTED]> writes: > time.time seems much better solution, but python manual sais: "not all > systems provide time with a better precision than 1 second" > > Should i use time.clock or time.time to be more crossplatform? > Is time.time ok for windows? (time()-time() != 0.0

Re: creating/modifying sparse files on linux

2005-08-18 Thread Mike Meyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > My goal is very simple. Have a mechanism to create sparse files and > modify them by writing arbitratry ranges of bytes at arbitrary offsets. > I did get the information I want (xrange instead of range, and a simple > way to generate 1Mb string in

Re: python html

2005-08-18 Thread Mike Meyer
Steve Young <[EMAIL PROTECTED]> writes: > Hi, I am looking for something where I can go through > a html page and make change the url's for all the > links, images, href's, etc... easily. If anyone knows > of something, please let me know. Thanks. I've been doing a lot of that today. But the tool

Re: Python jobs

2005-08-19 Thread Mike Meyer
"Terry Reedy" <[EMAIL PROTECTED]> writes: > generally counter-indicated unless the name (.marketplace) or charter say > otherwise. Exceptions would be a low volume of things of direct and narrow > interest. So I consider the rare job announcements posted here ok. The > same for book announcem

Re: global interpreter lock

2005-08-19 Thread Mike Meyer
Bryan Olson <[EMAIL PROTECTED]> writes: > I don't see much point in trying to convince programmers that > they don't really want concurrent threads. They really do. Some > don't know how to use them, but that's largely because they > haven't had them. I doubt a language for thread-phobes has much >

Re: Save Binary data.

2005-08-19 Thread Mike Meyer
Larry Bates <[EMAIL PROTECTED]> writes: > Directories with large numbers of files was a problem in FAT16 and > FAT32 filesystems but not really a problem in NTFS or Linux (at > least that I've found). Depends on how you define "large" and what Linux file system you're using. Of course, if you ope

Re: BeautifulSoup

2005-08-19 Thread Mike Meyer
"Paul McGuire" <[EMAIL PROTECTED]> writes: > Here's a pyparsing program that reads my personal web page, and spits > out HTML with all of the HREF's reversed. Parsing HTML isn't easy, which makes me wonder how good this solution really is. Not meant as a comment on the quality of this code or PyP

Re: global interpreter lock

2005-08-20 Thread Mike Meyer
"Donn Cave" <[EMAIL PROTECTED]> writes: > Quoth Paul Rubin <http://[EMAIL PROTECTED]>: > | Mike Meyer <[EMAIL PROTECTED]> writes: > |> The real problem is that the concurrency models available in currently > |> popular languages are still at the &quo

Re: global interpreter lock

2005-08-20 Thread Mike Meyer
Bryan Olson <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > > The real problem is that the concurrency models available in currently > > popular languages are still at the "goto" stage of language > > development. Better models exist, have existed for

Re: global interpreter lock

2005-08-22 Thread Mike Meyer
Paul Rubin <http://[EMAIL PROTECTED]> writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> Even simpler to program in is the model used by Erlang. It's more CSP >> than threading, though, as it doesn't have shared memory as part of >> the model. But if

Re: global interpreter lock

2005-08-22 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On Sat, 20 Aug 2005 22:30:43 -0400, Mike Meyer <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: >> with these issues. If I ever find myself having to have non-trivial >> threads again, I'll check t

Re: while c = f.read(1)

2005-08-22 Thread Mike Meyer
"Greg McIntyre" <[EMAIL PROTECTED]> writes: > My files are large, hence 1 character at a time, not f.read(). There are alternatives between the two. You could read in a chunk of reasonable size for your platform. Say 10meg on a recent workstation, or 100meg on a current workstation. > This is cod

Re: Jargons of Info Tech industry

2005-08-23 Thread Mike Schilling
"l v" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Xah Lee wrote: >> (circa 1996), and email should be text only (anti-MIME, circa 1995), > > I think e-mail should be text only. I have both my email and news readers > set to display in plain text only. It prevents the marketee

Re: Jargons of Info Tech industry

2005-08-23 Thread Mike Meyer
"Mike Schilling" <[EMAIL PROTECTED]> writes: > "l v" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Xah Lee wrote: >>> (circa 1996), and email should be text only (anti-MIME, circa 1995), >> >> I think e-mail sh

Re: Jargons of Info Tech industry

2005-08-24 Thread Mike Schilling
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Mike Schilling" <[EMAIL PROTECTED]> writes: > >> "l v" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> Xah Lee wrote: >>

Re: global interpreter lock

2005-08-24 Thread Mike Meyer
Bryan Olson <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > > Bryan Olson writes: > >>Mike Meyer wrote: > >> > The rule I follow in choosing my tools is "Use the least complex tool > >> > that will get the job done." > >>Eve

Re: Jargons of Info Tech industry

2005-08-25 Thread Mike Schilling
"CBFalconer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Mike Schilling wrote: >> "Mike Meyer" <[EMAIL PROTECTED]> wrote in message >>> "Mike Schilling" <[EMAIL PROTECTED]> writes: >>>> "l v&

Re: Jargons of Info Tech industry

2005-08-25 Thread Mike Schilling
"Rich Teer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 25 Aug 2005, Mike Schilling wrote: > >> Another advantage is that evewry internet-enabled computer today already >> comes with an HTML renderer (AKA browser), so that a message

Re: Jargons of Info Tech industry

2005-08-25 Thread Mike Schilling
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Mike Schilling" <[EMAIL PROTECTED]> writes: > >> "Rich Teer" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > On Thu, 25 Aug 2005, Mike Schilling wr

Re: Jargons of Info Tech industry

2005-08-25 Thread Mike Meyer
"Mike Schilling" <[EMAIL PROTECTED]> writes: > Another advantage is that evewry internet-enabled computer today already > comes with an HTML renderer (AKA browser) No, they don't. Minimalist Unix distributions don't include a browser by default. I know the BSD&

<    5   6   7   8   9   10   11   12   13   14   >