On Wed, May 29, 2019 at 1:19 PM Sri Tharun wrote:
> Why I am unable to install packages
>
If you really want to get help from the list,please give us more info.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, August 4, 2016 at 8:54:35 PM UTC-7, Bo Stone wrote:
> I installed Python 2.7 on SLES 11 box that previously was running Python 2.6.
> To do so I used a script described in this post
> (http://stackoverflow.com/a/11371726/135946) and run it as a root user.
> Everything w
I installed Python 2.7 on SLES 11 box that previously was running Python 2.6.
To do so I used a script described in this post
(http://stackoverflow.com/a/11371726/135946) and run it as a root user.
Everything went well but when it was done I discovered few issues:
1. No symbolic links were crea
I want to parse a file and do this :
A 74.335 -86.474-129.317 1.00 54.12
then add space between -86.474 and -129.317. I can get the file with
A 74.335 -86.474 -129.317 1.00 54.12
How can I do this? Thanks.
--
Best regards,
Zhang Bo (Cindy)
SMA-CSB
--
http://mail.python.org
hi
i wanna paginate my table (x lines per pages),the size of my table is changing
according to the user.
i wanna know if paginator.py can help me ,if yes how?
some one can help me
ps:i use django
thank you
_
Découvrez Windows Live
-> 3.0
3.6 -> 4.0
3.5 -> 4.0
2.5 -> 2.0
-0.5 -> 0.0
-1.5 -> -2.0
-1.3 -> -1.0
-1.8 -> -2.0
-2.5 -> -2.0
--Pièce jointe du message transmise--
From: [EMAIL PROTECTED]
To: python-list@python.org
Date: Fri, 11 Apr 2008 09:07:42 -0400
Subject: Re: (unknown)
ha bo wrote:
>
hi i use this programme in my application django:
import structMASK_CCITT = 0x1021 # CRC-CCITT mask (ISO 3309, used in X25,
HDLC)MASK_CRC16 = 0xA001 # CRC16 mask (used in ARC files)def updcrc(crc,
data, mask=MASK_CRC16): data_length = len(data) unpackFormat = '%db' %
data_lengt
I want to port a Python project (about 10,000 line python code) to C+
+. Is there any automatically tool to do this kind of things? e.g.,
SWIG(http://www.swig.org/)?
Any comment is welcome!
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
rough it to debug it. Any suggestions on
how to do it?
Thanks a bunch.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
> BTW-It helps us out here if you let us know what platform you
> are running on (e.g. Windows, Linux, Mac, etc.).
>
> -Larry
Sorry... I'm running on windows XP.
- Michael
--
http://mail.python.org/mailman/listinfo/python-list
Hi.
Can anyone guide me on how to minitor a folder for new files? And when
they appear I need to run and externe program with the file just
created (buy a 3rd program).
- Michael Bo
--
http://mail.python.org/mailman/listinfo/python-list
ever necesary, usually all distutils commands
> operate on relative paths (relative to location of setup.py for source
> files, relative to some meaningful directory for targets).
I read that page but I am not using package so things are installed to
site-packages directly. What should I put
> directory. After all, this directory is configurable.
So nobody has ever done this???
Bo
--
http://mail.python.org/mailman/listinfo/python-list
t how exactly should I do it? I installed VC8 and get the all-familiar
error message: Python was built with Visual Stuidio 2003
Actually, I get a copy of VC6/2003 but this compiler can not compile
boost 1.33.1/serialization so it can not be used to compile my extension
module.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
...
(http://msdn2.microsoft.com/en-us/visualc/aa336490.aspx)
Can I use the 2005 version to build python extension? What is the
official or recommended way to build python extension module under windows?
Many thank in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
directory. After all, this directory is configurable.
I guess I need to determine /path/to/site-package for
setup(
...
ext_modules = [...]
data_files = [ ('/path/to/site-package', ['mydll.dll]) ]
)
using something like distutil.config.get_dest_dir().
Many thanks
Thank you , Max !
I think HarvestMan is just what I need !
Thanks again !
--
http://mail.python.org/mailman/listinfo/python-list
such as text findings
and substitutions .
Thanks in advance !
Bo
--
http://mail.python.org/mailman/listinfo/python-list
You could use a python file and use the builtin import facility to read
in configurations.
from http://dirtsimple.org/2004/12/python-is-not-java.html
... in Python, more often than not, code is easier to write
than XML. And Python can process code much, much
faster than your code can proc
Hi everyone ,
I have join this list for about 4 months , and everyday I receive
hundreds of
mails . There is no means to read all of them , so I just read something
interesting
for me . But if so , there are too much mails pile up in my inbox , I
want to ask
how do you use this list , reading every
I think if you know java language very well but feel suffering with the
error prone javascript ,
GWT is good choose for AJAX development .
With the well-known IDE Eclipse your development time efficiency will
promote fast !
--
http://mail.python.org/mailman/listinfo/python-list
It works , thank you everyone !
I think there is much more I need to learn before I can grasp a full
understand of the C/S modle !
Thanks again !
--
http://mail.python.org/mailman/listinfo/python-list
Hi ,
I am confronted with an odd question in the python cgi module !
Below is my code :
import cgitb ; cgitb.enable()
import cgi
print "Hello World !"
How easy the script is , and the url is 202.113.239.51/vote/cgi/a.py
but apache give me a 'Server internal error !'
and the error log is :
[Fr
ke it as a ring , and fetch any continuous 2 numbers from it ,
finally get four combinations :
11 , 10 , 00 , 01
and they are 3 , 2 , 0 , 1 .
I hope this time it is clear for all to understand what problem confront
me .
And again I am sorry for the trouble , thanks for you again !
Best Rega
as a ring , and fetch any continuous 2 numbers from it ,
finally get four combinations :
11 , 10 , 00 , 01
and they are 3 , 2 , 0 , 1 .
I hope this time it is clear for all to understand what problem confront
me .
And again I am sorry for the trouble , thanks for you again !
Best Regard
Bo
Hi ,
I have writen a python program to slove a problem described as below:
(Forgive my poor English !)
Put the 2^n 0 or 1 to form a ring , and we can select any continuous n
ones from
the ring to constitute a binary number . And obviously we can get 2^n
selections ,
so the question is :
Given a n
John Salerno 写道:
> I probably should find an RE group to post to, but my news server at
> work doesn't seem to have one, so I apologize. But this is in Python
> anyway :)
>
> So my question is, how can find all occurrences of a pattern in a
> string, including overlapping matches? I figure it ha
Bo Peng wrote:
> How can I let setup.py build these boost libraries separately so that I
> can link them to my modules? This will also save some link time because
> all my python modules link to the same boost libraries.
Although this is nowhere documented, I find that I can
thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Andrew MacIntyre <[EMAIL PROTECTED]> wrote:
> Dean wrote:
> > I've been trying to make python a dynamic library. I downloaded Python
> > 2.4.3 Final from the Python web site and I cannot get it to create the
> > library.
> >
> > I've tried using the directive:
>
RM 写道:
> This is from the new KOffice Announcement.
>
> http://www.koffice.org/announcements/announce-1.5.php
>
> '''This version of KOffice features a start of a unified scripting
> solution called Kross. Kross provides cross-language support for
> scripting (thus its name) and at present supports
Serge Orlov 写道:
> Bo Yang wrote:
>
>> Hi ,
>> Recently I use python's urllib2 write a small script to login our
>> university gateway .
>> Usually , I must login into the gateway in order to surf the web . So ,
>> every time I
>> start my co
Fuzzyman 写道:
> Bo Yang wrote:
>
>> Hi ,
>> Recently I use python's urllib2 write a small script to login our
>> university gateway .
>> Usually , I must login into the gateway in order to surf the web . So ,
>> every time I
>> start my computer ,
Hi ,
Recently I use python's urllib2 write a small script to login our
university gateway .
Usually , I must login into the gateway in order to surf the web . So ,
every time I
start my computer , it is my first thing to do that open a browser to
login the gateway !
So , I decide to write such a s
Hello ,
I want to develop an application to record some of the best words and
ideas in the web when I surfing with the Firefox or IE .
I would like the application have such a GUI :
1.it appear in the system tray area in the Windows ;
2.whenever I select some words (ether in an IE or MS word),I hop
Rich said :
> Hi,
>
> (this is a probably a bit OT here, but comp.lang seems rather
> desolated, so I'm not sure I would get an answer there. And right now
> I'm in the middle of learning Python anyway so...)
>
> Anyway, my question is: what experience you people have with working
> with different
cstring
4. insert the docstring into SWIG interface file
I can send you the parser but I do not know if pyrex support python
docstring.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
Paul Novak :
> A lot of the complexity of design patterns in Java falls away in
> Python, mainly because of the flexibility you get with dynamic typing.
>
I agree with this very much !
In java or C++ or all such static typing and compiled languages , the
type is fixed on
in the compile phrase ,
Paul Novak 写道:
> A lot of the complexity of design patterns in Java falls away in
> Python, mainly because of the flexibility you get with dynamic typing.
>
I agree with this very much !
In java or C++ or all such static typing and compiled languages , the
type is fixed on
in the compile phrase ,
table way to do it (max, win32).
Does anybody know a quick way under windows?
Bo
--
http://mail.python.org/mailman/listinfo/python-list
interruption. I have to kill python explicitly.
If this is a known behavior or just a special case of mine? Any fix to
it? I am using python 2.3.4 under Redhat EL4 with gcc 3.3.4.
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I know in java , we can use
class.ForName("classname")
to get an instance of the class 'classname' from a
string , in python , how do I do that ?
Thanks in advance !
--
http://mail.python.org/mailman/listinfo/python-list
Thank you very much !
--
http://mail.python.org/mailman/listinfo/python-list
Hello everybody ,
I am a student major in software engeering .
I need to do something for my course .
There are very good web framework for java and ruby ,
Is there one for python ?
I want to write a web framework for python based on
mod_python as my course homework , could you give some
advise ?
e use
raw_input and eval but I will lose the convenience of a real shell.
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
I think I find what I need:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/355319
Bo
--
http://mail.python.org/mailman/listinfo/python-list
am out of idea how to fix it since the nature of my
algorithm is working randomly on large arrays.
Cheers,
Bo
--
http://mail.python.org/mailman/listinfo/python-list
advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
Bo Peng wrote:
> Does anyone know why commandline/IDLE cause this
> problem, while PythonWin does not? I am interested to know what I can do
> in commandline (or in rpy) to fix this problem.
Just note that R/plot works fine both from command window and a R-GUI.
Bo
--
http://mail.p
w why commandline/IDLE cause this
problem, while PythonWin does not? I am interested to know what I can do
in commandline (or in rpy) to fix this problem.
Regards,
Bo
--
http://mail.python.org/mailman/listinfo/python-list
Bo Peng wrote:
>> Sorry, are you saying that the code you posted does NOT have a memory
>> leak, but you want us to find the memory leak in your real code sight
>> unseen?
Problem found. It is hidden in a utility function that converts the
return value to a double. The re
out why val[0], readonly access to a tuple
element, can cause this kind of problem.
Anyway, is there a way to list all or newly added python objects? I
guess I can trace the ref_cnt of the tuple element manually.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
Dear list,
I spent the last 12 hours in catching this bug (?) and what I found out
is very difficult to explain:
Basically, I need to call a user-provided function many times, with a
tuple as parameter.
C/C++ side: (class A, constructed using a python function m_func)
// create in the con
e('Tkinter'):
tkGUI()
else:
cml()
After a user loads this module (without wx loaded automatically as
before), he can call cml() or GUI().
Bo
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen wrote:
> Bo Peng wrote:
>
>> Is there a better way than doing
>>
>> try:
>>import aModule
>> except:
>>has_aModule = False
>> else:
>>has_aModule = True
>>
>> The main concern here is that loading aModule i
Dear list,
Is there a better way than doing
try:
import aModule
except:
has_aModule = False
else:
has_aModule = True
The main concern here is that loading aModule is unnecessary (and may
take time).
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
;
> Or you can always do something like:
>
> self.assertRaises(ValueError, lambda: myfunc(arg1,arg2, arg3, arg4, abc=0,
> foo=1, bar="hello"))
This is also useful.
I now have nothing to complain against assertTaises. :-)
Bo
--
http://mail.python.org/mailman/listinfo/python-list
ept?
Thanks.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> replacing sys.stdin with something that isn't a TTY will fix this.
This works like magic! Thank you!
Bo
--
http://mail.python.org/mailman/listinfo/python-list
; you
> want.
This method works fine with only one minor problem. It would stop
(waiting for user input) at help(str) command. I will have to find a way
to feed the program with'q' etc.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
e + "\n"
> co = code.compile_command(script, "", "exec")
> if co:
> # got a complete statement. execute it!
> exec co
> script = ""
> prompt = ">>>"
> else:
>
script.
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
es not look so bad in this case.
Thanks.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
many of these things do you have?
I have around 10 of them. Using these if/else, it will take 50 lines for
a function call. It also bothers me to have 10 variables left in the
namespace, in addition to finding 10 meaningful names.
The FAQ provides two solutions, neither of them are el
Python?
BTW, I do not want to use the following since all of a,b,c,d etc will be
evaluated.
def condValue(cond, val1,val2):
if cond:
return val1
else:
return val2
func(condValue(cond1,a,b), condValue(cond2,c,d),...)
Thanks.
Bo
--
http://mail.python.org/mailman/listinfo/python
;, but they don't
> explain why str([x]) != '[%s]' % x .
>
I am new to Python but has experience with other languages. I am quite
aware of 'why-are-floating-point-calculations-so-inaccurate'. I would
not be surprised if
>>> str[0.0002)
0.00020
As
a matter of fact, this python list is the most friendly mailinglist I
have ever joined. Thanks!
Bo
--
http://mail.python.org/mailman/listinfo/python-list
r([0.0002])
'[0.00020001]'
>>> str(0.0002)
'0.0002'
Is there any way to fix this, other than checking the type of everything
and output with %.4f?
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
r myModule. Since wxPython uses this method, I suppose this
is the standard approach for this problem.
Thanks.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
>>> import param
>>> param.setParam('lib','standard')
>>> from myModule import *
in myModule.py
--
from param import para
try:
lib = para['lib']
except:
lib = 'standard'
...
Is there an establish
Kent Johnson wrote:
Bo Peng wrote:
def func(output=''):
output(output=output)
Naturally, I get 'str' object is not callable. Is there a way to tell
func that the first output is actually a function? (like in C++,
::output(output) )
You could use a default argum
function may cause confusion.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
n
keyword parameter output
def func(output=''):
output(output=output)
Naturally, I get 'str' object is not callable. Is there a way to tell
func that the first output is actually a function? (like in C++,
::output(output) )
Thanks.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
performance is
acceptable.
Thanks.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
= df( a, [80, 1], 0) + df( a, [80,2], 0) + df( a, [80, 3], 0)
would work if df is defined as
def df(a, idx, default):
try:
for i in range(0, idx):
a = a[ idx[i] ]
return a
except:
return 0
but I am afraid that a for loop would bring serious performance problem.
Thanks.
Bo
acceses? (automatic wrapping a[...] as
try:
a[...]
except:
0
)
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
python.sty is causing the problem but can
not fix it. (I get errors when commenting out this block of code.) Does
anyone know what is happening here?
Note that the subscripts are OK if I use other classes like report.cls.
Many thanks in advance.
Bo
% in python.sty
Kent Johnson wrote:
Bo Peng wrote:
Exec is slow since compiling the string and calls to globals() use a
lot of time. The last one is most elegant but __getattr__ and
__setattr__ are costly. The 'evil hack' solution is good since
accessing x and y takes no additional time.
Previous
10.0000.0000.1000.100 profile:0(fun4(a))
00.000 0.000 profile:0(profiler)
10.0000.0000.0000.000
python-10176e-N.py:6(__init__)
10.1000.1000.1000.100 python-10176rIU.py:1(fun4)
Since
d['x'] is fast but cumbersome
exec "z=x+y' is still slow.
exec "locals().update(d)" is evil
d.x is elegant and only a little slower than d['x']
I am announcing the winner of the contest: dictwrap! (applause)
Bo
--
http://mail.python.org/mailman/listinfo/python-list
y more items
than just x and y. So, if there is are other items in the dictionary
>>> a = {'x':1, 'y':2, 'else':4}
>>> f(a,**a)
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/tmp/python-10176RtT.py", line 1, in ?
f(a,**a)
TypeError: f() got an unexpected keyword argument 'else'
Bo
--
http://mail.python.org/mailman/listinfo/python-list
any
value in the dictionary, original or calculated, in a uniform and
easier way! This makes my program instantly easier to use.
I can not say enough thank you for this.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
anguages, be a good addition to python? For example,
with d do:
z = x + y
would be equivalent to d['z']=d['x']+d['y'] or d.z = d.x + d.y in some
other cases.
This would absolutely be the *best* solution to my problem.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
error prone. If I have to use this code, I
would write
_z = func(_x + _y + _whatever['as'] + _a[0])
and use a perl script to generate the real code. (See, I am not lazy :-)
Bo
--
http://mail.python.org/mailman/listinfo/python-list
e. The last one is most elegant but __getattr__ and __setattr__
are costly. The 'evil hack' solution is good since accessing x and y
takes no additional time.
I guess I will go with solution 3. It is evil but it is most close to my
original intention. It leads to most readable code (except for the first
line to do the magic and the last line to return result) and fastest
performance.
Thank again for everyone's help. I have learned a lot from the posts,
especially the wrapdict class.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
sible
since involved number of items are huge.
It is basically like
exec 'statements' in d
but a function with local dictionary d would be best.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
you could use exec:
Yes. I thought of using exec or eval. If there are a dozen statements,
def fun(d):
exec 'z = x + y' in globals(), d
seems to be more readable than
def fun(d):
d['z'] = d['x'] + d['y']
But how severe will the performance penalty be?
Bo
--
http://mail.python.org/mailman/listinfo/python-list
M.E.Farmer wrote:
def fun(d):
... __dict__ = d
... return __dict__
hth,
Does not work?
>>> a = { 'x':1, 'y':2}
>>> b = { 'x':2, 'y':9}
>>> def fun(d):
... __dict__ = d
... print locals()
... z = x + y
>>> fun(a)
{'__dict__': {'y': 2, 'x': 1}, 'd': {'y': 2, 'x': 1}}
Traceback (most re
ict as local namespace
# locals() = dict?
z = x + y
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
current approach. Could anyone tell me
some better (more standard) way?
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
I have a number of files compiled to bytecode using py_compile.compile().
The .pyc files can be invoked by python directly ($python file.pyc), but
"loading" them by execfile just throws an exception ?
Any suggestions
Bo.
--
http://mail.python.org/mailman/listinfo/python-list
Dear list,
I was using autoconf/automake etc to build my python extension. Since
distutil seems to be easier, I have switched to this method. However,
when I build the module under windows, I am told that compiler version
mismatch... I am using msvc 7 and python was build by msvc 6.0.
I am not
hanged) according to this flag and the new
module works well.
Thank everyone for the help. especially in thie new year's day.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
Craig Ringer wrote:
On Sat, 2005-01-01 at 08:18, Bo Peng wrote:
Python's array module is built-in, easy to use, but *without* a
FromLenAndData function! Even the buffer interface provides only 'get
buffer' but no 'set buffer' functions. Could anyone tell me how I ca
enAndData.
Many thanks in advance.
Bo
--
http://mail.python.org/mailman/listinfo/python-list
94 matches
Mail list logo