Re: Diacretical incensitive search

2013-05-20 Thread Jorgen Grahn
elled "far" and still be understood. This is IMHO out of the scope of re, and perhaps case-insensitivity should have been too. Perhaps it /would/ have been, if regular expressions hadn't come from the ASCII world where these things are easy. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: Diagnosing socket "Connection reset by peer"

2013-05-22 Thread Jorgen Grahn
t medium like Usenet. > (Note - unfiltered pcap files can be very large > on a busy network, but if you can quiet other traffic, you may not need > to filter at all.) Or simply filter. It's not hard -- the capture filter "host my-printer-hostname-or-address" is enough. /Jorg

Re: Diagnosing socket "Connection reset by peer"

2013-05-22 Thread Jorgen Grahn
ter as a "blackbox" then there really isn't anything you > can do here except catch the exception and attempt to reconnect. Yes. Note that there *may* be some uncertainty re: "did the printer process the last request before the reset or not?" E.g. I wouldn't endlessly retry printing a 100-page document in that case. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-19 Thread Jorgen Grahn
trivial though, so try to do without such things at first. It's not obvious that you should need an account for an experimental chat, anyway. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: simple client data base

2012-09-08 Thread Jorgen Grahn
al circumstances) but it might equally well have ended with resentment. "Why did he sell this crap idea to me? Now I'm stuck with it." /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: Experimental Python-based shell

2012-10-03 Thread Jorgen Grahn
erms of > usability and searching above pinpointing files in heirarchies. > > I invite you to try it. Hard to do without a manual page, or any documentation at all except for a tiny "hello world"-style example ... /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: Preventing crap email from google?

2012-10-20 Thread Jorgen Grahn
istory of creating broken Usenet postings in new and exciting ways. It's at least as bad as MS Outlook Express and AOL were in Usenet's past. Your own posting (or mail) is almost flawless: correct quoting, and a properly formatted response. But you seem to be using gmail and the mailing list

Re: Imaging libraries in active development?

2012-11-28 Thread Jorgen Grahn
x times faster, because it uses libjpeg-turbo. Only some Linux > distributions have replaced libjpeg with the turbo implementation. That seems like an argument for *not* having support for many file formats in the imaging library itself -- just pipeline into the best standalone utilities available.

Re: please help me to debud my local chat network program

2012-11-28 Thread Jorgen Grahn
Or a Git repository at github.com or similar. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: Fast file data retrieval?

2012-03-13 Thread Jorgen Grahn
uld take ~3MB of memory. The time to move this from disk to a Python list of 9-tuples of strings would be almost only disk I/O. I think he should try to do it the dumb way first: read everything into memory once. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: strptime format string nasty default

2012-05-09 Thread Jorgen Grahn
this one looks quite odd and isn't very human-readable. If you have to use this format, I strongly recommend parsing it "manually" as text first. Then you can create an ISO date and feed that to strptime, or perhaps use your parsed (day, month, year) tuple directly. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: ImSim: Image Similarity

2011-03-05 Thread Jorgen Grahn
kes care of JPEG quality, scaling and possibly gamma correction, but not cropping or rotation. I'm sure there are better, well-known algorithms. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: Purely historic question: VT200 text graphic programming

2011-03-11 Thread Jorgen Grahn
ant those (vt200) had some exotic graphics mode. The VT-xxx series was pretty heterogenous, although most of us think of them as more or less fancy VT-100s. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE/text-editor

2011-04-16 Thread Jorgen Grahn
.. > emacs having the opposite problem, missing tabs (also, > selecting text with my mouse is something I do often). Does it *have* to be tabs? Why? Both Emacs and Vim can have multiple files open, and have various powerful ways to navigate between them. If you cannot stand non-tabbed

Re: Python IDE/text-editor

2011-04-17 Thread Jorgen Grahn
whatever at the gyms to help you use the equipment there safely and efficiently, there should be text editor instructors!) /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-02 Thread Jorgen Grahn
on. It's not part of the definition of C either -- C supports segmented memory (pre-386 Intel) and separate code/data address spaces. (Even if most C users tend not to think of it that way.) /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: Compile 32bit C-lib on 64 bit

2011-05-02 Thread Jorgen Grahn
to, and the suppliers cannot even be bothered to compile it for the CPU architecture that has been standard for at least 6--7 years, start planning to replace it *now*. /Jorgen -- // Jorgen GrahnO o . -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Python replace TCL/Expect

