[EMAIL PROTECTED] (Alex Martelli) writes:
> Mike Meyer <[EMAIL PROTECTED]> wrote:
>> > What classes' invariants do you have to check in those cases? E.g.,
>> > consider zim.foo.bar.baz() -- you do have to check the invariants of
>> > bar, foo AND zim, rig
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Thu, 08 Dec 2005 20:46:33 -0500, Mike Meyer wrote:
>> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>>> Paul Rubin wrote:
>>>> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>>>>
Shane Hathaway <[EMAIL PROTECTED]> writes:
> Let me fully elaborate the heresy I'm suggesting: I am talking about
> inline imports on every other line of code. The obvious
> implementation would drop performance by a double digit percentage.
No, it wouldn't. The semantics of import pretty much re
Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> In particular,
>> you can get most of your meaningless methods out of a properly
>> designed Coordinate API. For example, add/sub_x/y_ord can all be
>> handled with move(delta_x = 0, delta_y = 0).
>
> Here is my example again:
>
> [quote]
> Then, somew
[EMAIL PROTECTED] (Alex Martelli) writes:
> Mike Meyer <[EMAIL PROTECTED]> wrote:
>...
>> >> it. Nothing you do with zim.foo or zim.foo.bar can change the state of
>> >> zim. The only invariants you need to check are bar's, which you do at
>> >
[EMAIL PROTECTED] (Cameron Laird) writes:
> For a not-too-different variety of safety, I like Eiffel. Again,
> Eiffel compilers are available nearly, but not entirely, everywhere.
Eiffel compilers tend to generate C code, and hence work on anything
with a C compiler. The question then becomes ho
[EMAIL PROTECTED] writes:
> In my case I wouldn't like to use it as a proof of anything, but I want
> to get a script accessing a library system in my school -- it means
> many attempts to play with urllib. I would prefer to do it in an
> interactive session, but then I would love to have a record
"drife" <[EMAIL PROTECTED]> writes:
> Hello,
>
> Making the transition from Perl to Python, and have a
> question about constructing a loop that uses an iterator
> of type float. How does one do this in Python?
>
> In Perl this construct quite easy:
>
> for (my $i=0.25; $i<=2.25; $i+=0.25) {
> pri
Bulba! <[EMAIL PROTECTED]> writes:
> This "free software" (not so much OSS) notion "but you can
> hire programmers to fix it" doesn't really happen in practice,
> at least not frequently: because this company/guy remains
> ALONE with this technology, the costs are unacceptable.
Yes, but fixing p
"It's me" <[EMAIL PROTECTED]> writes:
> Well, now that they are API based, they can easily add any script language
> they so wish through SWIG (www.swig.org).
>
> Maybe not LISP. SNOBOL would be the right thing to do. (*NOT*)
SWIG generates wrappers for GUILE, which is Scheme, which looks enou
Steve Holden <[EMAIL PROTECTED]> writes:
> It's the *ideas* that are important, though, rather than the
> implementation, and my initial hope was to publicise the weakness of
> statelessness on the web as applications become more complex.
This needed publicity? Isn't it obvious to anyone who has
Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> writes:
> [1] through the French "mètre" of course; great job, those
> revolutionaries did with the metric system. As Asimov put it, "how many
> inches to the mile?"
Trivia question: Name the second most powerfull country on earth not
using the me
Tim Peters <[EMAIL PROTECTED]> writes:
> [Nick Allen]
>> Unfortunately, restore does not do the same for unified_diff. I do
>> not see any similar function that is intended for unified_diff. Does
>> anyone know how to "restore" from a unified diff generated delta?
>
> That's in general impossibl
[EMAIL PROTECTED] writes:
>>is python more popular than coldfusion?
> For your specific purpose of learning a language to get a job, I
> suggest visiting the site http://mshiltonj.com/sm/categories/languages/
> , where it appears that Python is mentioned about as often as Fortran
> or Ada in job l
"Philippe C. Martin" <[EMAIL PROTECTED]> writes:
> Hi,
>
> I am testing the smtp module and have the following question:
>
> in the code below (taken from net sample) prior to adding the "Subject:"
> field, the email client found the "From" and the "To". Without the
> "Subject:" field on I get thi
Andrea Griffini <[EMAIL PROTECTED]> writes:
> On Tue, 14 Jun 2005 16:40:42 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote:
>
> >Um, you didn't do the translation right.
>
> Whoops.
>
> So you know assembler, no other possibility as it's such
> a c
Andrew Dalke <[EMAIL PROTECTED]> writes:
> Andrea Griffini wrote:
> > Wow... I always get surprises from physics. For example I
> > thought that no one could drop confutability requirement
> > for a theory in an experimental science...
>
> Some physicists (often mathematical physicists) propose
>
"Claudio Grondi" <[EMAIL PROTECTED]> writes:
>
> What has it all to do with Python? To be not fully off-topic, I
> suggest here, that it is much easier to discuss programming
> related matters (especially in case of Python :-) or mathematics
> than any other subjects related to nature, because pr
Grant Edwards <[EMAIL PROTECTED]> writes:
> Under Unix it's not all that hard to accidentally create files
> like that. Sometimes you have to resort to blasting them away
> by i-node number, or by moving the files you want to keep and
> then nuking the directory.
A standard practice on our early U
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Sat, 18 Jun 2005 15:00:02 +0200, Renato Ramonda wrote:
> Hiding the source code does not make software more secure. Any bugs and
> security holes will be there whether the software is distributed in source
> code, object code, or something in betwee
"TPJ" <[EMAIL PROTECTED]> writes:
> I've written this script in bash, because I thought it would be better
> to have a script which would run in environment without Python (it all
> was about installing Python anyway!). I used bash, dialog, wget... And
> now someone suggested, that I shuld use Pyt
[EMAIL PROTECTED] writes:
> Hello All,
>
> Here's what I'm trying to do:
>
> I need to connect to a pop3 server, download all messages, and copy all
> of the attachments into a specific directory. The actual email message
> is unimportant. Now, I've found plenty of examples that strip the
> at
One of my clients has a need for a web-based messaging
system. Something python-based is preferred, as that's where our
expertise is, but web frameworks built in Python are perfectly
acceptable. If you know of something really good that isn't in Python,
I wouldn't mind hearing about it - but I do h
"SHELTRAW, DANIEL" <[EMAIL PROTECTED]> writes:
> Hello Python list
>
> If a Python program has an import statement like:
>
> import FFT
>
> how do I determine the path to the imported file?
guru% python
Python 2.4.1 (#2, Apr 25 2005, 21:42:44)
[GCC 3.4.2 [FreeBSD] 20040728] on freebsd5
Type "hel
Stelios Xanthakis <[EMAIL PROTECTED]> writes:
> Michael Hoffman wrote:
>> Stelios Xanthakis wrote:
>>
>>> Magnus Lycka wrote:
>> >
>>
Right. Silly me. Maybe in some future Python version, True and False
will be constants, like None is since Python 2.4.
>>>
>>>
>>> Actually, there is sup
Michael Hoffman <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>
>> Making None a constant broke existing code (and I just saw old code
>> that assigned to None). Are True and False that much more common as
>> variable names than None?
>
> Yes. In fact, I c
gry@ll.mit.edu writes:
> Aditi wrote:
>> hi all...i m a software engg. student completed my 2nd yr...i have been
>> asked to make a project during these summer vacations...and hereby i
>> would like to invite some ideas bout the design and implementation of
>> an APPLICATION MONITORING SYSTEMi
Tom Anderson <[EMAIL PROTECTED]> writes:
> On Fri, 24 Jun 2005, Roy Smith wrote:
>> Tom Anderson <[EMAIL PROTECTED]> wrote:
>>> The one thing i really do miss is method overloading by parameter
>>> type. I used this all the time in java
>> You do things like that in type-bondage languages
> I love
Riccardo Galli <[EMAIL PROTECTED]> writes:
> On Fri, 24 Jun 2005 09:00:04 -0500, D H wrote:
>
>>> Bo Peng wrote:
>>>
I need to pass a bunch of parameters conditionally. In C/C++, I can
do func(cond1?a:b,cond2?c:d,.)
Is there an easier way to do this in Python?
>>>
>>>
>> Th
message to a
>> mailing list or Usenet newsgroup (or other discussion forum, I suppose)
>> they are often trying to get someone else to "take their bait".
>>
>> See also: http://www.answers.com/troll
>>
>> Skip
>
--
Mike Meyer <[EMAIL PROTECTE
Ivan Van Laningham <[EMAIL PROTECTED]> writes:
> In which case, you should start with PostScript;-) I learned it by
> plugging a glass tty into the serial port on one of the very first
> AppleWriters and typing away. None of this fancy-shmancy '>>>'
> business;-) But what a great reward, having
"Adriaan Renting" <[EMAIL PROTECTED]> writes:
> I realy prefer a WYSIWYG UI design tool
> to having to code BUTTON(120, 123, 123, 335, -1, NULL, doButton, "Push",
> "push this button")
With a modern GUI library, it's more like:
buttonBox.addWidget(Button("&New", my, "new"))
and your button
Rocco Moretti <[EMAIL PROTECTED]> writes:
> Except that (please correct me if I'm wrong) there is somewhat of a
> policy for not including interface code for third party programs which
> are not part of the operating system. (I.e. the modules in the
> standard libary should all be usable for anyon
[EMAIL PROTECTED] (Roy Smith) writes:
> There's a reprint this morning on slashdot of a 1984 review Byte did
> on the brand-new Macintosh (executive summary: cool machine, needs
> more memory). The first four software packages available for the new
> machine?
>
> MacWrite/MacPaint (they seem to c
Harry George <[EMAIL PROTECTED]> writes:
> b) Installing distutils-aware python packages is trivial. I'd rather
> the energy which might go into a bigger std library go instead into
> helping projects which don't have distutils-style builds.
How about integrating distutils and PyPI, so that dist
bruno modulix <[EMAIL PROTECTED]> writes:
>> Be aware that I'm
>> using pyhton 1.5,
> Err... latest is 2.4.1, and the language has really, really changed. You
> should consider upgrading...
>
>> unfortunately...
>
> BTW, in 1.5.x, you can use the String module instead of string class
> methods:
[EMAIL PROTECTED] writes:
> I posted a article earlier pertaining programming for my boss. Now I am
> gonna ask a question about programming for myself. I just finished my
> first C++ Class. Next semester is a class on encryption(and it's
> probably gonna be a math class too). And finally back in
Ivan Van Laningham <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> [EMAIL PROTECTED] writes:
>> As other have noted, C was never really used for everything. Unix
>> tools were designed to connect together from the very beginning, which
>> is what makes shell scr
Peter Hansen <[EMAIL PROTECTED]> writes:
> Ivan Shevanski wrote:
>> Alright well I'm quite a noob and when I run a simple command to
>> change the current directory, nothing happens. I made a little test
>> script to show it:
>> import os
>> cwd = os.getcwd()
>> print cwd
>> os.system('cd = C:\Pr
"Adriaan Renting" <[EMAIL PROTECTED]> writes:
> I think the choice of a programming language is not very important in
> determining the overal succes of a project. C++ and Python are however
> my two favorite languages.
Well, getting done on time is a crucial part of success, and it takes
less tim
Jan Danielsson <[EMAIL PROTECTED]> writes:
> Hello all,
> I'd like to ask seasoned Python developers:
> - Are you comfortable in upgrading to the latest version of Python, or
> are you worried about what you have to fix in your existing programs?
No, I'm not worried. The Python developers worry a
"iK" <[EMAIL PROTECTED]> writes:
> Seems like he wants python programmers to solve their problems all in the
> same way. While that is great for corporate slaves it is terrible for the
> creative programmer.
No, he wants Python to be Pythonic. TMTOWTDI is not Pythonic.
> Python is quickly beco
Peter Hansen <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> Yes. I once grabbed an old program that did assignments to None. But
>> that's always been a bad idea.
> What was the use case!?
Unpacking a tuple. Something like this:
(foo, bar, None) = gen_
Harry George <[EMAIL PROTECTED]> writes:
>> > - more available libraries and more advanced developement tools.
> If the library is in C, C++, or FORTRAN, Python can use it. Worst
> case you have to write your own bindings.
Are there really that many more libraries for C++? I'm not talking
about d
"Shai" <[EMAIL PROTECTED]> writes:
> Joseph Garvin wrote:
>>
>> I'm curious -- what is everyone's favorite trick from a non-python
>> language? And -- why isn't it in Python?
>
> 1. Lisp's "dynamically scoped" variables (Perl has them, and calls them
> "local", but as far as I've seen their use th
[Lots of quoted text left in...]
I started thinking about this, and realized that there was a way to do
what you wanted, with no execution time overhead, and without
providing ways to radically change the program behavior behind the
scenes.
Mike Meyer <[EMAIL PROTECTED]> writes:
> "
"Sean McIlroy" <[EMAIL PROTECTED]> writes:
> Peter Hansen wrote:
>
>> Sean, what gave you the impression this would change?
> if that's the case then list comprehensions and/or "first class
> functions" are likely to be the next target.
The existence of list comprehensions are the reason that th
Jamey Cribbs <[EMAIL PROTECTED]> writes:
> Code blocks allow you to wrap up any Ruby code and pass it to a method
> and have it executed within that method. It is more powerful than
> lambda, because you can have multiple statements in the code block and
> you can do assignment within the code blo
Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> writes:
> On Thu, 30 Jun 2005 20:55:20 -0400, rumours say that Mike Meyer
> <[EMAIL PROTECTED]> might have written:
>
>>Actually, I was thinking of pre-K&R Unix compilers.
>
> There must be something I
Terry Hancock <[EMAIL PROTECTED]> writes:
> This is true in the same sense that Python is unnecessary
> because all programs can be written in assembler. Or machine
> code for that matter. Entered by flipping switches, even -- throw
> away that keyboard.
>
> I have actually seen this done, BTW.
Christopher Subich <[EMAIL PROTECTED]> writes:
> That, and the file format definitely isn't robust to bit-rot that
> happened too often on FAT16/32 filesystems.
>From where I sit, the critical difference between the registry and a
set of .ini files (or Unix rc files) is that the registry requires
"jwaixs" <[EMAIL PROTECTED]> writes:
> If I should put the parsedwebsites in, for example, a tablehash it will
> be at least 5 times faster than just putting it in a file that needs to
> be stored on a slow harddrive. Memory is a lot faster than harddisk
> space. And if there would be a lot of peo
anthonyberet <[EMAIL PROTECTED]> writes:
> My question isn't as all-encompassing as the subject would suggest...
>
> I am almost a Python newbie, but I have discovered that I don't get
> along with IDLE, as i can't work out how to run and rerun a routine
> without undue messing about.
>
> What I w
Joseph Garvin <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>
>>You wind up
>>having to invoke the function through your data object, and then pass
>>the data object in - sort of as an explicit "self".
>>
> Yeah, and us pythonists hate expl
Roy Smith <[EMAIL PROTECTED]> writes:
> The "right" way to do this is:
>
> for line in file ("filename"):
>whatever
>
> The file object returned by file() acts as an iterator. Each time through
> the loop, another line is read and returned (I'm sure there is some
> block-level buffering goin
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> I don't object to adding sum and product to the language. I don't object
> to adding zip. I don't object to list comps. Functional, er, functions
> are a good thing. We should have more of them, not less.
Yes, but where should they go? Adding functions
"George Sakkis" <[EMAIL PROTECTED]> writes:
> "Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
>
>> But it doesn't make sense to say that two flags are equal:
>>
>> keep_processing = True
>> more_reading_needed = True
>> while more_reading_needed and keep_processing:
>> get_more_records()
>>
Jeffrey Maitland <[EMAIL PROTECTED]> writes:
> What I would like to do is have say 1 thread use as much of a given
> CPU as possible and if a new thread is started (added) that if a CPU
> is available use it instead of using the same cpu. That way it should
> speed the application up. The standalo
Sybren Stuvel <[EMAIL PROTECTED]> writes:
> Andrea Griffini enlightened us with:
>> - never ever use tabs
>
> I always use one tab for indents, and set my editor to display it as
> four spaces. I like being able to unindent a line by deleting a single
> character. I don't see a reason why _not_ to
Peter Hansen <[EMAIL PROTECTED]> writes:
> Tom Anderson wrote:
>> +1 insight of the century. This is the heart of the unix way - lots
>> of simple little programs that do exactly one thing well, and can be
>> composed through simple, clean interfaces. For actually getting
>> things done, a toolkit
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
>> Well, his Viaweb company was founded in about '95, right? So he probably just
>> used Lisp because Python wasn't as well known yet. ;-)
>
> David
>
> That is what I thought too. It makes sense but I wasn't sure. Still
> ain't.
> The problem is t
Ron Adam <[EMAIL PROTECTED]> writes:
> So doing this would give an error for functions that require an argument.
>
> def foo(x):
> return x
>
> a = None
> b = foo(a)# error because a dissapears before foo gets it.
So how do I pass None to a function?
> >>TypeErro
"Shai" <[EMAIL PROTECTED]> writes:
> They're called "Special vars", and you need to define them (unlike
> local LISP variables, which behave essentially like Python vars), but
> then you use them just like other vars (that is, you usually bind them
> with LET). This is the first I hear about them
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Thu, 07 Jul 2005 06:47:54 -0400, Chris Smith wrote:
>> Oh, come on: what's a Perliodic Table of Operators, between friends?
>> http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html
> That, and the discussion on operators by Larry Wall, are two
Benjamin Rutt <[EMAIL PROTECTED]> writes:
> what I am actually trying to do is to build a database of Python
> modules. so then later, I can write a tool in my favorite editor
> (Emacs) to invoke some forms of completion against this database
> (e.g. os.remov or socket. to see a list of all socket
Jorgen Grahn <[EMAIL PROTECTED]> writes:
> Hey, it's not fair to make fun of emacs now that I've mentioned vim
> favourably so many times ;-)
>
> Seriously, nothing about emacs seems big or slow today. It has been
> outbloated by pretty much everything else. Who could have imagined /that/
> ten yea
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'll clarify. A lot of the time I hear arguments against
> features that boils down to.
It seems that you've lost some of the intent during the boiling.
> 1) I don't need it.
Is that what you get out of the oft-used "
Rocco Moretti <[EMAIL PROTECTED]> writes:
> François Pinard wrote:
> If your program had only minor errors, there was likely a good chance
> that the compiler might guess correctly, and your program would
> compile to what you wanted in the first place. If not, by continuing
> on, the compiler can
"Ralf W. Grosse-Kunstleve" <[EMAIL PROTECTED]> writes:
> --- Bengt Richter <[EMAIL PROTECTED]> wrote:
>> No, that limitation wouldn't exist, so you wouldn't have to explain it ;-)
>> I.e., the above would act like
>>
>> class Foo:
>> x = Bar()
>> def method_1(self, _anonymous_arg_1):
>
Dark Cowherd <[EMAIL PROTECTED]> writes:
> But one advise that he gives which I think is of great value and is
> good practice is
> "Always catch any possible exception that might be thrown by a library
> I'm using on the same line as it is thrown and deal with it
> immediately."
Yuch. That sort
"Jive Dadson" <[EMAIL PROTECTED]> writes:
> I like to use Pythonwin as my desktop calculator. It's bothersome
> to have to type in "from __future__ import division" into the
> interactive window every time I open it. I've tried various ways to
> attempt to get it to import new division at startu
Andreas Kostyrka <[EMAIL PROTECTED]> writes:
> That doesn't change the contrary facts:
>
> -) the general threading programming model is very hard to get right.
> It's basically at the moment where we were with memory management at C
> level. Painful, and errorprone. Nothing to be happy about.
I'd
"Thomas Bartkus" <[EMAIL PROTECTED]> writes:
> Although I hear rumors about ODBC drivers on Linux, I confess I don't
> understand the need. Certainly you can use Python with the MySQLdb module
> from any Linux machine and query away at the server. As long as the MySQL
> server accepts your IP/usr/
rbt <[EMAIL PROTECTED]> writes:
> Many of the world's most profitable software companies (MS for example)
> have thousands of goto statements in their code... oh the horror of it
> all. Why aren't these enlightened-by-the-gods know-it-alls as profitable
> as these obviously ignorant companies?
Bec
"Thomas Bartkus" <[EMAIL PROTECTED]> writes:
>> > Re-train on a new platform,
>> > and re-write from scratch?
>
> What do you do when an open source project you were using gets abandoned?
cvs import -m "sources for orphaned project"
> Hard to see much difference here.
Doing support for objec
Thomas Bartkus <[EMAIL PROTECTED]> writes:
> On Mon, 18 Jul 2005 19:56:24 -0400, Mike Meyer wrote:
>
>> "Thomas Bartkus" <[EMAIL PROTECTED]> writes:
>>>> > Re-train on a new platform,
>>>> > and re-write from scratch?
>&g
Rocco Moretti <[EMAIL PROTECTED]> writes:
> Leif K-Brooks wrote:
>> rbt wrote:
>>
>>>IMO, most of the people who deride goto do so because they heard or read
>>> where someone else did.
>> 1 GOTO 17
>> 2 mean,GOTO 5
>> 3 couldGOTO 6
>> 4 with GOTO 7
>> 5 what G
Eric <[EMAIL PROTECTED]> writes:
> I'm using Linux - Manriva LE2005, python 2.3 (or i can also use python 2.4
> on my other system just as well).
> Anyways...
> I want to get a web page containing my stock grants.
> The initial page is an https and there is a form on it to
> fill in your username
"Simon Dahlbacka" <[EMAIL PROTECTED]> writes:
> Short answer: Not using HTTP.
>
> However, you can use something like AJAX to just load new data from
> time to time and not the entire page.
AJAX is overkill for this. If you just want to automatically refresh
the page automatically, you can use a
Jorgen Grahn <[EMAIL PROTECTED]> writes:
> Agree. In the case of user input validation, it might be ok to politely
> inform the user that the address looks a bit funny, but refusing to work
> with it will anger a user sooner or later.
Yup. I use cryptographically signed addresses as one-time addre
Pranav Bagora <[EMAIL PROTECTED]> writes:
> Hello,
>
> I am getting a permission Denied error when i am
> trying to make changes in some read only files in a
> directory. How do we check and change the read only
> attributes of files in python.
You want the os.stat and os.chmod functions.
Peter Hansen <[EMAIL PROTECTED]> writes:
> Sybren Stuvel wrote:
>> Mike Meyer enlightened us with:
>>
>>>>I dislike gotos because it is too easy to inadvertently create
>>>>infinite loops. <10 WINK; 20 GOTO 10>
>>>
>>>And it
Mathias Waack <[EMAIL PROTECTED]> writes:
> Hi,
>
> I need to access some information from a web site which are only accessible
> through a form. Thus for each bucket of data you have to fill out the form,
> submit it and wait for an answer. Very easy - if you don't have to check
> some hundred t
Rocco Moretti <[EMAIL PROTECTED]> writes:
>> My "favorite" infinte loop with while is:
>>i = 0
>>while i < 20:
>> do_process(i)
>> Note the prominent *lack* of any change to i here?
>> Oh, for:
>> from i = 0
>> invariant 0 <= i <= 20
>> variant 21 - i
>> until i >
[EMAIL PROTECTED] (phil hunt) writes:
> On Thu, 21 Jul 2005 02:44:03 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote:
>>While bitmap font files are not copyrightable, there are license issues
>>with most of the "nicer" fonts you are probably talking about.
>
> Oh? I can understand them being copyrig
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
[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
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.
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
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
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
"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
"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
"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:/
"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
[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
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
"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
"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
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
501 - 600 of 1299 matches
Mail list logo