On 'y', Python has no way of recording where '_a' and '_b' were set, so
you can't tell whether it comes from class 'a' or 'b'.
You can find the attributes that are defined on 'b' only, though, by
using 'b.__dict__.keys()', or 'y.__class__.__dict__.__keys__()'. This
gives
['__module__', 'who1'
On Sun, Jul 31, 2005 at 01:30:43PM +0100, glen wrote:
> Could someone explain what "cooked data" is.
The telnet protocol contains special sequences which are interpreted by
the telnet client or server program. These are discussed in the telnet
RFC, which is RFC854 according to the telnetlib docst
On Fri, Jul 29, 2005 at 10:14:12PM -0700, Tim Roberts wrote:
> C++ solves this exact problem quite reasonably by having a greedy
> tokenizer. Thus, that would always be a left shift operator. To make it
> less than and a function, insert a space:
> <
Incidentally, I read in an article by Bj
With a judicious bit of UTSL, that count seems to be the total number of
octets in the reply. This information comes from any user of
_getlongresp(), which actually returns a tuple (resp, list, octets).
These methods would be:
list
retr
top
uidl
I'd consider it a doc bug too. If
On Thu, Jul 28, 2005 at 08:42:57AM -0700, nicolas_riesch wrote:
> And a last question: can I call this "enc" function from multiple
> threads ?
Yes.
Jeff
pgphSka1eU9PQ.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
#
import re, sys
def q(c):
"""Returns a regular expression that matches a region delimited by c,
inside which c may be escaped with a backslash"""
return r"%s(\\.|[^%s])*%s" % (c, c, c)
single_quoted_string = q('
You should just use 'pack' properly. Namely, the fill= and expand=
parameters. In this case, you want to pack(fill=BOTH, expand=YES).
For the button, you may want to use pack(anchor=E) or anchor=W to make
it stick to one side of the window.
The additional parameters for the button (both creation
Rather than doing anything with passwords, you should instead use public
key authentication. This involves creating a keypair with ssh_keygen,
putting the private key on the machine opening the ssh connection
(~/.ssh/id_rsa), then listing the public key in the remote system's
~/.ssh/authorized_key
In main.py, execfile("gen.py")
or
In gen.py, have something like
from __main__ import env_params
or
In main.py, have something like
import __builtins__; __builtins__.env_params = env_params
or
call a function in the gen.py with env_params as a parameter
import gen
gen.do(env_p
If you are using Unix, and all you have is the file object, you can use
os.fchmod(outfile.fileno(), 0700)
Jeff
pgp8U05e26RUt.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
in fact, see this thread, it may have something useful for you:
http://mail.python.org/pipermail/python-win32/2003-April/000959.html
Jeff
pgprYPOH3yOyI.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
import os
os.system(r"net use z: \\computer\folder")
Something in the win32net module of win32all may be relevant if you
don't want to do it through os.system:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/pywin32/win32net__NetUseAdd_meth.html
Jeff
pgp7mEoPdAfNP.pgp
Description: P
What makes you believe that the two machines' clocks are perfectly
synchronized? If they're not, it easily explains the result.
I wrote a simple client/server program similar to what you described.
Running on two RedHat 9 machines on a local network, I generally
observed a time delta of 2ms (comp
On Wed, Jul 20, 2005 at 03:10:49PM -0700, [EMAIL PROTECTED] wrote:
> Hey,
>
> Has anyone ever had commands.getstatusoutput's buffer fill up when
> executing a verbose command? [...]
How much output are you talking about? I tried outputs as large as
about 260 megabytes without any problem. (RedHa
On Mon, Jul 18, 2005 at 10:55:42AM -0600, Ivan Van Laningham wrote:
> How are you going to determine the orientation of an image without
> sophisticated image analysis? There is research on automatic image
> orientation detection.
[...]
> If you write it I'll use it;-)
There's research going on in
>>> i = Image.open("blue.jpg")
>>> i.size
(3008, 2000)
>>> i.mode
'RGB'
'RGB' is the value for color jpeg images. I believe that for black&white
images, i.mode is 'L' (luminosity).
If you want to determine whether an existing image is landscape or portrait,
then just compare i.size[0] (width) an
I honestly don't know why anyone would spend money for a development
environment, no matter how fancy. I don't know why anyone would develop
software in a language that doesn't have at least one open
implementation.
It's a great way to get screwed when Borland goes under or decides
they only want
I don't exactly know what is going on, but '\x96' is the encoding for
u'\N{en dash}' (a character that looks like the ASCII dash,
u'\N{hyphen-minus}', u'\x45') in the following windows code pages:
cp1250 cp1251 cp1252 cp1253 cp1254
cp1255 cp1256 cp1257 cp1258 cp874
Windows is clearly doing
It seems to simply be common wisdom. e.g.,
http://mail.python.org/pipermail/python-win32/2004-September/002332.html
http://mail.mems-exchange.org/pipermail/quixote-users/2004-March/002743.html
http://twistedmatrix.com/pipermail/twisted-python/2001-December/000644.html
etc
If you can find chapter
On Sun, Jul 17, 2005 at 06:43:00PM -0700, chuck wrote:
> I have found that sys.stdin.fileno() and sys.stdout.fileno() always
> return -1 when executed from within a win32 service written using the
> win32 extensions for Python.
>
> Anyone have experience with this or know why?
because there *is*
In your ssh configuration, specify something like
PreferredAuthentication "hostbased,publickey"
this will skip trying to use the methods called keyboard-interactive and
password.
You can give this flag on the ssh commandline, too. read the ssh(1) and
ssh_config(5) manpages for more informatio
Back in the day there was 'grail', which was a browser in its own right.
There may also have been a plug-in for other browsers, but I don't know
any real details about them.
Python itself has deprecated the 'restricted execution' environment it
had in previous versions, because ways to break out o
Your code is needlessly complicated.
Instead of this business
while 1:
try:
i = fetch.next()
except stopIteration:
break
simply write:
for i in fetch:
(if there's an explicit 'fetch = iter(somethingelse)' in code you did
not show, then get rid of tha
Here's a simple module for doing progress reporting. On systems without
curses, it simply uses "\r" to return the cursor to the first column.
On systems with curses, it also clears to the end of the line. This
means that when the progress message gets shorter, there aren't droppings
left from the
You provided far too little information for us to be able to help.
If you are using smtplib, it doesn't even look at message's headers to
find the recipient list; you must use the rcpt() method to specify each
one. If you are using the sendmail method, the "to_addrs" list has no
relationship to t
python-xlib includes an implementation of the xtest extension, which is
enabled on most users' X servers, and can be used to send arbitrary
keyboard or mouse events.
jeff
pgpo7pqhBafPe.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Pierre wrote:
> Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
^^^
Here's the bug. You're using Windows. It's a filesystem, but not as we know
it...
Anyway, You are getting exactly what the
On Tue, Jul 05, 2005 at 09:49:33PM +0100, Tom Anderson wrote:
> Are there any uses for NaN that aren't met by exceptions?
Sure. If you can naturally calculate two things at once, but one might
turn out to be a NaN under current rules.
x, y = calculate_two_things()
if isnan(x):
pe
probably by using REST. This stupid program puts a 200 line file by
sending 100 lines, then using REST to set a resume position and sending
the next 100 lines.
import getpass, StringIO, ftplib
lines = ["Line %d\n" % i for i in range(200)]
part1 = "".join(lines[:100])
part2 = "".join(lines[:100])
I think you need to write
root.tk.eval('load', '...\\libtcldot.so.0')
When you write
root.tk.eval("x y z")
it's like doing this at the wish/tclsh prompt:
# {x y z}
Not like this:
# x y z
Now, how useful it is to have a command called "x y z", I can't
guess... but tcl would let you
This stupid code works for modules, but not for packages. It probably has bugs.
import marshal, types
class StringImporter:
def __init__(self, old_import, modules):
self._import = old_import
self._modules = modules
def __call__(self, name, *args):
module = self.
I don't know of a portable way for an inetd-style daemon to "listen" for
user logins.
On some systems (including RedHat/Fedora and debian), you may be able to
use PAM to do this. (pam modules don't just perform authentication,
they can take other actions. As an example, pam_lastlog "prints the
l
This has been discussed before. One thread I found was
http://mail.python.org/pipermail/python-list/2003-June/170526.html
The advice in that message might work for you.
Jeff
pgpPSqdIxsPgx.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
It looks like you want tuple(d.iteritems())
>>> d = {1: 'one', 2: 'two', 3: 'three'}
>>> tuple(d.iteritems())
((1, 'one'), (2, 'two'), (3, 'three'))
You could also use tuple(d.items()). The result is essentially the
same. Only if the dictionary is extremely large does the difference
matter. (or
On Mon, Jun 27, 2005 at 08:21:41AM -0600, John Roth wrote:
> Unfortunately, I've seen that behavior a number of times:
> no output is None, one output is the object, more than one
> is a list of objects. That forces you to have checks for None
> and list types all over the place.
maybe you can at
Tkinter.Frame instances are not created with "geometry" or "title"
attributes. Whatever 'classtitle' and 'classtitle2' are, they are not
written to work with Tkinter.Frame instances.
Jeff
pgppDkXNnBRVL.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
It would help if you posted your code, as we're in the dark about
exactly what you tried to do and the error you received.
It sounds like you may be using the wrong type of widget for what you
want. The terms used in Tk are different than in some other systems.
If you want a separate window with
Your list "targets" contains some values twice.
>>> targets=[97,101,139,41,37,31,29,89,23,19,8,13,131,19,73,97,19,139,79,67,61,17,113,127]
>>> for t in set(targets):
... if targets.count(t) > 1: print t
...
97
139
19
It looks like the "duplicated" items in the output contain one of the
dupli
def until(pred):
yield None
while True:
if pred(): break
yield None
def example():
i = 0
for _ in until(lambda: x==0):
x = 10 - i
i += 1
print x, i
example()
pgpeP7iW6mcQm.pgp
Description: PGP signature
--
http://mail.python.org/mailman/l
Why not just define the function yourself? Not every 3-line function
needs to be built in.
def listdir_joined(path):
return [os.path.join(path, entry) for entry in os.listdir(path)]
dirs = [x for x in listdir_joined(path) if os.path.isdir(x)]
path_size = [(x, getsize(x)) for x in listdir_jo
If you want to work with unicode, then write
us = u"\N{COPYRIGHT SIGN} some text"
You can also write this as
us = unichr(169) + u" some text"
When you have a Unicode string, you can convert it to a particular
encoding stored in a byte string with
bs = us.encode("utf-8")
It's gen
On Tue, Jun 21, 2005 at 08:13:47AM -0400, Peter Hansen wrote:
> Xah Lee wrote:
> > the doc seems to suggest that eval is only for expressions... it says
> > uses exec for statements, but i don't seem to see a exec function?
>
> Because it's a statement: http://docs.python.org/ref/exec.html#l2h-563
I wrote the following module to test the behavior of PyInstance_New. I
called it something like this:
import vedel
class k:
def __del__(self): print "deleted"
vedel.g(k)
I get output like:
after creation, x->refcnt = 1
doing decref
deleted
after decref
Unles
You may find the third-party modules "ClientForm" and "ClientCookie" to
be useful.
Using ClientForm, the following code uploads a file to a particular web form:
forms = ClientForm.ParseResponse(urllib2.urlopen(url))
f = forms[0]
f.add_file(open(local, "rb"), filename=remote, name="file
Based on the location where the user clicked, you can find the
associated tags. Then you must loop through them to find the one that
gives the "href" value.
Jeff
:r /tmp/link.py
import Tkinter
app = Tkinter.Tk()
text = Tkinter.Text(app)
text.pack()
def click(event):
#this doesn't work
When using os.system(), files that are open in the parent are available
in the child, as you can see here in Linux' listing of the files open by
the child program:
[EMAIL PROTECTED] jepler]$ python -c 'f = open("/tmp/test", "w"); print
f.fileno(); import os; os.system("ls -l /proc/self/fd")'
3
to
[sent to python-list and poster]
Did you follow the direction that Python.h be included before any system
header?
This is mentioned at least in
http://docs.python.org/ext/simpleExample.html
It's a crummy thing for Python to insist on, but if you can re-organize
your headers to do this it sho
Using /proc/partitions is probably preferable because any user can read
it, not just people who can be trusted with read access to drives, and
because the format of /proc/partitions is probably simpler and more
stable over time.
That said, what you do is
import commands
fdisk_output = comm
On Sun, Jun 12, 2005 at 04:55:38PM -0700, Xah Lee wrote:
> if i have
> mytext.replace(a,b)
> how to find out many many occurances has been replaced?
The count isn't returned by the replace method. You'll have to count
and then replace.
def count_replace(a, b, c):
count = a.count(b)
retur
For me, an 'is' test works to find out what widget the event is taking
place on.
#
import Tkinter
def display_event(e):
print "event received", e.widget, e.widget is t
t = Tkinter.Tk()
t.bind("", display_event)
w = Tkint
You may want to use a standalone program to do this. "xwit" has the
ability to iconify a window which can be selected in a variety of ways.
http://hpux.connect.org.uk/hppd/hpux/X11/Misc/xwit-1.0/man.html
There's a direct Python interface to the X protocol in python-xlib. You
could re-write t
The machines with the 100mbps ethernet link are slightly
different---Pentium 4, 2.8GHz, Python 2.2, RedHat 9.
File size: 87490278
Best of 4 runs: 7.50 MB/s reported by "wget".
There was other network activity and system load at the time.
Jeff
pgpNVPeW3ghJL.pgp
Description: PGP signature
--
h
I tried to recreate the problem based on what you described in your
message. I was unable to recreate the problem.
I wrote the following file "sjh.c":
#include
PyObject *f(PyObject *self, PyObject *args) {
PyObject *ob = NULL;
if(!PyArg_ParseTuple(args, "O", &ob)) return NULL;
Py_I
On Sun, Jun 05, 2005 at 02:38:16PM -0500, Mike Meyer wrote:
[...]
> The first, and most obvious, thing that GUI builders do is force the
> developer to specify an exact position - if not size - for the
> graphical elements of the UI.
[...]
Certainly some---or even most---builders work like this.
300KB/s sounds dreadfully low.
I simply ran "python /usr/lib/python2.3/SimpleHTTPServer.py &", then
"wget -O /dev/null http://0.0.0.0:8000/70megfile";. On the best of 4
runs (when the file was cached) wget measured 225.20MB/s.
The hardware is a Pentium-M laptop with 768MB RAM runnng at 1.5GHz.
On Sat, Jun 04, 2005 at 10:43:39PM +, John J. Lee wrote:
> 1. In derived classes, inheritance doesn't work right:
Did you expect it to print 'moo'? I'd have been surprised, and expected
the behavior you got.
> 2. At least in 2.3 (and 2.4, AFAIK), you can't pickle classes that do
>this.
I suspect that getting the threads to die will be tricky, and as written
the thread holds a reference to the 'primegen' instance (this part can
be cured, but it still doesn't ever make the thread exit).
Instead of figuring out how to get this to clean itself up, why not make
sure you only make one
You're not going to find a single portable "unix" way of doing this.
The format of /etc/fstab and /etc/mtab are pretty portable, but they
only list mountable/mounted partitions, not all partitions.
In addition to the linux possibilities mentioned in another reply, there
is also /proc/partitions.
This isn't an option in the stock Tk listbox or any of the alternatives
I know of offhand (bwidget ListBox, TixTList). The TkTable widget,
which can also display multiple columns, can select different
justifications, either for the whole table, or for single cells.
I've never used TkTable with Pyt
First off, I just have to correct your terminology. "exec" is a
statement, and doesn't require parentheses, so talking about "exec()"
invites confusion.
I'll answer your question in terms of eval(), which takes a string
representing a Python expression, interprets it, and returns the result.
In
I wanted to have a Python program make my browser do a POST. I am using
Firefox on Linux.
Here's what I did:
* Prepare a HTML page on the local disk that looks like this:
http://www.example.com/cgi-bin/example.cgi";>
Submitting form.
You might want
os.spawnv(os.P_WAIT, "a.exe", ["a.exe"])
os.system("a.exe")
Jeff
pgpp3Fxdo0nYA.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
This may be relevant to the problems you're seeing:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=774665&group_id=5470
The short story, as the tracker item paints it, is that setting
LC_NUMERIC to anything other than 'C' can give results like the ones you
describe---Python itse
On Fri, May 20, 2005 at 12:16:15AM -0700, [EMAIL PROTECTED] wrote:
> Hello, I think the answer is basically correct but shift-jis is not a
> standard part of Python 2.3.
Ah, I was fooled --- I tested on Python 2.3, but my packager must have
included the codecs you went on to mention.
Jeff
pgp4q
I think you do something like this (untested):
import codecs
def transcode(infile, outfile, incoding="shift-jis",
outcoding="utf-8"):
f = codecs.open(infile, "rb", incoding)
g = codecs.open(outfile, "wb", outcoding)
g.write(f.read())
# If the file is so large that it can't be
On Thu, May 19, 2005 at 12:56:12PM -0500, phil wrote:
> Why is it so slow? (RH Linux, 2.4.20, 1.6Ghz AMD)
> 3/4 second slower to display widget w/unicode,
> even if I encode u'\u221e'
u'\u221e' vs u'\N{INFINITY}' should make no noticible run-time
difference--they both specify exactly the same stri
I wrote the following code:
import Tkinter
t = Tkinter.Label()
t.configure(
text=u"As the function approaches \N{INFINITY}, \N{HORIZONTAL
ELLIPSIS}")
t.pack()
t.mainloop()
It worked for me on Windows NT 4.0 with Python 2.4, and on RedHat 9 with
a self-compiled Python 2.
In Python, "chr" gives a 1-byte string from a small integer, "ord" does
the reverse. Strings are concatenated with "+" and substrings are taken
with the slice operator, s[pos1:pos2].
I'm not a visual basic expert, but it looks like these are the
operations the code below performs.
Jeff
pgpWpqb
this isn't about the "sign bit", it's about assumed encodings for byte
strings..
In iso_8859_1 and unicode, the character with value 0xb0 is DEGREE SIGN.
In other character sets, that may not be true---For instance, in the
Windows "code page 437", it is u'\u2591' aka LIGHT SHADE (a half-tone patte
One way to get a handle on some Tcl variables from Python is to create
Tkinter.Variable instances with the names of the existing Tcl variables
(normally, the variable names are chosen arbitrarily). Once you've done
this, you can do things like add variable traces (the trace_variable
method) on the
Most versions of gcc should be just fine to compile Python. Python is
targeted at ANSI/ISO C compilers, but does not yet use any C99 features.
I don't think there was ever such a thing as "gcc 3.5";
http://gcc.gnu.org/ lists 4.0 as the "current release series" and 3.4.3
as the "previous release s
If you want to do decimal arithmetic, use the decimal module which is
new in Python 2.4.
Python 2.4 (#1, Jan 22 2005, 20:45:18)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from decimal import Decimal as D
>>> D(
At the interactive prompt, a result is printed when both these things
are true:
* The entered code is an expression, not any other kind of statement
* The result of the expression is not 'None'
If an expression occurs, information about it will be printed instead.
So the interpreter won't
While I've never used it, there *is* a Tix module in Python which
appears to wrap the widgets provided by Tix. In Fedora Core 2, Python
doesn't seem to be configured to use Tix OOTB but a one-liner (that
should be harmless elsewhere) does make it work.
These classes are defined in the Tix module:
Tk, the library that Tkinter wraps, does not offer a way to "minimize to
the taskbar".
Jeff
pgp3ATXnxg0dO.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
To add to what others have said:
* Typos and lack of spell-checking, such as "occurances" vs "occurrences"
* Poor grammar, such as "Other characters that has special meaning
includes:"
* You dropped version-related notes like "New in version 2.4"
* You seem to love the use of s, while docs.py
Your question is answered in the tutorial:
http://docs.python.org/tut/node6.html#SECTION00674
4.7.4 Unpacking Argument Lists
The reverse situation occurs when the arguments are already in a list or
tuple but need to be unpacked for a function call requiring separate
positional arg
On Wed, May 04, 2005 at 09:14:18AM -0700, Sébastien Boisgérault wrote:
>
> Yup ?!? Weird ... especially as:
>
> >>> id(c.f) == id(C.__dict__['f'].__get__(c,C))
> True
Here, c.f is discarded by the time the right-hand-side of == is
executed. So the object whose id() is being calculated on the
ri
Are there only a few, unchanging templates? If so, (dynamiclly) create
a function for each template. This will be nearly the fastest you can
go in Python, excluding the time to create and byte-compile the nesting
function.
# This code is in the public domain
def make_nesting_expression(l, s):
As your 'for' loop shows, the number of items in the slice [2:5] is only
3, not 4.
Maybe you want the slice [2:6] instead.
>>> x = "xx\xb6/\0\0"
>>> struct.unpack('i', x[2:6])
(12214,)
Jeff
pgprzSG2OzoK4.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
You could write something like
class ThreadSpecificFile:
def set_stdout(f):
self.files[thread_id] = f
def write(data):
self.files[thread_id].write(data)
sys.stdout = ThreadSpecificFile()
where you'll have to fill out a few more things like thread_id,
One poster suggests 'ldd' for executables. You can also use this on shared
libraries:
$ ldd /usr/lib/python2.3/lib-dynload/_tkinter.so
libtix8.1.8.4.so => /usr/lib/libtix8.1.8.4.so (0x009b6000)
libtk8.4.so => /usr/lib/libtk8.4.so (0x00111000)
libtcl8.4.so => /usr/lib/libtc
I don't think that Tk's menus ever use more than one column. They
certainly don't on Unix.
Jeff
pgpsVnvjgm3Qy.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 26, 2005 at 09:59:29PM -0500, Mike Meyer wrote:
> Jeff Epler <[EMAIL PROTECTED]> writes:
>
> > items = query_param.items()
> > keys = [item[0] for item in items]
> > values = [item[1] for item in items]
>
> Is there some reason not to
It looks like php's implode(sep, seq) is like sep.join(seq) in Python.
But this is a lousy way to write database queries. You should use the
Python's DB-API interface's execute(statement, parameters) instead.
Assuming that paramstyle is 'qmark', I think it ends up looking
something like this:
This issue was discussed in another recent python-list thread, called
"Writing to stdout and a log file".
My second post includes a patch to Python's "fileobject.c" that made the
code that started that thread work, but for reasons I mentioned in that
post I didn't want to push for inclusion of my
In that case, it looks like you won't be able to get what you want
without modifying CPython. PRINT_ITEM calls PyFile_SoftSpace,
PyFile_WriteString, and PyFile_WriteObject, which all use
PyFile_Check(). It might be as simple as changing these to
PyFile_CheckExact() calls in PyFile_WriteString / P
This variation works:
#
class Tee:
def __init__(self, *args):
self.files = args
def write(self, data):
for f in self.files:
result = f.write(data)
return result
def writelines(s
On Tue, Apr 19, 2005 at 02:05:11AM -0700, Sébastien Boisgérault wrote:
> Thanks for this answer.
>
> Did you forward this info to python-dev ?
I created a patch on the sf tracker. It's been responded to by several
developers. You can read what they said there.
http://python.org/sf/1185529
Jef
The "type" field is related to the definition of different events in
X11. In Xlib, the event structure is a "C" union with the first
(common) field giving the type of the event so that the event-dependant
fields can be accessed through the proper union member.
Generally, you won't use this field
It looks like the automatic build of the 'fpectl' module was broken
somewhere along the line, perhaps when the transition from Modules/Setup
to setup.py took place.
Once I made the change below and rebuilt, I got the fpectl module.
Furthermore, it appeared to "do something" on my Linux/x86 system:
On Mon, Apr 18, 2005 at 01:40:43PM -0700, Xah Lee wrote:
> i have rewrote the Python's re module documentation.
> See it here for table of content page:
> http://xahlee.org/perl-python/python_re-write/lib/module-re.html
For those who have long ago consigned Mr. Lee to a killfile, it looks
like he'
It's not clear to me what you mean by "the first line" (gzip does not
output a file composed of lines, its output is byte-oriented).
Printing tst.getvalue() is probably not a very useful thing to do, since
it won't do anything useful when the output is a terminal, and it will
add an extra newline
On Tue, Apr 12, 2005 at 08:25:58PM +, Bengt Richter wrote:
> But credit where due. Someone has stepped up to a large chunk of the problem:
>
>http://jove.prohosting.com/iwave/ipython/pyMinGW.html
Yay. I'm glad somebody *is* doing this. Maybe all that is needed is to
"get the word out".
The answer has to do with a concept Tk calls "transient".
wm transient window ?master?
If master is specified, then the window manager is informed that
window is a transient window (e.g. pull-down menu) working on
behalf of master (where master is the path name for
I'm sorry that this is going to come out sounding like a flame, but it
seems to me that there today only a few technical problems remaining
with Python when built with mingw32.
If one of the people who has expressed such deep concern about this
"msvcr71.dll" problem would simply install the Free t
probably something like this: (untested)
def make_ftplib_callback(f):
def callback(block): f.write(block)
return callback
img = cStringIO.StringIO()
retrbinary( "get ???", make_ftplib_callback(img))
Jeff
pgpaecaxnsqYB.pgp
Description: PGP signature
--
http://mail.pyt
You may want to read
http://www.python.org/peps/pep-0754.html
Part of the text reads
The IEEE 754 standard defines a set of binary representations and
algorithmic rules for floating point arithmetic. Included in the
standard is a set of constants for representing special values,
in
You may want to use the 'numeric' or 'numarray' extensions for this.
The page on numarray is here:
http://www.stsci.edu/resources/software_hardware/numarray
numarray doesn't support "complex 16-bit integer" as a type, but you can
get a complex, floating-point valued array from your integer val
Is there a script that causes this problem, without using mod_python or
jepp? If so, please attach it to the sourceforge bug.
http://sourceforge.net/tracker/index.php?func=detail&aid=1163563&group_id=5470&atid=105470
pgpiWdvwwFmcD.pgp
Description: PGP signature
--
http://mail.python.org/mailman
1 - 100 of 157 matches
Mail list logo