2005-10-06 Thread Jorgen Grahn
27;s limitations several times in several places. ... which puts me in a weird position ;-) I /loathe/ the Tcl language, but I have to admit that its expect functionality is far superior to Python's. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending Python

2005-10-06 Thread Jorgen Grahn
o libpcap. http://snipabacken.dyndns.org/~grahn/tmp/pcap2/ /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Python replace TCL/Expect

2005-10-07 Thread Jorgen Grahn
On Thu, 06 Oct 2005 17:08:03 GMT, Cameron Laird <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Jorgen Grahn <[EMAIL PROTECTED]> wrote: > . > . > . >>It depends. I do not feel /

Re: Python's garbage collection was Re: Python reliability

2005-10-12 Thread Jorgen Grahn
't use the old SmallTalk 80 SmallInteger hack, or similar? If the SmallInteger hack is something like this, it does: >>> a = 42 >>> b = 42 >>> a is b True >>> a = 42000 >>> b = 42000 >>> a is b False >>> ... which I guess is

Re: C Extension - return an array of longs or pointer?

2005-10-12 Thread Jorgen Grahn
7;s just random octet data garbage. Depends on what that data really represents, but it's a common idiom, and modules like struct and array expect their data to be strings. Note that Python strings may contain NUL bytes. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http:

Re: Converting C++ array into Python

2005-10-12 Thread Jorgen Grahn
I assume it's 'Foo thearray[]', in which case you usually would return it as a Python list of whatever Python data structure you encode a Foo into -- might be a tuple, or an integer, or a full-blown class of some kind, or ... /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Let My Terminal Go

2005-10-13 Thread Jorgen Grahn
k of a scenario where it /would/ be unacceptable ;-) But back to the original problem: I can't really see why anybody would need the "let my terminal go" feature. Is there a reason why 'gvim foo.txt&' isn't good enough? /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Let My Terminal Go

2005-10-15 Thread Jorgen Grahn
On 13 Oct 2005 09:54:44 -0700, Paul Rubin wrote: > Jorgen Grahn <[EMAIL PROTECTED]> writes: >> It depends on what you mean by expensive -- web servers can fork for each >> HTTP request they get, in real-world scenarios, and get away with it. > > This is OS dependent.

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-15 Thread Jorgen Grahn
mething vital only worked with CygWin-compiled commands. Google probably knows more. I wouldn't be surprised if this has improved since then, or if someone else has come up with a serious Win32 terminal. There is surely a need for one! /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling an exe from Python?

2005-10-17 Thread Jorgen Grahn
specific, though. But yes, it's that one, or os.system, or one of the os.popen*, or one of the os.spawn*, or module subprocess mentioned elsewhere in the thread. -- Depending on exactly what you want to do. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils - distributing non-python data files

2005-10-26 Thread Jorgen Grahn
ules. I think you forgot to explain why you cannot simply use distutil's data_files parameter. Do you have trouble finding the file at runtime? http://docs.python.org/dist/node12.html /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Set an environment variable

2005-10-26 Thread Jorgen Grahn
isn't. > > This specific issue is identical in Windows, isn't it? I do not know > any OS which does have the concept of "environment variable" yet lets > such variables be ``exported'' to anything but a child process. AmigaDOS, if I recall correctly. Its

Re: Set an environment variable

2005-10-27 Thread Jorgen Grahn
On Wed, 26 Oct 2005 16:04:58 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: > Jorgen Grahn <[EMAIL PROTECTED]> writes: >> On Wed, 26 Oct 2005 07:42:19 -0700, Alex Martelli <[EMAIL PROTECTED]> wrote: >>> Grant Edwards <[EMAIL PROTECTED]> wrote: >>

Re: Automatically creating a HOME environ variable on Windows?

2005-10-30 Thread Jorgen Grahn
for USERPROFILE? > > Best solution would be to have portable function that returns > user home directory and knows about all platfom quirks. Why is that better than Python creating a HOME in os.environ, if it doesn't already exist? I can think of a few reasons it's better, a

Re: Automatically creating a HOME environ variable on Windows?

2005-10-31 Thread Jorgen Grahn
On Mon, 31 Oct 2005 12:26:30 +0100, Maciej Dziardziel <[EMAIL PROTECTED]> wrote: > Jorgen Grahn wrote: > >>> Best solution would be to have portable function that returns >>> user home directory and knows about all platfom quirks. >> >> Why is that better

Re: Expanding Python as a macro language

