u have to recompile your module
with the debug headers.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
#x27;t provide
any?
You can use "strace -p " to find out what it's doing
when it hangs.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> All my troubles could apparently be fixed if I
> could acquire a copy of VS 2003, but Microsoft has made it incredibly
> difficult to find the download for it (I don't think it exists).
>
> Any suggestions?
You can get copies of VS 2003 from ebay fairly easily.
Rega
t;gbk" occurs in the encoding declaration
as
If the encoding name has a different spelling (e.g. GBK), you need to
cater for that as well. You might want to try replacing the entire
XML declaration (i.e. everything between ), or just the
encoding= parameter. Notice that the encoding declaration
le.getpreferredencoding() to "mbcs", so that my original code works
> portably?
No. The "mbcs" codec has a slightly different semantics from the cp932
codec, on your system. Specifically, the "mbcs" codec might map
characters as approximations, whereas the cp932 cod
it is
expanding at a slower rate than souls entering, it is exothermic
and pressure will increase until all hell breaks loose. If it
is expanding at a higher rate, it is endothermic, and temperature
will drop until hell freezes over. See
http://www.pinetree.net/humor/thermodynamics.htm
n
> English locale).
What operating system do they use, and how do they send you the file
for verification? Can you have them run
print repr(open(filename, "rb").read(10))
and send you its output?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
exception.
So are you sure you open the file in binary mode on Windows?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> That's odd, because readline seems to work fine in a Windows
> console (recalling previous lines and line editing).
That's an illusion. The Windows version of Python does not
support or use GNU readline at all. What you see is a feature
of the console window.
Regards,
ing back to the community, and contribute
any patches to freeze that you may find necessary.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Is there a reason why "/" is considered an absolute pathname by
> CPython?
Yes: it tests whether a path is absolute on the current volume.
Use the source, Luke.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
n your own. If you find out what the problem is, please
submit patches to bugs.python.org.
In any case, the strategy you propose (with multiple arenas) would *not*
work, since some objects have to be shared across interpreters.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> The basic fact, though, remains, the same code works for me with the
> same input but not for two particular users (out of hundreds).
I see. That's mysterious.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
hat?
No. First, it works on Windows, Linux and Irix only, not on arbitrary
*nix systems. Second, it doesn't create a single executable, but depends
on the extension modules that the host Python interpreter uses. To
compile a simple "print 'Hello, world'" with Python 2.5 o
tems you
> have developed which make use of multiple sub interpreters so we can
> gauge with what standing you have to make such a comment.
I have never used that feature myself. However, I wrote PEP 3121
to overcome some of its limitations.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> _sock = _realsocket(family, type, proto)
> TypeError: an integer is required
So what values have family, type, and proto at that point?
Edit socket.py to find out.
Could it be that you also need to set socketType for your
Port subclass?
Regards,
Martin
--
http://mail.python.org/m
However, some modules are
not builtin (they are shared libraries instead); it's easiest
to ls build/lib. after compiling Python to see what
modules have been built.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
th the default directory
again.
You need to open a remote shell, and send commands to its command
line; AFAICT, you can't use exec_command for that.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
AICT. The interpreter keeps track of
loaded extensions by file name, so if the different version lives in
a different file, that should work fine.
Are you using sys.setdlopenflags by any chance? Setting the flags
to RTLD_GLOBAL could have that effect; you'ld get the init function
of the fi
s become simpler to limit the source of potential
> problems and just tell them to avoid doing it. :-)
You do notice that my comment in that direction (avoid using multiple
interpreters) started that subthread, right :-?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Do you think that paramiko can replace telnet in my application? Thanks.
You need to use .invoke_shell(), then send() and recv().
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
anyone help ?
When you have an ssh-agent running that has the key loaded, paramiko
will automatically use that. If you don't have an ssh-agent running,
you have to pass either the pkey or the key_filename argument; the
former should be a PKey object (either RSAKey or DSSKey).
Regards,
Marti
be only a single one of them.
If you think you can fix that, start by changing Python so that
Py_None is per-interpreter, then continue with PyBaseObject_Type.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Mike Hjorleifsson wrote:
> Thanks for the response, is there an example bit of code somewhere i
> could digest ?
I did
c.connect("",username="loewis")
with ssh-agent, and it worked just fine.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
the SWIG module should be irrelevant.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> sorry i meant a code example that i pass the id_dsa.pub file contents
> too
> so i am not reliant on the host system to have the ssh-agent.
c.connect("",username="loewis",key_filename=".ssh/identity")
works for me with ssh-agent disabled.
Regards,
Ma
Steven D'Aprano wrote:
> On Wed, 06 Feb 2008 10:14:10 -0600, Reedick, Andrew wrote:
>
'c' is also the speed of light.
>>> 'c' is the speed of light _in_a_vacuum_.
>> True.
>>
>>
And since nothing can travel faster than light...
>>> Nothing can travel faster than the speed of light _in_a_
t;221E"
1. convert that into an integer: char = int(char, 16)
2. convert that into a Unicode character: char = unichr(char)
3. print it: print char
If you insist on the user entering "u221E" instead, you have
to convert that first into a string without the leading u:
0.5 char = char[1:]
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
y. On Linux, try gucharmap
or kcharselect.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Have you any idea why this is not working on my computer ?
Can you please try the listdir operation with the Python distribution
from python.org instead of Cygwin Python?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Bjoern Schliessmann wrote:
> Jeff Schwab wrote:
>
>> The only "dream hardware" I know of is the human brain.
>
> Nah. Too few storage capacity, and too slow and error-prone at
> simple calculations. The few special but very advanced features are
> all hard-wired to custom hardware, it's a real ni
own error handler, such as
the one in
http://herlock.com/ob/pythoncb/0596007973/chp-1-sect-23.html
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Larry Bates wrote:
> brad wrote:
>> I'd like to send email directly from within python without having to
>> rely on an external smtp server. You know, something like the good,
>> old Unix...
>>
>> echo My_message | mail -s Subject [EMAIL PROTECTED]
>>
>> Can Python do something similar in a porta
brad wrote:
> Martin P. Hellwig wrote:
>
>> The tricky part is how to resolve the mail server for a mail address.
>> Usually you have to query the mx record of that domain. I solved that
>> by looking if I can find the nslookup binary.
>
> The from and to are
Martin P. Hellwig wrote:
> I already wrote a command line mailer that can do attachments too, no
> need to write it again. If anybody is interested I can open-source it.
>
To reply on my own post ;-)
Even if nobody is interested in case you change your mind it is hosted
Guilherme Polo wrote:
> I hope to not disappoint you, but mail will invoke a smtp server to
> send your mail.
>
I disagree. If you really want to, all you need is telnet. You connect
to port 25 of the mail server that handles the mail of the domain for
that mail address and do the helo, mail f
Dennis Lee Bieber wrote:
> The first response to the query was to invoke the command line
> "mail" utility of a Unix type OS. THAT program is, what I believe, was
> meant by "mail will invoke a smtp server"... Not "mail" as a general
> concept, but the utility command...
Ah yes I see that n
lease,
Martin
Martin v. Loewis
[EMAIL PROTECTED]
Python Release Manager
(on behalf of the entire python-dev team)
--
http://mail.python.org/mailman/listinfo/python-list
> The Mac binary is giving a 404.
Thanks for pointing that out - it's fixed now.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
r, so "to release"
means to me what the dictionary says it means: m-w's fourth meaning,
"make available to the public". That's what I did - I made the release
candidate available to the public.
So is the subject incorrect as well? If so, what should it say?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ilar
scheme that allows incremental collection without write barriers. This
particular scheme heavily relies on refcounting itself (specifically,
an object is garbage in a certain generation when all references to
it come from the same generation).
As for the consequences of the scheme (i.e. no
MooJoo wrote:
> I've read that the Python interpreter is not thread-safe
Just to counter this misconception: the Python interpreter *is*
thread-safe. It's just that it won't run in parallel with itself
on multiple CPUs in a single process.
Regards,
Martin
--
http://mail.
y the operating system underly
a system scheduler: they can be preempted, they have priorities,
and they may voluntarily block. All this is not possible with
continuations.
IOW, threads are more expressive than continuations.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> 'Not trying to start a fight here, I'm just curious about the
> current state of that art. It is the case today that all
> modern language threading is realized over a kernel implementation
> of threading that behaves as you suggest?
I didn't suggest it for all languag
> If I do:
>
> import my_module
> help(my_module)
>
> I'd like to see ONLY help on my_module, NOT help on all the functions
> inherited from the various parent classes . . .
I would do
print my_module.__doc__
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ay that expressions evaluate to a value, not that they return
a value.
> The above example generates a SyntaxError.
>
> Is this correct? I just want to make sure I've understood the
> semantics.
Please try to study more on the difference between expressions
and statements.
Regar
clude:
Bug fixes. According to the release notes, at least 100 have been fixed.
Highlights of the previous major Python release (2.5) are available
from the Python 2.5 page, at
http://www.python.org/2.5/highlights.html
Enjoy this release,
Martin
Martin v. Loewis
[EMAIL PROTECTED]
P
2 from, and how did you
install it? _struct should be there; if it isn't, something went
wrong during the installation.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Java and
C is so that \u gets processed even before tokenization even starts, and
it should be the same in Python.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
l good enough (or at all, for that matter). I found Python does
*very* well in Windows system administration, in many cases, better
than Visual Basic (IMO, and for the things I wanted to do). I've
mostly used the COM integration, as the things I wanted to manage
had COM (automation
[EMAIL PROTECTED] wrote:
> Hi Python Enthusiasts,
>
> I am hoping one or two members of this list might help me locate in Europe
> to begin a small team of developers with a focus on python for the central
> part of the server development.
>
> My personal first choice is Spain only because I lik
> As of 4:50 PM EST, the links to Windows installers give 404 File Not
> Found.
>
> I gather that they are still in process,
> and notice that there is no public c.l.p. announcement.
I just fixed that. The files were there; just the links were wrong.
Regards,
> The 2.6a1 x86 MSI is there, but the 3.0a3 x86 MSI is still giving a 404.
Please try again - *those* files weren't actually there when I sent my
last message; I just built them.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ou really do have to check config.log. Check for any lines where it
tries to invoke the compiler, and check whether it does so in the way
you expect it to.
From the output you provide, it seems to use "cc" as the compiler,
not /usr/vacpp/bin/cc_r. Looking at the comfigure code, this is n
> Can somebody point to some clues about options that need to be passed
> to FreezePython API to get the right executable.
You need to tell it to include the encodings.ascii module.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ghlights of the previous major Python releases are available
from the Python 2.4 page, at
http://www.python.org/2.3/highlights.html
http://www.python.org/2.4/highlights.html
Enjoy this release,
Martin
Martin v. Loewis
[EMAIL PROTECTED]
Python Release Manager
(on behalf of the entire
xed for
2.5 (IIUC), but the fix was not backported (nor should it be, as it
is not relevant for security). Use OS X 10.4 if you want to use Python
2.4.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ld have to be fixed. IIUC, 2.4.4
won't compile on 10.5, either, and Python 2.4.5 will have no code to
port it to new platforms.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Can you also add a note to the 2.3 and 2.4 web pages?
You mean the 2.3.7 and 2.4.5 web pages? Sure.
(If you mean some other web pages, please give precise
URLs).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Has anyone does this before ? Even some basic idea or code as to how
> to proceed would be great.
Have you seen Misc/gdbinit?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ME'], 'dir1'))
Or
os.chdir(os.path.expanduser("~/dir1"))
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
d later items, but
makes modification of the sequence undefined behavior to allow
alternative implementations. E.g. an implementation that would
crash, erase your hard disk, or set your house in flames if you
confront it with your code still might be a conforming Python
implementation.
Regards,
Martin
--
the
corresponding import library (libpythonxy.a/pythonxy.lib) into
the linker line, using a -l option.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
gt; any version of 2.5 for that matter.
>
> Any pointers would be appreciated.
I have not released any source RPM for Python 2.5.2. You can build
your own, from Misc/RPM.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
you put it all in a single run method which
sequentially first tries to generate the intermediate outputs
(doing nothing if they are up-to-date), and then the final outputs
(doing nothing when they are newer than the intermediate ones).
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
on.org/2.4/highlights.html
Enjoy this release,
Martin
Martin v. Loewis
[EMAIL PROTECTED]
Python Release Manager
(on behalf of the entire python-dev team)
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
xmlrpclib.dumps((None,), allow_none=True) yields
'\n\n\n\n'
Why doesn't it just yield
'\n\n\n\n'
Or even just
'\n\n\n'
Those are valid XML and valid XML-RPC, but isn't.
Thanks for any thoughts...
--
martin | http://madduck.net/ | ht
also sprach martin f krafft <[EMAIL PROTECTED]> [2008.03.16.1421 +0100]:
> Why doesn't it just yield
>
> '\n\n\n\n'
>
> Or even just
>
> '\n\n\n'
There's a difference between those two. The first one has an empty
string value (
Why do you say that? It most definitely returns what the size currently
is, not what it will be in the future (how could it know, anyway).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
rt IDLE to Tk 8.5: that would be a useful
contribution.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ge
across Python versions.
Ideally, interactive mode should assume the terminal's encoding
for source code, but that has not been implemented.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
#x27;\xdb' will be the same in latin1,
> latin3, latin4 and probably many others.)
I think in all your examples, you pass a Unicode string to eval, not
a byte string. In that case, it will encode the string as UTF-8, and
then parse the resulting byte string.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
complete (it knows, after
> all, the size of the source file). I always thought this meant that
> Windows is just much smarter than me, so I ignored it.
No, I really think the target file has its size right from the
beginning.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
jmDesktop wrote:
> For students 9th - 12th grade, with at least Algebra I. Do you think
> Python is a good first programming language for someone with zero
> programming experience? Using Linux and Python for first exposure to
> programming languages and principles.
>
> Thank you.
I for one can
Guilherme Polo wrote:
> 2008/3/21, "Martin v. Löwis" <[EMAIL PROTECTED]>:
>>> I've been thinking of volunteering to "port" Tkinter to Python 3.0, I
>> > hadn't noticed that there was any discussion of removing it. It would
>> > b
ion 0 1)))
(length indentation)
(/ (length indentation) py-indent-offset)
(add-hook 'python-mode-hook
'(lambda ()
(outline-minor-mode 1)
(setq
outline-regexp py-outline-regexp
outline-level 'py-outline-level)))
Martin
--
http://mail.python.org/mailman/listinfo/python-list
itself. For DLL loading, it
must use the OS routines, which just don't look into zipfiles.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I asked something similar a few days ago. Is it possible to compile
> Python 2.6.1 with a dynamic path?
What is a "dynamic path"?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I need something to connect to a database, preferably mysql, that
> works in python3.0 please.
For postgres, psycopg2 works with Python 3 (if you use my patch).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
such a thing
> exist, and if so where can I find it?".
Interestingly enough, the question was slightly (but importantly)
different, though: the question really was "Does anybody has a patch for
MySQLdb?"; as my reference to the existing interface to PostgreSQL
was not sufficient for the
s.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
koranthala wrote:
This does sounds more to me like a windows/hardware problem, what you
could do is check the windows log for errors, especially look for read
errors from the hard disk.
Windows sometimes can behave very strangely especially if the external
libs don't behave well on a multi
s unicode-safe?
One of self.title and self.content is a Unicode string, the other is
a byte string. You need to change them to have the same type (depending
on whether you want to process them as Unicode or byte strings).
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
title is a unicode string, and further suppose the output
is to be encoded in cp1252, then you change the line to
rc_file.write(u"\n\n".join([self.title.encode("cp1252"),
"### BEGIN CONTENT ###",
self.content]))
> s = urandom(10).encode('hex')
>
> AttributeError: 'bytes' object has no attribute 'encode'
py> binascii.hexlify(os.urandom(10))
b'92b91d5734a9fe562f23'
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
t.
readability sometimes, but I found that this approach works quite
well for Django. I think Mark Hammond is also working on maintaining
a single code base for both 2.x and 3.x, for PythonWin.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
rom
> type?
No - it is the normal case for single inheritance. You can leave it
NULL, which means you inherit from object.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Roy Smith wrote:
In article ,
Steve Holden wrote:
Roy Smith wrote:
In article
<6264e675-ddd4-446a-822a-cc82e8f87...@w1g2000prk.googlegroups.com>,
v4vijayakumar wrote:
I saw some code where someone is really managed to import braces from
__future__. ;)
def test():
#{
print "hell
etely different
from what you expect it to do.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
gert wrote:
> On Jan 17, 9:08 pm, "Martin v. Löwis" wrote:
>>> I expected that py3 did not converted the b'...' indication too ?
>>> b'afc76815e3fc429fa9d7'
>> You mean, just because you invoked the ascii() builtin, the b
>> pre
s to be generated).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
>>> s = str(hexlify(urandom(8)))[2:18]
>> And your question is?
>
> No question just solution to get rit of b'' :)
Ah. hexlify(urandom(8)).decode('ascii')
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ython executable, so no need to build Python at
all. If you still wish to rebuild Python, then, on the 64-bit Ubuntu,
the standard configure;make;make install will do the trick.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Tim Rowe wrote:
2009/1/23 Kay Schluehr :
Whatever sufficiently sophisticated topic was the initially discussed
it ends all up in a request for removing reference counting and the
GIL.
Well, maybe, but it seems to me that the real issue here is that we
need to remove reference counting and the
e a single
byte, and the + operator will do the concatenation.
In Python 3.x, use the bytes type (bytes() instead of chr()).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ir parameter types. And so on.
> Can I replace the int values to a int64 value?
See above. In short: no. Use a real 64-bit operating system
(such as 64-bit Linux, Solaris, FreeBSD, etc)
Regards,
Martin
P.S. I do wonder why you want to do this, though. Isn't Python's
long integer
ry,
> communications protocols in Python. I've used Python/struct
> with transport layers ranging from Ethernet (raw, TCP, and UDP)
> to async serial, to CAN.
Do you use it for the fixed-size parts, or also for the variable-sized
data?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
de any additional value:
def encode(type, length, value):
return chr(type)+chr(length)+value
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ffer of n bytes. Now that bytes() ended up immutable
(and bytearray was added), it's perhaps not so useful anymore. Of
course, it would be confusing if bytes(4) created a sequence of one
byte, yet bytearray(4) created four bytes.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
at', 1, 3.14159)
> Traceback (most recent call last):
> File "", line 1, in
> File "", line 2, in encode
> TypeError: an integer is required
No:
py> CONNECT_REQUEST=17
py> payload="call me"
py> encode(CONNECT_REQUEST, len(payload), payload)
'\x11\x07call me'
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
3101 - 3200 of 4331 matches
Mail list logo