Well, here's the first page turned up by google for the terms 'python
binary stdout':
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65443
Code from that page:
import sys
if sys.platform == "win32":
import os, msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_B
On Thu, Jan 13, 2005 at 11:04:21PM +, Bengt Richter wrote:
> One way to do it consistently is to have a sign digit as the first
> digit after the x, which is either 0 or base-1 -- e.g., +3 and -3 would be
>
> 2x011 2x101
> 8x03 8x75
> 16x03 16xfd
> 10x03 10x97
... so that 0x8
Python is at the whim of the services the OS provides. Maybe you should
ask in a linux-related newsgroup or mailing list, they might know more
about the specifics of both detecting and working around "weird"
filesystems like "fat".
To find the type of a filesystem, Linux provides the statfs(2) fu
Your formulation in Python is recursive (hamming calls hamming()) and I
think that's why your program gives up fairly early.
Instead, use itertools.tee() [new in Python 2.4, or search the internet
for an implementation that works in 2.3] to give a copy of the output
sequence to each "multiply by N
The cpython implementation stores tuples in memory like this:
[common fields for all Python objects]
[common fields for all variable-size python objects, including tuple size]
[fields specific to tuple objects, if any]
[array of PyObject*, one for each item in the tuple]
This way of
On Thu, Jan 27, 2005 at 06:38:22AM -0500, Tim Daneliuk wrote:
> Is it possible to underline more than a single character as I am doing
> with the 'underline=0' above. I tried 'underline=(0,2)' but that didn't
> work.
No.
Jeff
pgpFCNSGSpXA9.pgp
Description: PGP signature
--
http://mail.python.o
These lines
> if __name__ == '__main__':
> OptionsWindow()
mean "if this source code is the main program (not an imported module),
call OptionsWindow()". So the behavior should be different when the
source code is the main program ('python opt_newlogin.py') and when it's
imported ('python -c "
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
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
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
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
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
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
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
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
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
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
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
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 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 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
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])
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
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
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
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
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
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
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
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
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*
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
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
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 = 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
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
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
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
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
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
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 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
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
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
#
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('
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
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 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
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 '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, Feb 06, 2005 at 12:26:30PM -0800, administrata wrote:
> Hi! I'm programming maths programs.
> And I got some questions about mathematical signs.
>
> 1. Inputing suqare like a * a, It's too long when I do time-consuming
>things. Can it be simplified?
You can write powers with the "**"
No.
Unlike Perl, Python implements only a *finite turning machine* model of
computation. An easy way to see this limitation is in the following
code:
>>> 1.0 / 10.0
0.10001
In an infinite Turning machine, there would be an unbounded number of
zeros before the second 1, giving
The Tkinter Canvas directly supports saving to postscript format, but
not any standard bitmap format (or even modern vector formats like pdf
or svg).
Jeff
pgpBVvDhXslRq.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
In this case, you can use getattr() instead of the exec statement:
getattr(self.frame, t).SetTable(DataTable(d, r[0]), True)
Jeff
pgp6KrffC7xJf.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
The reason that F10 does nothing is because there is already a binding
on all for . In Motif apps, F10 moves focus to the menu bar, like
pressing and releasing Alt does on Windows. When there is a binding for
a key, the handling of the event "event add" never takes place.
If you want to get rid
On Sun, Feb 13, 2005 at 08:39:10PM -0500, Peter Hansen wrote:
> That answer, combined with Mike's response pointing out
> that tools more sophisticated than basic "make" actually
> can delve into the source and identify the dependencies,
Argh argh argh.
Of course you can write a makefile to "delv
There's not enough information to guess the "real problem", but it could
be this:
"variable size" objects (declared with PyObject_VAR_HEAD) are limited to
INT_MAX items since the ob_size field is declared as 'int'.
This means that a Python string, tuple, or list (among other types) may
be limited
mv is a surprisingly complex program, while os.rename is a wrapper
around rename(2) which is probably documented on your system to return
EXDEV under these circumstanes.
os.xxx is generally a fairly thin wrapper around what your OS provides,
and inherits all the "gotchas". For some activities, os
If you have a shell, it's as simple as typing "python" and seeing if the
interactive interpreter appears:
$ python
Python 2.3.3 (#1, May 7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
When a Python program exits, various steps of cleanup occur. One of
them is that each entry in the __dict__ of each module is set to 'None'.
Imagine that your __del__ runs after this step of the cleanup. The reference
to the module-level variable that names your class is no longer available
I lo
Cameron Laird mentioned Tk's send working with Python; if you are writing your
app with Tkinter, here is some code to let you use tcl commands like
send python
for remote control. You could build a more sophisticated front-end for this,
and you'll probably also want to add stuff like sending
Does "sudo" sanitize the environment? Imagine that the user can set
PYTHONPATH, PYTHONINSPECT, etc.
Beyond that, you have the same problems as with any code that runs with
"extra privileges". Can the user supply any code that is fed to
patently unsafe primitives (like the unpickler, eval() or th
On Wed, Mar 02, 2005 at 04:58:03PM -0600, phil wrote:
> Sorry for the repost, but moderator
> jeld the last one,
We saw both posts.
> In a Tkinter entry field (or Pmw entry)
> how could I eat charactres?
create a binding on the widget for the particular character you want to
treat specially. If
By using os.spawn* and the os.P_NOWAIT, the spawn function will return
immediately, with the return value being the PID of the new process.
Later, you can use os.kill() to force the program to terminate,
os.waitpid() to retrieve the exit status if it has terminated, or you
could use the signal modu
Can you use something like (untested)
class ComparisonReverser:
def __init__(self, s): self.s = s
def __cmp__(self, o): return cmp(o, self.s)
def __lt__... # or whichever operation hashes use
then use (ComparisonReverser(f(x)), i, x) as the decorated item
instead of (f(
The pyconfig.h file (/usr/include/python2.3/pyconfig.h) should begin
something like this
/* pyconfig.h. Generated by configure. */
/* pyconfig.h.in. Generated from configure.in by autoheader. */
and shouldn't cause problems.
If it starts in a wildly different way than that, then it's p
On Mon, Mar 07, 2005 at 11:56:57PM +0100, Francis Girard wrote:
> BTW, the python "unicode" built-in function documentation says it returns a
> "unicode" string which scarcely means something. What is the python
> "internal" unicode encoding ?
The language reference says farily little about unic
What does this command print?
gcc -c -I/usr/Python-2.3.3/Include -x c -o /dev/null \
/usr/Python-2.3.3/Include/pymem.h
If it prints an error like the one you included in this message, then
the set of header files in /usr/Python-2.3.3/Include is damaged,
incomplete, or wrong for your com
Without your code, it's hard to tell.
Here's a small program I wrote:
import time
t = time.time()
print time.localtime(t - 86400)
print time.localtime(t)
on both lines, the tm_isdst flag is the same.
If I choose two times that are on either side of the DST change in
my timezone,
untested
def my_getter(m, i, f):
try:
return m[i]
except (KeyError, IndexError):
return f()
my_getter(d, 'x', bigscaryfunction)
my_getter(d, 'y', lambda: scaryinlineexpresion)
pgp04VRKFqQL1.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python
Ah -- I'm sorry I was off-target, and I'm glad someone else had what may
be better advice for you.
Jeff
pgptOZnkOhiE1.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Here's an old thread I contributed to which had a similar function
(called 'cell_get' in this case)
http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/baba3b943524a92c/71b57a32b311ffc8?q=func_closure#71b57a32b311ffc8
http://groups-beta.google.com/group/comp.lang.python/msg/7
Maybe something for sets like 'appendlist' ('unionset'?)
Jeff
pgpCq9GushexV.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
> [Jeff Epler]
> > Maybe something for sets like 'appendlist' ('unionset'?)
>
On Sat, Mar 19, 2005 at 04:18:43AM +, Raymond Hettinger wrote:
> I do not follow. Can you provide a pure python equivalent?
Here's what I had in mind:
$ python /tmp/uni
You can use PROC.poll() to find out whether the process has exited yet
or not (for instance, in a 'while' loop along with a delay). I don't know
what facilities exist to forcibly terminate programs on Windows, though.
On Unix, os.kill() can be used to kill a process given its pid. Perhaps
some of
I'm referring to Python 2.2's C headers as I answer this question. I
believe some of may have changed by 2.4.
The number of elements in a "variable-sized object" (those with
Py_VAR_HEAD; I believe this includes lists, tuples, and strings) is
stored in a platform 'int'.
On most (desktop) systems,
"flush" your files before forking.
For me, this program gives the correct output 'hello\n' when correct=1.
When correct=0, I get either 'hello\nhello' or 'hellohello\n' as output.
correct = 0
import sys, os
sys.stdout.writ
>>> email.Header.decode_header("=?us-ascii?Q?Re=3A=20=5Bosg=2Duser=5D=20Culling=20problem?=")
[('Re: [osg-user] Culling problem', 'us-ascii')]
>>> email.Header.decode_header("=?gb2312?B?cXVlc3Rpb24gYWJvdXQgbG9hZGluZyBmbHQgbGFyZ2UgdGVycmFpbiA=?=")
[('question about loading flt large terrain ', 'gb23
I don't know about idle, but the "real" python supports the
PYTHONSTARTUP environment variable.
PYTHONSTARTUP
If this is the name of a readable file, the Python commands in
that file are executed before the first prompt is displayed in
interactive mode. The file is executed
First, you'll want to exit from each forked copy, or else it will reach
the code-after-the-for-loop:
import sys, os, time
texts = ['this is text1', 'this is text 2']
for current_text in texts[0:]:
pid = os.fork()
if pid == 0:
time.sleep(2)
print c
You copied an instance, not a class.
Here's an example of attempting to deepcopy a class:
>>> class X: pass
...
>>> import copy
>>> X is copy.deepcopy(X)
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/copy.py", line 179, in deepcopy
raise error, \
copy.E
The limits of ZIP files according to the folks who make info-zip:
http://www.info-zip.org/pub/infozip/FAQ.html#limits
statistic limit
number of files65,536
uncompressed size of a single file 4 GB
compressed size of a single file 4
buffering.
In the first case, there is either no buffering, or line buffering on
sys.stdout, so you see the lines in order.
In the second case, there is a buffer of a few hundred or thousand bytes
for stdout in the python process, and you see the two lines of python
output together (in this case,
Maybe you want r'\b'. From 'pydoc sre':
\b Matches the empty string, but only at the start or end of a word.
import re
r = re.compile( r'\btest\b' )
print r.findall("testy")
print r.findall(" testy ")
print r.findall(" test ")
print r.findall("test")
pgps8PNW4uDgh.pgp
Description: PG
On Tue, Mar 22, 2005 at 07:16:11AM -0700, Earl Eiland wrote:
> I've been having trouble with a program hanging when using the
> subprocess modules "wait()" method. Replacing it with with a loop that
> used "poll()" solved the problem.
Please include an example, and more information about what pla
I wrote a program to use subprocess.Popen 1 times, and never had
.wait() hang. If this is a bug, it may be Windows specific.
Here's the program I ran:
#-
import subprocess, signal
def timeout(*args):
print "Timed out
hm, I guess SIGALRM doesn't exist on Windows. You can run the program
without the 'signal.signal' line or the 'signal.alarm' line, and you'll
be stuck with a hung Python if subprocess.Popen exhibits the bug.
Jeff
pgp80TDX5i7qo.pgp
Description: PGP signature
--
http://mail.python.org/mailman/li
On Tue, Mar 22, 2005 at 02:19:52PM -0700, Earl Eiland wrote:
> Well, your program ran successfully. Perhaps WinRK is not well
> behaved. How can a process terminate in such a way that poll() can read
> it, but wait() won't?
I don't have any idea. Both are implemented in terms of
win32event.Wait
On my machine the program finishes in 30 seconds. (it's a 1.5GHz machine)
If the 'parm' group is removed, or if the buffer is shortened, the time
is reduced considerably.
There are "pathological cases" for regular expressions which can take
quite a long time. In the case of your expression, it's
When running with "-tt", you can get this error.
[EMAIL PROTECTED] src]$ python -tt
Python 2.3.3 (#1, May 7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exec "def f():\n\ta\nb"
Traceback
Here is a short program that sets Tk's window icon on Linux. My window
manager is icewm, and it uses a scaled version of the "flagup" image
both at the upper-left corner of the window and on the task bar entry
for the window.
import Tkinter
app = Tkinter.Tk()
app.iconbitmap("@/usr/X11
I have written a rather hackish extension to use NET_WM_ICON to set
full-color icons in Tkinter apps. You can read about it here:
http://craie.unpy.net/aether/index.cgi/software/01112237744
you'll probably need to take a look at the EWMH spec, too. If KDE
supports NET_WM_ICON, this may work f
In my experience, when built with the same compiler (gcc 3.3.3) the size
of the python library file (libpython2.x.a on unix machines) hasn't
changed much between 2.3, 2.4, and current CVS:
-rw-r--r-- 1 jepler jepler 950426 Mar 31 21:37 libpython2.3.a
-rw-rw-r-- 1 jepler jepler 1002158 Mar 31 21:
I think you want urllib.basejoin().
>>> urllib.basejoin("http://www.example.com/test/page.html";, "otherpage.html")
'http://www.example.com/test/otherpage.html'
pgpSOZBAEHiWi.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
if your goal is to search for files on a windows-style path environment
variable, maybe you don't want to take this approach, but instead wrap
and use the _wsearchenv or _searchenv C library functions
http://msdn.microsoft.com/library/en-us/vclib/html/_crt__searchenv.2c_._wsearchenv.asp
Incid
The software you used to post this message wrapped some of the lines of
code. For example:
> def __delitem__(self, key):
> super(keytransformdict, self).__delitem__(self,
> self._transformer(key))
In defaultdict, I wonder whether everything should be viewed as a
factory:
def setde
The C code that Python uses to find the initial value of sys.path based
on PYTHONPATH seems to be simple splitting on the equivalent of
os.pathsep. See the source file Python/sysmodule.c, function
makepathobject().
for (i = 0; ; i++) {
p = strchr(path, delim); // ";" on win
The iterator for files is a little bit like this generator function:
def lines(f):
while 1:
chunk = f.readlines(sizehint)
for line in chunk: yield line
Inside file.readlines, the read from the tty will block until sizehint
bytes have been read or EOF is seen.
If
On Sun, Apr 03, 2005 at 09:49:42PM -0600, Steven Bethard wrote:
> Slick. Thanks!
does isatty() actually work on windows? I'm a tiny bit surprised!
Jeff
pgp2TeZpqhdyV.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Apr 04, 2005 at 10:43:11AM +0200, pavel.kosina wrote:
> I would need to get at canvas pixel color under certain moving widget or
> better (= faster?) colors/"types" of underlying static widgets that are
> of polygon shape (not rectangle).
I don't believe this information is available any
1 - 100 of 157 matches
Mail list logo