2005-10-31 Thread Jorgen Grahn
people would disagree with that. For example, from my perspective, almost all relevant applications /lack/ a GUI. (And some that has one would be better off without it.) /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Text Auto-fill

2005-11-08 Thread Jorgen Grahn
a Visual Basic-type environment for > myself. I'm a moron, and I need all the coding help I can get. I suspected as much ;-) /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: how to present Python's OO feature in design?

2005-11-08 Thread Jorgen Grahn
nd weeks drawing pointless, infinitely detailed class diagrams, anyway. There are less detailed levels of those diagrams, and there are other diagram types. Most people would find some of them as useful (or useless) with Python as with other languages. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Flat file, Python accessible database?

2005-11-09 Thread Jorgen Grahn
he standard module bsddb, then? It's not a /relational/ database though, if that is what you're looking for. But it's simple to understand, well documented, and unbelievably fast. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: where to download md5.py?

2005-11-09 Thread Jorgen Grahn
be really, really stupid -- the md5 algorithm, is useful even if it's not cryptographically secure. (I understand that you don't /advocate/ ripping out module md5, of course). /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: triangulation

2005-11-09 Thread Jorgen Grahn
Find a (x, y) coordinate of a point, based on a sequence of (x, y, d) - neighbor coordinates and their individual distances from the desired point. It's completely unsupported, and probably sucks badly. But it works for my purposes, and there are unit tests. /Jorgen -- // Jor

Re: Python, Linux, Desktop Environment

2005-11-16 Thread Jorgen Grahn
I almost always start GUI programs. If I like them enough, I edit my window manager's config so that it appears in a suitable place in the menus. Nine applications have made that list during the past fifteen years ;-) /Jorgen -- // Jorgen Grahn R'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Which License Should I Use?

2005-11-26 Thread Jorgen Grahn
balanced I think. Personally, I use the GPL or the Modified BSD license, depending on the phase of the moon. And I do take software with me to work, but never in the reverse direction. /Jorgen -- // Jorgen Grahn R'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Which License Should I Use?

2005-11-26 Thread Jorgen Grahn
en source. ... which implies that one believes that every end-user has the potential to become a hacker. That, I think, is at the core of the GPL, and RMS's rantings are easier to understand if you keep that in mind. But yes, let's not dive too deeply into all that here. > Oops! ;-) /

Re: icmp - should this go in itertools?

2005-11-26 Thread Jorgen Grahn
if this is part of itertools or some other module, "itertools.cmp" would be a more logical name. (On the third hand, as someone else said, I don't see the use case for this.) /Jorgen -- // Jorgen Grahn R'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-05 Thread Jorgen Grahn
ation; I don't see that as an important part of the choice. /Jorgen -- // Jorgen Grahn R'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Locale confusion

2005-01-07 Thread Jorgen Grahn
intf("%s\n", setlocale(LC_CTYPE, 0)); printf("%s\n", setlocale(LC_CTYPE, "")); printf("%s\n", setlocale(LC_CTYPE, 0)); return 0; } frailea> ./foot C sv_SE sv_SE So, is this my fault or Python's? I realize I could just adapt and set $LC_CTYPE explicitly in my environment, but I don't want to capitulate for a Python bug, if that's what this is. BR, Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-09 Thread Jorgen Grahn
by environmental > pollutants emanating from Redmond. Yeah, and possibly by overuse of IPC mechanisms, gratituous threading et cetera ... Concurrency is hard and complex. I'd prefer to see it as rarely as possible. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Locale confusion

2005-01-12 Thread Jorgen Grahn
On 11 Jan 2005 05:49:32 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Jorgen Grahn wrote: > [snip] > >> >> frailea> cat foo >> import locale >> print locale.getlocale() >> locale.setlocale(locale.LC_CTYPE) >> print locale.getlocale()

Re: pulling info from website

2005-01-12 Thread Jorgen Grahn
?? > > Google for "Python RSS reader" and read some of the results. And for the general (and fundamentally broken) approach, google for "web scraping". /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: encryption/decryption help

2005-01-12 Thread Jorgen Grahn
this may or may not be a viable option. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: how to ncurses on win32 platform

2005-01-24 Thread Jorgen Grahn
o > work on my XP box, YMMV... Or, as Alex Martelli wrote in "Python in a nutshell": "The curses package works only on Unix-like platforms (there are persis- tent rumors of Windows ports of it, but I've never found a working one)." /Jorgen -- // Jorgen Grahn

