***
Your mail has been scanned by InterScan MSS.
***
Hello,
I'm trying to get working an assertion which filter address from some domain
but if it's prefixed by '.com'.
Even trying to put the result in a negate test I can't get the wanted result.
The tou
Fixed...
Changed the collate() function to return None the same as sort() since it is an
in place collate.
A comment in _test() doctests was reversed. CAPS_FIRST option puts words
beginning with capitals before, not after, words beginning with lower case of
the same letter.
It seems I alw
Fulvio wrote:
> ... if deny.search(adr): cnt += 1
> ... if allow.search(adr): cnt += 1
hint: under what circumstances are "cnt" decremented in the above snippet?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Can you be specific on which URLs can I find "python-tools".
Cause I tried the one under easy_install, I still can't find it.
Thanks and hope to hear from you again.
-- Edward WIJAYA
SINGAPORE
From: [EMAIL PROTECTED] on behalf of Fredrik Lundh
Sent: Mon 1
Hi all
I have a list like:
>>> list
[1, 2, 3]
>>> list[1:]
[2, 3]
I want to get a string "2 3"
>>> str(list[1:])
'[2, 3]'
How can I do that ?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
On 18 Oct 2006 00:20:50 -0700, Jia Lu <[EMAIL PROTECTED]> wrote:
> I want to get a string "2 3"
>
> >>> str(list[1:])
> '[2, 3]'
>
> How can I do that ?
' '.join(str(i) for i in list[1:])
-- Theerasak
--
http://mail.python.org/mailman/listinfo/python-list
Jia Lu wrote:
> Hi all
>
> I have a list like:
>
list
> [1, 2, 3]
list[1:]
> [2, 3]
>
> I want to get a string "2 3"
>
str(list[1:])
> '[2, 3]'
>
> How can I do that ?
>
" ".join(str(x) for x in list)
-Travis
--
http://mail.python.org/mailman/listinfo/python-list
On Wednesday 18 October 2006 00:25, Fredrik Lundh wrote:
> |feature. the "exec" system call operates on a lower level than the
> |stdio buffering system.
I did in this manner:
for exe in ('imap4', 'pop3'):
if exe in cfgfil[optsrv + '.protocol']:
exe = exe[:4]; exe = 'cal
Lee Harr wrote:
> I understand how to create a property like this:
>
> class RC(object):
> def _set_pwm(self, v):
> self._pwm01 = v % 256
> def _get_pwm(self):
> return self._pwm01
> pwm01 = property(_get_pwm, _set_pwm)
>
>
> But what if I have a whole bunch of these pw
Wijaya Edward wrote:
> Can you be specific on which URLs can I find "python-tools".
> Cause I tried the one under easy_install, I still can't find it.
it's an RPM. you should be able to get it from where you get other
RedHat packages.
--
http://mail.python.org/mailman/listinfo/python-list
Fulvio wrote:
> ***
> Your mail has been scanned by InterScan MSS.
> ***
>
>
> Hello,
>
> I'm trying to get working an assertion which filter address from some domain
> but if it's prefixed by '.com'.
> Even trying to put the result in a negate test I can
Jia Lu wrote:
> Hi all
>
> I have a list like:
>
list
> [1, 2, 3]
list[1:]
> [2, 3]
>
> I want to get a string "2 3"
>
str(list[1:])
> '[2, 3]'
>
> How can I do that ?
http://effbot.org/zone/python-list.htm#printing
--
http://mail.python.org/mailman/listinfo/python-l
Could the "traits" package be of help?
http://code.enthought.com/traits/
Alexander Eisenhuth wrote:
> Hello,
>
> is there a assignement operator, that i can overwrite?
>
> class MyInt:
> def __init__(self, val):
> assert(isinstance(val, int))
> self._val = val
Michele Simionato wrote:
> Lee Harr wrote:
> > I understand how to create a property like this:
> >
> > class RC(object):
> > def _set_pwm(self, v):
> > self._pwm01 = v % 256
> > def _get_pwm(self):
> > return self._pwm01
> > pwm01 = property(_get_pwm, _set_pwm)
> >
> >
Carl Banks wrote:
> Lee Harr wrote:
> > I understand how to create a property like this:
> >
> > class RC(object):
> > def _set_pwm(self, v):
> > self._pwm01 = v % 256
> > def _get_pwm(self):
> > return self._pwm01
> > pwm01 = property(_get_pwm, _set_pwm)
> >
> >
> > But
Jia Lu wrote:
> Hi all
>
> I have a list like:
>
list
> [1, 2, 3]
list[1:]
> [2, 3]
>
> I want to get a string "2 3"
>
str(list[1:])
> '[2, 3]'
>
> How can I do that ?
>
> thanks
Just to be different from the other suggestions...
>>> a = [1, 2, 3]
>>> str(a[1:]).strip('[]'
Bruno Desthuilliers wrote:
> neoedmund wrote:
> (snip)
> > So I can reuse a method freely only if it's worth reusing.
> > For the word "inheritance", in some aspect, meanings reuse the super
> > class, with the condition: must reuse everything from super class.
>
> Not really. In fact, inheritance
George Sakkis wrote:
>
> Why is this less hidden or magical than a metaclass ?
Because it does not use inheritance. It is not going to create
properties on subclasses without
you noticing it. Also, metaclasses are brittle: try to use them with
__slots__, or with non-standard
classes (i.e. extensio
neoedmund wrote:
> ivestgating the web, i found something similiar with my approch:
> http://en.wikipedia.org/wiki/Duck_typing
> "Duck-typing avoids tests using type() or isinstance(). Instead, it
> typically employs hasattr() tests"
that's not entirely correct, though: in Python, duck-typing typ
Bruno Desthuilliers wrote:
> neoedmund wrote:
> (snip)
> > So I can reuse a method freely only if it's worth reusing.
> > For the word "inheritance", in some aspect, meanings reuse the super
> > class, with the condition: must reuse everything from super class.
>
> Not really. In fact, inheritance
George Sakkis wrote:
>
> from itertools import chain, izip, repeat
>
> def ByteProperties(*names, **defaulted_names):
> def byte_property(name, default):
> return property(lambda self: getattr(self, name, default),
> lambda self,v: setattr(self, name, v%256))
>
George Sakkis wrote:
> Michele Simionato wrote:
> > import sys
> >
> > def defprop(name, default=127):
> > loc = sys._getframe(1).f_locals
> > prop = '_%s' % name
> > def _set(self, v):
> > v_new = v % 256
> > setattr(self, prop, v_new)
> > def _get(self):
> >
Carl Banks wrote:
> Devil's Advocate: he did say "hidden magic TO YOUR CLASS".
>
> If you use a (real) metaclass, then you have the icky feeling of a
> class permanently tainted by the unclean metaclass (even though the
> metaclass does nothing other than touch the class dict upon creation);
> wher
George Sakkis wrote:
> There's a subtle common bug here: all _get and _set closures will refer
> to the last property only. You have to remember to write "def
> _set(self,v,prop=prop)" and similarly for _get to do the right thing.
Sorry. My mistake.
> By the way, I can't think of a case where t
Tommi wrote:
(please don't top-post - corrected)
>
>
> Alexander Eisenhuth wrote:
>> Hello,
>>
>> is there a assignement operator, that i can overwrite?
>>
>> class MyInt:
>> def __init__(self, val):
>> assert(isinstance(val, int))
>> self._val = val
>>
>> a = MyInt
Gabriel Genellina wrote:
> At Monday 16/10/2006 13:33, John Allman wrote:
>
>> If i manually import a module, this method works a treat, however if i
>> attempt to dynamically load a module at runtime the create method fails
>> with the following error:
>>
>> TypeError: 'NoneType' object is not ca
Fulvio wrote:
> I'm trying to get working an assertion which filter address from some domain
> but if it's prefixed by '.com'.
> Even trying to put the result in a negate test I can't get the wanted result.
[...]
> Seem that I miss some better regex implementation to avoid that both of the
> fi
Michele Simionato wrote:
> Carl Banks wrote:
> > Devil's Advocate: he did say "hidden magic TO YOUR CLASS".
> >
> > If you use a (real) metaclass, then you have the icky feeling of a
> > class permanently tainted by the unclean metaclass (even though the
> > metaclass does nothing other than touch
Hey everyone,
I've just started looking at Wax and have hit a problem I can't
explain. I want an app to respond to every character input into a
TextBox.
Here's a simple, working example:
+++
from wax import *
class MainFrame(VerticalFrame):
def Body(self):
self.search = TextBox(self)
>
> Hi I'm writing a python script that creates directories from user
> input.
> Sometimes the user inputs characters that aren't valid
> characters for a
> file or directory name.
> Here are the characters that I consider to be valid characters...
>
> valid =
> ':./,^0123456789abcdefghijklmno
Carl Banks wrote:
> Come on, I don't think anyone's under the impression we're being
> indiscriminate here.
Ok, but I don't think that in the case at hand we should recommend a
metaclass
solution.
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
>
> Python has a half dozen GUI toolkits, and multiple adapters for
> databases (some don't even follow DB-API2 specs). All independently
> written. So no, you are not going to find, say, a grid widget that
> automatically links to a database table/view/cursor, with bi-dir
*% a écrit :
> Is there a problem with the Python and wxPython web sites? I cannot
> seem to get them up, and I am trying to find some documentation...
>
> Thanks,
> Mike
All the sites hosted on sourceforge that rely on their vhost computer (
ie, site hosted on sourceforge that do n
"neoedmund" <[EMAIL PROTECTED]> writes:
> Bruno Desthuilliers wrote:
> > neoedmund wrote:
> > > in real life, a class is not defined so well that any method is
> > > needed by sub-class.
> >
> > Then perhaps is it time to refactor. A class should be a highly
> > cohesive unit. If you find yourself
On 2006-10-18, neoedmund <[EMAIL PROTECTED]> wrote:
> ivestgating the web, i found something similiar with my approch:
> http://en.wikipedia.org/wiki/Duck_typing
> "Duck-typing avoids tests using type() or isinstance(). Instead, it
> typically employs hasattr() tests"
It's pity it didn't get calle
Hi.
I want to create a portable setup.py file for windows / linux for an
extension package that i need to link with external libraries (gsl and
boost). on windows i do something like this:
imaging = Extension( 'pyag.imaging._imaging',
sources = ( glob.glob(
'Source/pyag/imagi
hi evrybody!
I wan't to multiply two square matrixes, and i don't understand why it
doesn't work.
Could you explain me?
def multmat(A,B):
"A*B"
if len(A)!=len(B): return "error"
D=[]
C=[]
for i in range(len(A)): D.append(0)
for i in range(len(A)): C.append(D)
for i in
Matthew Warren wrote:
>>> import re
>>> badfilename='£"%^"£^"£$^ihgeroighroeig3645^£$^"knovin98u4#346#1461461'
>>> valid=':./,^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '
>>> goodfilename=re.sub('[^'+valid+']',' ',badfilename)
to create arbitrary character sets, it's usually
"Sssasss" wrote:
> I wan't to multiply two square matrixes, and i don't understand why it
> doesn't work.
>
> def multmat(A,B):
>"A*B"
>if len(A)!=len(B): return "error"
>D=[]
>C=[]
>for i in range(len(A)): D.append(0)
>for i in range(len(A)): C.append(D)
append doesn't co
[EMAIL PROTECTED] wrote:
> hi, I have some values(say from -a to a) stored in a vector and I want
> to plot a histogram for those values. How can I get it done in python.
> I have installed and imported the Matplotlib package but on executing
> the code
> [N,x]=hist(eig, 10) # make a histogram
> I
On Oct 18, 2:42 am, Ron Adam <[EMAIL PROTECTED]> wrote:
> I put together the following module today and would like some feedback on any
> obvious problems. Or even opinions of weather or not it is a good approach.
,,,
def __call__(self, a, b):
""" This allows the Collate class work
You should use the s.translate()
It's 100x faster:
#Creates the translation table
ValidChars = ":./,^0123456789abcdefghijklmnopqrstuvwxyz"
InvalidChars = "".join([chr(i) for i in range(256) if not
chr(i).lower() in ValidChars])
TranslationTable = "".join([chr(i) for i in range(256)])
def valid_f
Fredrik Lundh wrote:
> "Sssasss" wrote:
>
> > I wan't to multiply two square matrixes, and i don't understand why it
> > doesn't work.
> >
> > def multmat(A,B):
> >"A*B"
> >if len(A)!=len(B): return "error"
> >D=[]
> >C=[]
> >for i in range(len(A)): D.append(0)
> >for i in
Perhaps I'm just bad at searching for bugs, but anyhow, I wanted
to know what you all thought about the following behavior.
A quick search of pydev archives yielded a nice wrapper to apply
to streams to perform decoding and encoding behind the scenes.
Assuming I get the correct encodings from some
Neil Cerutti wrote:
> On 2006-10-18, neoedmund <[EMAIL PROTECTED]> wrote:
>> ivestgating the web, i found something similiar with my approch:
>> http://en.wikipedia.org/wiki/Duck_typing
>> "Duck-typing avoids tests using type() or isinstance(). Instead, it
>> typically employs hasattr() tests"
>
On 2006-10-18 14:15:17 +0200, Sssasss wrote:
> Fredrik Lundh wrote:
> > "Sssasss" wrote:
> >
> > > I wan't to multiply two square matrixes, and i don't understand why it
> > > doesn't work.
> > >
> > > def multmat(A,B):
> > >"A*B"
> > >if len(A)!=len(B): return "error"
> > >D=[]
> > >
Hi there. I have been receiving MemoryErrors using the Windows version of
Python 2.5. The script I have written times the sending and the reception of
emails with various attachments.
I get many exceptions when using the IMAP downloads. This happens randomly;
sometimes the file downloads OK,
"Stephen G" <[EMAIL PROTECTED]> wrote:
> I get many exceptions when using the IMAP downloads. This happens
> randomly; sometimes the file downloads OK, and other times no.
> File "C:\Python25\lib\socket.py", line 308, in read
>data = self._sock.recv(recv_size)
>
> Is this a know bug or is t
Hi Andrea,
you should post this to the numpy list:
numpy-discussion@lists.sourceforge.net
Cheers! Bernhard
Andrea Gavana schrieb:
> Hello NG,
>
> I am using the latest Numpy release 1.0rc2 which includes F2PY. I
> have switched to Python 2.5 so this is the only alternative I have
> (IIUC).
Il 18 Oct 2006 04:17:29 -0700, Sssasss ha scritto:
> hi evrybody!
>
> I wan't to multiply two square matrixes, and i don't understand why it
> doesn't work.
Can I suggest a little bit less cumbersome algorithm?
def multmat2(A,B):
"A*B"
if len(A)!=len(B): return "error" # this check is
Sssasss wrote:
> hi evrybody!
>
> I wan't to multiply two square matrixes, and i don't understand why it
> doesn't work.
> Could you explain me?
>
> def multmat(A,B):
>"A*B"
>if len(A)!=len(B): return "error"
Wrong validation here: you _can_ multiply two matrices with a different
number
Thank you very much. I memoed all you views.
:)
--
http://mail.python.org/mailman/listinfo/python-list
I have PIL 1.1.5 on python 2.4.1 and I am attempting to get a smaller
(file size) of an image.
for example:
im = ImageGrab.grab()
im.save("tmp.gif") about 1.7mb
im.save("tmp.jpeg") about 290kb
anyways I want to save the image as a GIF, but not have it be so
largeso I thought th
"abcd" wrote:
>I have PIL 1.1.5 on python 2.4.1 and I am attempting to get a smaller
> (file size) of an image.
>
> for example:
> im = ImageGrab.grab()
>
> im.save("tmp.gif") about 1.7mb
> im.save("tmp.jpeg") about 290kb
>
> anyways I want to save the image as a GIF, but not have it
Fredrik Lundh wrote:
> GIF is horribly unsuitable for screenshots on modern machines. have you
> considered using PNG ?
>
> or even better, Flash?
well I am trying to take screenshots and make them into an animated
GIF, however, putting them into a Flash movie would be coolany idea
how to go
"abcd" wrote:
>> or even better, Flash?
>
> well I am trying to take screenshots and make them into an animated
> GIF, however, putting them into a Flash movie would be coolany idea
> how to go about doing either with python? (windows, possibly linux
> later)
to repeat myself:
here's a
oh and vnc2swf would not be an option, i cant be setting up a vnc
server, etc. just need to use python (and necessary packages).
animated gif would probably be best i am assuming.
--
http://mail.python.org/mailman/listinfo/python-list
OK,
well thank you for your help (merci pour ton aide!)
M.E.
MC wrote:
> Hi!
>
> It is the normal behavior of COM.
>
> Note that, Python being dynamic, you can modify Python script, OF THE
> INTERIOR, during execution.
>
> --
> @-salutations
>
> Michel Claveau
--
http://mail.python.org/mailm
Hi Experts,
Looking for a very quick bit on of advice on how to make some python
code run. I'm a newbie to both VBA and Python, so i apologise if this
is very easy but i'm about to tear my hair out after googling for the
last 3 days.
I have written a large python script which inside of it create
Hello all,
A quick question if I may. I'm running RHEL 4 on a x86_64 and I'm
curious if any of the packages at
http://www.python.org/download/releases/2.4/rpms/ would suite my
setup.
If they don't can I simply build from source and not overwrite
/usr/bin/Python (for the same reasons as listed at
Fredrik Lundh wrote:
> to repeat myself:
>
> here's a tool that lets you use VNC to capture the screen, and then
> convert
> the result to a flash animation:
>
>http://www.unixuser.org/~euske/vnc2swf/
>
>
is there a way to make animated GIFs with python? vnc2swf is to much
for w
Hi,
thanks for the reply,but unfortunately this does not work with the type
of classes I am dealing with. When trying to pickle the class I get the
following error:
File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex
raise TypeError("a class that defines __slots__ without "
TypeErr
Christopher Taylor wrote:
> A quick question if I may. I'm running RHEL 4 on a x86_64 and I'm
> curious if any of the packages at
> http://www.python.org/download/releases/2.4/rpms/ would suite my
> setup.
>
> If they don't can I simply build from source and not overwrite
> /usr/bin/Python (for t
How to execute a linux command by python?
for example: execute "ls" or "useradd oracle"
Who can help me? thank you!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
>
> On Oct 18, 2:42 am, Ron Adam <[EMAIL PROTECTED]> wrote:
>> I put together the following module today and would like some feedback on any
>> obvious problems. Or even opinions of weather or not it is a good approach.
> ,,,
> def __call__(self, a, b):
> ""
So just build it from source and use make altinstall instead? That simple huh?
Will I need to do anything else to make sure things are put in their
correct place?
Respectfully,
Christopher Taylor
On 10/18/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Christopher Taylor wrote:
>
> > A quick que
fredrik,
in other posts you have mentioned the use of gifmaker. i have tried
that with the following:
I am using gifmaker.py from PIL v1.1.5 on python 2.4.1.
CODE
import ImageGrab, gifmaker
seq = []
while keepOnGoing:
im =
[EMAIL PROTECTED] wrote:
> thanks for the reply,but unfortunately this does not work with the type
> of classes I am dealing with. When trying to pickle the class I get the
> following error:
>
> File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex
> raise TypeError("a class that def
Fredrik,
Thanks for the response. I did see that, but having been dated 2005 I thought
that it might have been patched. I am also sometimes getting the same problem
with the urllib.py module. T
his may have to do with the interaction between Python and the mobile
optimization client that I
[EMAIL PROTECTED] wrote:
> Hello all.
> I am desperately in need for you help guys. Here is the story:
> 1- I have created a small simple COM serve with python (along the lines
> read in Win32 Programming with python).
> 2- If I start the server and call a function from VBE everything works
> fine
Rob Wolfe wrote:
...
> def filter(adr):# note that "filter" is a builtin function also
> import re
>
> allow = re.compile(r'.*(?|$)') # negative lookbehind
> deny = re.compile(r'.*\.com\.my(>|$)')
> cnt = 0
> if deny.search(adr): cnt += 1
> if allow.search(adr): cnt +=
haishan chang wrote:
> How to execute a linux command by python?
> for example: execute "ls" or "useradd oracle"
> Who can help me?
start here:
http://www.python.org/doc/lib/
--
http://mail.python.org/mailman/listinfo/python-list
Stephen G wrote:
> I am hesitant to make any changes to the python libraries as
> I need to distribute these scripts with a standard Python install.
well, you could at least check if the suggestions in that thread makes
the problem go away...
(if so, shipping a patched version with your progra
[EMAIL PROTECTED] wrote:
> Hi,
>
> thanks for the reply,but unfortunately this does not work with the type
> of classes I am dealing with. When trying to pickle the class I get the
> following error:
>
> File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex
> raise TypeError("a class t
How can I add two dictionaries into one?
E.g.
a={'a:1}
b={'b':2}
I need
the result {'a':1,'b':2}.
Is it possible?
Thank you
L.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> start here:
>
> http://www.python.org/doc/lib/
make sure you skim though the *entire* list. when you've done that, see
the "process management" section in the "os" module documentation (make
sure to read the entire page before you decide which API to use), and
als
On 18 Oct 2006 08:24:27 -0700, Lad <[EMAIL PROTECTED]> wrote:
> How can I add two dictionaries into one?
> E.g.
> a={'a:1}
> b={'b':2}
>
> I need
>
> the result {'a':1,'b':2}.
>>> a={'a':1}
>>> b={'b':2}
>>> a.update(b)
>>> a
{'a': 1, 'b': 2}
--
Cheers,
Simon B
[EMAIL PROTECTED]
http://www.brunn
> ... every run of doctest after the first is verbose ...
> *** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
Another path to the same bug:
import doctest
print doctest.testfile(__file__, verbose=False)
print doctest.testfile(__file__, verbose=False)
Mystifiedly yours, rank
Lad wrote:
> How can I add two dictionaries into one?
> E.g.
> a={'a:1}
> b={'b':2}
>
> I need
>
> the result {'a':1,'b':2}.
>
> Is it possible?
>
> Thank you
> L.
>
>
Yes, use update. Beware that this modifies a dictionary in place rather
than returning a new dictionary.
>>> a={'a':1}
>>> b={
> How can I add two dictionaries into one?
> E.g.
> a={'a:1}
> b={'b':2}
>
> I need
>
> the result {'a':1,'b':2}.
>>> a.update(b)
>>> a
{'a':1,'b':2}
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi Experts,
>
> Looking for a very quick bit on of advice on how to make some python
> code run. I'm a newbie to both VBA and Python, so i apologise if this
> is very easy but i'm about to tear my hair out after googling for the
> last 3 days.
>
> I have written a large
Thanks for your advice on this matter,
I'm actually using Excel 2003!! so it shows how much i know!
i did manage to get the prog to run with the line
xl.Application.Run("CTP.xla!sheet1.CTP")
but it didn't do anything... i'm guessing it is along the lines of wht
you were saying earlier about big
dict(a.items() + b.items())
Lad wrote:
> How can I add two dictionaries into one?
> E.g.
> a={'a:1}
> b={'b':2}
>
> I need
>
> the result {'a':1,'b':2}.
>
> Is it possible?
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 18 Oct 2006 08:24:27 -0700, Lad wrote:
> How can I add two dictionaries into one?
> E.g.
> a={'a:1}
> b={'b':2}
>
> I need
>
> the result {'a':1,'b':2}.
>
> Is it possible?
What should the result be if both dictionaries have the same key?
a={'a':1, 'b'=2}
b={'b':3}
should the result
After just running trying that update it hits the macro perfectly but
hten i get an error message after i type in a couple of values.. as per
below
Traceback (most recent call last):
File "", line 148, in ?
File ">", line 14, in Run
File "C:\Python24\Lib\site-packages\win32com\client\dynamic
abcd wrote:
> ...
Are you sure you can't use VNC? An animated GIF based on full-screen
grabs will be amazingly huge and have very low color quality at the
same time.
Installing VNC on Windows should take you about 30 seconds, honest.
Or is this for some sort of project where you can't use anyth
Hello all,
Being relatively new to linux I'm a little confused about what options
I need to use to build python from source.
Currently, I have python installed as part of the inital RHEL4 load
located at /usr/bin/Python and /usr/bin/Python2.3 . Some of the files
are located in /usr/lib64/Python2
Brett Hoerner wrote:
> Are you sure you can't use VNC? An animated GIF based on full-screen
> grabs will be amazingly huge and have very low color quality at the
> same time.
>
> Installing VNC on Windows should take you about 30 seconds, honest.
>
> Or is this for some sort of project where you c
Tim Chase wrote:
> > How can I add two dictionaries into one?
> > E.g.
> > a={'a:1}
> > b={'b':2}
> >
> > I need
> >
> > the result {'a':1,'b':2}.
>
> >>> a.update(b)
> >>> a
> {'a':1,'b':2}
>
> -tkc
Thank you ALL for help.
However It does not work as I would need.
Let's suppose I have
a={'c'
> However It does not work as I would need.
> Let's suppose I have
>
> a={'c':1,'d':2}
> b={'c':2}
> but
> a.update(b)
> will make
> {'c': 2, 'd': 2}
>
> and I would need
> {'c': 3, 'd': 2}
Ah...a previously omitted detail.
There are likely a multitude of ways to do it. However, the one
th
Steven,
Thank you for your reply and question.
>
> What should the result be if both dictionaries have the same key?
The answer: the values should be added together and assigned to the key
That is
{'a':1, 'b':5}
( from your example below)
Is there a solution?
Thanks for the reply
L.
>
> a={'a':
Lad wrote:
> Let's suppose I have
>
> a={'c':1,'d':2}
> b={'c':2}
> but
> a.update(b)
> will make
> {'c': 2, 'd': 2}
>
> and I would need
> {'c': 3, 'd': 2}
>
> (because `c` is 1 in `a` dictionary and `c` is 2 in `b` dictionary, so
> 1+2=3)
>
> How can be done that?
dict([(k, a.get(k, 0) + b.ge
Bruno Desthuilliers wrote:
> Tommi wrote:
> (please don't top-post - corrected)
>>
>> Alexander Eisenhuth wrote:
>>> Hello,
>>>
>>> is there a assignement operator, that i can overwrite?
>>>
>>> class MyInt:
>>> def __init__(self, val):
>>> assert(isinstance(val, int))
>>>
Lad wrote:
> The answer: the values should be added together and assigned to the key
> That is
> {'a':1, 'b':5}
> ( from your example below)
>
> Is there a solution?
have you tried coding a solution and failed, or are you just expecting
people to code for free?
--
http://mail.python.org/mai
Alexandre Guimond wrote:
> so my question is: what is the right way of specifying extensions
> options (include_dirs, libraries, library_dirs) so that they are
> portable between windows and linux? i'm thinking environment variables.
The user can already use command-line options and CFLAGS if he
David wrote:
> Il 18 Oct 2006 04:17:29 -0700, Sssasss ha scritto:
>
> > hi evrybody!
> >
> > I wan't to multiply two square matrixes, and i don't understand why it
> > doesn't work.
> Can I suggest a little bit less cumbersome algorithm?
>
> def multmat2(A,B):
> "A*B"
> if len(A)!=len(B):
Roberto Bonvallet wrote:
> Sssasss wrote:
> > hi evrybody!
> >
> > I wan't to multiply two square matrixes, and i don't understand why it
> > doesn't work.
> > Could you explain me?
> >
> > def multmat(A,B):
> >"A*B"
> >if len(A)!=len(B): return "error"
>
> Wrong validation here: you _can
On Wed, 18 Oct 2006 09:31:50 -0700, Lad wrote:
>
> Steven,
> Thank you for your reply and question.
>
>>
>> What should the result be if both dictionaries have the same key?
> The answer: the values should be added together and assigned to the key
> That is
> {'a':1, 'b':5}
> ( from your example
> > How to execute a linux command by python?
> > for example: execute "ls" or "useradd oracle"
> > Who can help me?
>
> start here:
>
> http://www.python.org/doc/lib/
>
And continue here:
http://www.python.org/doc/lib/os-process.html
--
http://mail.python.org/mailman/listinfo/python-list
RHEL comes with Python2.3 installed. A program I need to install
requires Python2.4
So I got Python2.4 from source and compiled it up. I configured it
with --prefix=/usr --exec-prefix=/usr and --enable-unicode=ucs4 . I
then make'd it and then make altinstall so that it didn't overwrite
the /us
1 - 100 of 207 matches
Mail list logo