understanding of cross-
> platform issues, fails to include built-in modules that don't live in the
> file system, and probably more).
>
> Is this problem already solved? Can anyone make any suggestions?
>
>
>
> --
> Steven
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Best Regards,
Leo Jay
--
https://mail.python.org/mailman/listinfo/python-list
as a single file that users can just copy and run.
>
But if you use windows and you happen to use multiprocessing,
please be aware of this bug I encountered several years ago.
https://mail.python.org/pipermail/python-dev/2011-December/115071.html
--
Best Regards,
Leo Jay
--
https://mail.python.org/mailman/listinfo/python-list
ta)
File "C:\python27\lib\multiprocessing\forking.py", line 454, in prepare
assert main_name not in sys.modules, main_name
AssertionError: __main__
It seems that the situation described here is similar:
http://bugs.python.org/issue10128
But the patch doesn't work for me.
s of them!) ? I
> know I can write a function to do this, but is there anything built-in?
>
> Thanks
>
> Frank Millman
>
How about int(x[:-2])?
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I'd like to know how do you guys find out what's happening in your
code if the process seems not work.
In java, I will use jstack to check stacks of threads and lock status.
But I don't know how to do it in python.
--
Best Regards,
Leo Jay
--
http://mail.python.org/m
ult of
'aaa'.encode('base64')
has a '\n' at the end, but the other method doesn't.
Why the inconsistent?
Thanks.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
gt; dont know how to catch them.
>>
> The files and subfolders of Python are all installed into a single
> folder, for example C:\Python26, and none into the system folder or
> other places, if you are worried about that.
>
I don't think so. At least, the pythonXX.d
on, and platform variations are common.
>
> So if your underlying C implementation of strftime() supports "%e", then
> Python will. My guess is that the same applies to time.strftime as it does
> to datetime.strftime
>
> The docs list ones that are fairly cross-platform. However, it would seem
> that not all platforms support "%e"
>
>
> -tkc
>
>
> [1]
> http://docs.python.org/library/datetime.html#module-datetime
>
>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
Any special reasons?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
indows. I'm hoping the core python library has
> a library for this. Note that I'll be using Python 3.0.
>
You can get Wget for Windows here:
http://gnuwin32.sourceforge.net/packages/wget.htm
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
1) time for 50 passes = 6.00515
This machine benchmarks at 83261.8 pystones/second
I tried many times, and get the same result.
Why optimization mode is slower than normal mode?
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
this is not an accepted
> and pythonic way of doing things then please let me know... and I'll
> stop!
>
how about this one:
>>> h = { "1" : "a\r", "2" : "b\n" }
>>> dict((k, h[k].strip()) for k in h)
{'1': 'a', '2': 'b'}
>>>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
gt; ','.join(string.ascii_lowercase)
'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z'
>>>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Aug 23, 2008 at 1:58 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Sat, 23 Aug 2008 01:47:23 +0800, Leo Jay <[EMAIL PROTECTED]> wrote:
>>
>> I'd like to read and write the same socket in different threads.
>> one thread is only used to read
te port, the program works.
But if the first element of the tuple is 's', the program doesn't work.
Is it possible to read and write the same socket in different threads?
Thanks in advance.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
ntation it should. But catching an exception
> can't be the standard way to stop iterating right?
>
you can use for loop:
for line in movie_iter:
...
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
r of python:
>>> a = 10
>>> b = 10
>>> a is b
False
>>> a == b
True
>>> a = 5
>>> b = 5
>>> a is b
True
>>> a == b
True
>>>
which is caused by small object cache mechanism.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
r("Content-Length", str(fs[6]))# <--
obviously, this is not the same with len(f.read()) in windows.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
y one manually.
>
> For those of you who work in C++, where do you go to discuss it
> online? I'm interested in any newsgroups, mailing lists, or web
> boards you can recommend.
>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
On 4/30/07, Leo Jay <[EMAIL PROTECTED]> wrote:
> i have a development board based on s3c2410 arm cpu. and i want to
> port python on it.
> after googling some threads, i successfully cross compiled python.
> but i still encountered a weird issue that when i ran
> /lib/pyth
i want to compile a python by myself, but after configure and make, it
seems that md5 is not built by default.
what should i do to compile md5 as an module?
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
push("world\n")
asyncore.loop()
s.join()
but the weirdest thing is, if i run python test_asynchat.py directly,
everything is ok.
anybody could help me?
thanks in advance.
ps, my linux box is an ubuntu 6.10.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
rint foo1(3)
print foo2(3)
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
"; % ('192.168.0.92', 31281))
start = datetime.now()
print server.test()
print server.test()
print server.test()
print server.test()
print 'total: ', datetime.now() - start
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
ing this com server in viusal c++?
a detailed sample of early binding would be better, thanks.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
I want to split a string like this:
'abc def "this is a test" ok'
into:
['abc', 'def', 'this is a test', 'ok']
is there any lib meet my need?
thanks
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
wxwindow correctly, i encountered
dozens of errors when installing wxpython.
i'm just a rookie that i have no idea about how to handle these errors.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
i do now?
i tried to import wx in python, but python just returned an error:
Traceback (most recent call last):
File "", line 1, in ?
ImportError: No module named wx
Anyone can help me, please?
Thanks
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
> connect = urllib.urlopen(url)
> data = connect.read()
> connect.close()
> return data
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
et/crew/theller/moin.cgi/Py2Exe correctly).
> Bytecode files extracted should be decompilable to something resembling
> original python code by a python decompiler (quick Googling finds
> "decompyle": http://www.crazy-compilers.com/).
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
Dear All,
I lost my source code because of my incaution.
so anyone can tell me how to decompile the exe file compiled by py2exe?
Thanks.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
est Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
IMO, python should use the decimal for default.
.25 is right for Decimal(".25").
isn't that better?
--
http://mail.python.org/mailman/listinfo/python-list
you may use the decimal module which was introduced in Python2.4
>>> from decimal import *
>>> li = [Decimal(".25"), Decimal(".10"), Decimal(".05"), Decimal(".01")]
>>> print li
[Decimal("0.25"), Decimal("0.10"), Decimal("0.05"), Decimal("0.01")]
>>>
--
http://mail.python.org/mailman/listinfo/p
when i use POP3.retr() in poplib module, the retr() function will not
return until the receiving progress is finished
so, is there any way to get the rate of receiving progress?
Thanks
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
35 matches
Mail list logo