Re: Browsing text ; Python the right tool?

2005-02-01 Thread Jorgen Grahn
tween A0 and C1 records important?) /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's idiom for function overloads

2005-02-01 Thread Jorgen Grahn
type() function? Have a look at this older thread on this subject: Subject: Re: Does python support multi prototype. Message-ID: <[EMAIL PROTECTED]> /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread Jorgen Grahn
r threads here would be a cool and useful, and "hard CS", project, but I suspect it's too big a task. And it has been done for SML and other languages so I don't know if it's strictly "novel". /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-05 Thread Jorgen Grahn
it now and then. It's just that it has even larger /benefits/ which aren't obvious at first. In BASIC, /bin/sh and perl without 'use strict', the lack of declarations is only a negative thing without benefits. If you know those languages, it's easy to jump to t

Re: how to send an int over a socket

2005-02-05 Thread Jorgen Grahn
rywhere, for all languages. Don't know anything about xmlrpc, except that it is magnitudes more complex and powerful. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I enter/receive webpage information?

2005-02-05 Thread Jorgen Grahn
t.login('me', 'secret) a, b = theAsAndBs(client, 'tomorrow', 'Wiltshire') foo = theFoo(client, 'yesterday') I had to look deeply into the HTTP RFCs to do this, and also snoop the traffic for a "real" session to see what went on between server and client. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble converting hex to decimal?

2005-02-05 Thread Jorgen Grahn
) self.dest = Address(dest) That doesn't take IP options into account (or are they part of Ip.len? I forget.), but it has the nifty feature that IP.proto tells the caller what factory function (if any) she should feed the rest of the frame into. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Using print with format to stdout generates unwanted space

2005-06-21 Thread Jorgen Grahn
But this does, of course, print an actual backspace character. If you feed this output to another program, chances are it will not treat as no space at all. I prefer building up a list and doing ' '.join(thelist) in these situations. /Jorgen -- // Jorgen GrahnR'lyeh wgah&

Re: Back to the future - python to C++ advice wanted

2005-06-21 Thread Jorgen Grahn
usability, and so on. But yes, programming in C++ is usually more tedious and frustrating -- and less fun. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: unittest: collecting tests from many modules?

2005-07-04 Thread Jorgen Grahn
On 12 Jun 2005 10:14:50 GMT, Jorgen Grahn <[EMAIL PROTECTED]> wrote: [regarding module unittest] > What's the best way of creating a test.py which > - aggregates the tests from all the test_*.py modules? > - doesn't require me to enumerate all the test classes in test.py

Re: noob question

2005-07-04 Thread Jorgen Grahn
InverseDict module lowercase_with_underscores unit_test - Note that calling 'IsPaired' and '_is_updated' a noun is clearly wrong. There are probably other problems w

Re: f*cking re module

2005-07-06 Thread Jorgen Grahn
not even be sure which one you're working with. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you program in Python?

2005-07-06 Thread Jorgen Grahn
tween these two (interactive tinkering and unittest-based code) I feel little need for IDEs or 'environments for experimentation'. Others will feel differently, of course. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you program in Python?

2005-07-07 Thread Jorgen Grahn
in HTML, troff or LaTeX, for that matter). Emacs and vim are almost always installed, or trivially installable. All I need to remember is to bring my emacs config file. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: latex/bibtex python paper?

2005-07-07 Thread Jorgen Grahn
u want is tricky (and you didn't even say what you wanted the citations to look like). There seem to be many newer, contributed styles which aren't trivial to find without help. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you program in Python?

2005-07-07 Thread Jorgen Grahn
On Thu, 07 Jul 2005 18:10:44 +1000, Gregory Bond <[EMAIL PROTECTED]> wrote: > Jorgen Grahn wrote: > >> Emacs and vim are almost always installed, or trivially installable. All I >> need to remember is to bring my emacs config file. > > And, fortunately, USB pen drives

Re: mail sending using telnet in python

2005-07-08 Thread Jorgen Grahn
eally only intended to talk to a telnet server. . If the 'netcat' utility was more widespread, everyone would have used it instead. When you use Python, it doesn't make sense to go through telnetlib. Use module socket instead. Or, simply use module smtplib, which also comes with e

Re: Legacy data parsing

2005-07-08 Thread Jorgen Grahn
o clean it with a utility like the standard unix 'col' command -> ... and/or write custom code to do it. Python is a good choice. In general, this is an area where it's wise to use existing software. The hard part is to know what's available! /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: passing arguments to a function - do I need type ?

2005-07-10 Thread Jorgen Grahn
no if that's the correct formula for n-dimensional distance. I have forgotten way too much math in the past ten years.) /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Should I use "if" or "try" (as a matter of speed)?

2005-07-10 Thread Jorgen Grahn
ew on exceptions slightly ... exotic. He has a point though: exceptions suck. But so do error codes. Error handling is difficult and deadly boring. (Then there's the debate about using exceptions for handling things that aren't really errors, and what the term 'error' real

Re: email format in python

2005-07-19 Thread Jorgen Grahn
itely inform the user that the address looks a bit funny, but refusing to work with it will anger a user sooner or later. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: secure uploading

2005-07-19 Thread Jorgen Grahn
is a wealth of protocols and tools for secure file transfer: scp, sftp, tar-over-ssh, cpio-over-ssh, rsync-over-ssh, ... With some loss of security, you may even be able to avoid handling passwords. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading network interface data in linux

2005-07-23 Thread Jorgen Grahn
would actually be the most stable solution. The ethtool authors are kernel developers, and probably know all that stuff. Or convince the ethtool authors to release future ethtool versions as a Python module with an optional command-line interface ;-) /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs skeletons

2005-08-04 Thread Jorgen Grahn
ture. It saves a lot of time, typos and wrist pain. So, it's not surprising that both vim and emacs has it. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: python ETL

2005-08-04 Thread Jorgen Grahn
n and rebuild whatever workflow/methodology/process stuff they have right now. /Jorgen [1] Unless "ETL" and "data mart" carry some deep meaning which I've missed, that is. -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to C++ translation?

2005-08-07 Thread Jorgen Grahn
7;d be better off starting from scratch. (Or maybe not really from scratch; having done a working version of the program once and maybe having working tests is worth a lot.) /Jorgen [1] You might find C++ templates useful, though. -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Sample code to build rfc822 mail message building

2005-08-07 Thread Jorgen Grahn
f you feed your code to the 'pydoc' utility, the output should be readable. Somewhere you also might need to describe what subset of RFC 2822 and MIME you implement, or what your "mail metaphor" is. Different people think differently about mails. I, for example, don'

Re: Creating a virtual file system

2005-08-07 Thread Jorgen Grahn
FS. Those describe two different physical layouts of bits on a disk, and there's a driver for each that expose them to the kernel as a set of read/write/list directory calls. Your file system driver will have to expose the same calls, but implement them in a completely different way that has nothing

Re: stdin -> stdout

2005-08-20 Thread Jorgen Grahn
ven on the command-line: while(<>) { print; } or even: #!/usr/bin/perl -p ; Of course, not every programming language needs to have easy-to-use filtering capabilities at the core. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: As Simple As Possible?

2005-08-20 Thread Jorgen Grahn
details of Smalltalk. But I agree. If the earlier generations of programming languages (Smalltalk, Eiffel, Oberon, SML, ...) had had more "open-minded" implementations, I think they could have won the battle as early as fifteen years ago. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: up to date books?

2005-08-20 Thread Jorgen Grahn
e to me. I wouldn't buy a book that didn't discuss 'yield' or list comprehensions. > Probably not. Most recent changes to Python, such as decorators, are > things that beginners might want to leave until later... New standard > modules, such as datetime, are covered in

Re: up to date books?

2005-08-20 Thread Jorgen Grahn
manufacturer or environment. That may not matter short-term, but in the long run, it may be crucial for the program -- and for the programmer. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Some questions

2005-08-20 Thread Jorgen Grahn
e other format would have to be involved anyway. My version of Gnuplot includes support for PNG, jpeg, encapsulated PostScript and SVG among other things[1]. PNG is probably the best overall choice. For bonus points, one could generate the format the browser says it prefers ... /Jorgen [1] "set

Re: >time.strftime %T missing in 2.3

2005-08-21 Thread Jorgen Grahn
ot; or "license" for more information. >> >>> import time >> >>> time.strftime("%T") >> '22:50:49' >> >>> time.strftime("%X") >> '22:50:59' >> > > I accept that, but still pain.

Re: __del__ pattern?

2005-08-21 Thread Jorgen Grahn
ave to read up on the C socket calls to learn more. > > Or some helpful soul will clarify for the class... :-) INADDR_ANY means "every network interface you can find". This includes the local loopback and all physical and logical network interfaces. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary Trees in Python

2005-08-21 Thread Jorgen Grahn
ap are by far the most commonly used. Neither C++ nor Python has tree structures in their standard libraries. I assume that's because there is no single interface that is proven to suit everybody's needs. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to identify which interface a broadcast packet comes in on?

2005-09-03 Thread Jorgen Grahn
n do in C. Your code may become Linux-specific if you're not careful, though. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Find day of week from month and year

2005-09-03 Thread Jorgen Grahn
be add a bunch of unit tests to /demonstrate/ that it seems to work. The next programmer can then choose to either (a) understand the code or (b) rip it out and replace it. I would leave the body alone, but rename the function 'third_friday_of_month', and do 'expiration = third_frid

Re: Extend Python

2005-09-03 Thread Jorgen Grahn
as arguments, have odd resource management, etc. A tool cannot help you with that anyway. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary Trees in Python

2005-09-04 Thread Jorgen Grahn
On Sun, 21 Aug 2005 08:52:10 -0400, François Pinard <[EMAIL PROTECTED]> wrote: > [Jorgen Grahn] > >> Neither C++ nor Python has tree structures in their standard >> libraries. I assume that's because there is no single interface that >> is proven to suit everyb

Re: Python compiled?

2005-09-06 Thread Jorgen Grahn
] Might be hard to convince people who have ever installed a Java interpreter -- when I do that on Windows, I usually break at least one existing Java application, and I usually get a whole lot of useless desktop icons, a funny thing in the system tray, etc. -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: dual processor

2005-09-06 Thread Jorgen Grahn
MP (like image processing). But most tasks don't, and most of those that do can be handled on the process level. For example, if I'm compiling a big C project, I can say 'make -j3' and get three concurrent compilations. The Unix shell pipeline is another example. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: dual processor

2005-09-06 Thread Jorgen Grahn
up fast. But it's interesting that the Unix pipeline Just Works (TM) with so little effort. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: execute commands independantly

2005-09-06 Thread Jorgen Grahn
nly, though -- at least in 2.3 where I live. The os.spawn* family of calls are more portable, but I'm not sure it's a good idea to just spawn-and-forget a process. /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python compiled?

2005-09-08 Thread Jorgen Grahn
On Tue, 06 Sep 2005 17:29:46 -, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-09-06, Jorgen Grahn <[EMAIL PROTECTED]> wrote: > >> I also believe it's better to convince the end user to install Python before >> installing the application[1], rather tha

Re: Python compiled?

2005-09-08 Thread Jorgen Grahn
On Wed, 7 Sep 2005 08:40:28 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: > On Tuesday 06 September 2005 11:32 am, Jorgen Grahn wrote: >> I hope people are less hesitant to install "interpreted" applications today >> than they were ten years ago. >> >>

Re: dual processor

2005-09-08 Thread Jorgen Grahn
On 06 Sep 2005 14:08:03 -0700, Paul Rubin wrote: > Jorgen Grahn <[EMAIL PROTECTED]> writes: >> I feel the recent SMP hype (in general, and in Python) is a red herring. Why >> do I need that extra performance? What application would use it? > > How many mhz does the comp

Re: sys.stdout

2005-09-09 Thread Jorgen Grahn
page) It's hard to say what's right and wrong really, and whose fault it is. I'm pretty sure it's not Python. What happens if you try bash? tuva:~> bash [EMAIL PROTECTED]:~$ echo -n 'foo' [EMAIL PROTECTED]:~$ /Jorgen -- // Jorgen GrahnR'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils question

2005-09-09 Thread Jorgen Grahn
(if they didn't already exist and were newer than the source) and then let normal C compilation take place, /Jorgen [1] For bizarre reasons, I had to import three identical *.pyd modules into one Python program under different names, so the *pyd files and their init methods had

Re: Rendering HTML

2005-09-17 Thread Jorgen Grahn
point. This > will come in handy down the road I am sure. If it's popen()ing tput that worries you, you can probably replace bold, underline and reset with the corresponding ANSI escape sequences. Or the empty string! Assuming you will print to a cmd.exe window, that is. /Jorgen --

Re: Python:C++ interfacing. Tool selection recommendations

2005-09-17 Thread Jorgen Grahn
horoughly fed up with people who keep writing 1980s-style C++ ... (I wonder, by the way, if it's a good idea to provide a very rich interface between an application and embedded Python. I have no experience in the area, but intuition tells me that simplicity and minimalism is important. Ho

  1   2   3   4   >