Bittorrent RPM Dependency Problem

2006-01-20 Thread Mark Sargent
Hi All,

tried to install the RPM for bittorrent, and got the following,


[EMAIL PROTECTED] bittorrent]# rpm -Uvh
BitTorrent-4.2.2-1-Python2.3.noarch.rpm
error: Failed dependencies:
python(abi) = 2.3 is needed by BitTorrent-4.2.2-1.noarch
[EMAIL PROTECTED] bittorrent]# python -V
Python 2.3.4


why is this so, when I have 2.3.4. Is this RPM only compatible with 2.3,
not 2.3.-4? Little confused. Cheers.

Mark Sargent.
-- 
http://mail.python.org/mailman/listinfo/python-list


Newbie Here

2005-05-30 Thread Mark Sargent
Hi All,

I'm taking the plunge into Python. I'm currently following this tutorial,
http://docs.python.org/tut/
I am not a programmer in general, although I've learnt a bit of bash 
scripting and some php/asp. I want to get into python to use it for 
Linux/Unix related stuff. A question I have, is, those of you who use it 
for the same things, what do you primarily use it for. Could you show me 
some examples.? I find the hardest thing with programming, is not 
remember the syntax/logic etc, but, when to use it. Perhaps that is also 
a personal thing, but, I'd love to see some basic examples out there. 
Cheers.

Mark Sargent.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [ANN] IPython 0.6.14.

2005-05-31 Thread Mark Sargent
Fernando Perez wrote:

>Hi all,
>
>I've just made the 0.6.14 release of IPython, mostly to fix the
>inevitable bugs reported after the .13 one (though one big improvement
>sneaked by).
>
>IPython's homepage is at:
>
>http://ipython.scipy.org
>
>and downloads are at:
>
>http://ipython.scipy.org/dist
>
>I've provided RPMs (for Python 2.3 and 2.4, built under Fedora Core 3),
>plus source downloads (.tar.gz).  Fedora users should note that IPython
>is now officially part of the Extras repository, so they can get the
>update from there as well (though it may lag by a few days).
>
>There is also a native win32 installer which should work correctly for
>both Python 2.3 and 2.4.
>
>Debian, Fink and BSD packages for this version should be coming soon, as
>the respective maintainers (many thanks to Jack Moffit, Andrea Riciputi
>and Dryice Liu) have the time to follow their packaging procedures.
>
>Many thanks to Enthought for their continued hosting support for
>IPython, and to all the users who contributed ideas, fixes and reports.
>
>I'd like to add a special thanks to Denis Rivière, Yann Cointepas and
>Benjamin Thyreau for their hard work on the Qt improvements, and for
>their overall hospitality.  Python really seems to have a remarkably
>friendly community, worldwide!
>
>
>WHAT is IPython?
>
>
>1. An interactive shell superior to Python's default. IPython has many
>features for object introspection, system shell access, and its own 
>special command system for adding functionality when working interactively.
>
>2. An embeddable, ready to use interpreter for your own programs. 
>IPython can be started with a single call from inside another program, 
>providing access to the current namespace.
>
>3. A flexible framework which can be used as the base environment for 
>other systems with Python as the underlying language.
>
>
>Release notes
>-
>
>As always, the NEWS file can be found at http://ipython.scipy.org/NEWS,
>and the full ChangeLog at http://ipython.scipy.org/ChangeLog.  The
>highlights of this release follow.
>
>This is mainly a bugfix release, to clean up the problems reported in
>0.6.13.  As I said at the time, I intend to start new development now
>(more details on that in a separate email).  As always, however, a few
>new goodies managed to sneak by.
>
>* A new -qthread option to support controlling Qt apps from within
>ipython, similar to what -gthread and -wthread do for GTK/WX.  This was
>contributed by Denis Rivière , Yann Cointepas
> and Benjamin Thyreau .
>   Many thanks to them!  The lack of Qt support was a glaring omission of
>ipython's gui features, so I'm extremely happy to have their contribution.
>
>For those of you who may be matplotlib users as well, I should note
>that as of mpl 0.81 (the next release, or use current CVS), the -pylab
>option will also support interactive matplotlib use with the Qt backend.
>   This is also thanks to work done by Denis, Yann and Benjamin against
>the matplotlib Qt backend, in conjunction with the IPython improvements.
>
>* New -e option to %run to suppress tracebacks from sys.exit() calls.
>This can be very useful to silence all the noise generated when running
>unittests from within ipython.
>
>* New ';' escape to autoquote a line without splitting:
>
>In [6]: ,foo a b c
>--> foo("a", "b", "c")
>
>In [7]: ;foo a b c
>--> foo("a b c")
>
>In the process, I fixed ',' quoting, which I'd broken in .13.
>
>* Fix -wthread to work with WXPython 2.6 (this also impacts matplotlib
>users who run the WX backend).
>
>* Added new matcher (it goes at the end of the priority list) to do
>tab-completion on named function arguments.  Submitted by George Sakkis
>.  See the thread at
>
>http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
>
>for more details.
>
>* Various other fixes for obscure bugs, but all of which caused reported
>IPython crashes.  Details in Changelog.
>
>
>Enjoy, and as usual please report any problems.
>
>Regards,
>
>Fernando.
>
>  
>
Hi All,

Fernando, if I may ask, as I'm a Fedora3 user. You mention that there 
are RPMs for FC3, for Python2.3, 2.4. I'm new to Python. Is IPython 
built into FC3s Python or is it a stand-alone program.? Sorry for 
troubling you with this. Cheers.

Mark Sargent.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [ANN] IPython 0.6.14.

2005-05-31 Thread Mark Sargent
Mark Sargent wrote:

>Fernando Perez wrote:
>
>  
>
>>Hi all,
>>
>>I've just made the 0.6.14 release of IPython, mostly to fix the
>>inevitable bugs reported after the .13 one (though one big improvement
>>sneaked by).
>>
>>IPython's homepage is at:
>>
>>http://ipython.scipy.org
>>
>>and downloads are at:
>>
>>http://ipython.scipy.org/dist
>>
>>I've provided RPMs (for Python 2.3 and 2.4, built under Fedora Core 3),
>>plus source downloads (.tar.gz).  Fedora users should note that IPython
>>is now officially part of the Extras repository, so they can get the
>>update from there as well (though it may lag by a few days).
>>
>>There is also a native win32 installer which should work correctly for
>>both Python 2.3 and 2.4.
>>
>>Debian, Fink and BSD packages for this version should be coming soon, as
>>the respective maintainers (many thanks to Jack Moffit, Andrea Riciputi
>>and Dryice Liu) have the time to follow their packaging procedures.
>>
>>Many thanks to Enthought for their continued hosting support for
>>IPython, and to all the users who contributed ideas, fixes and reports.
>>
>>I'd like to add a special thanks to Denis Rivière, Yann Cointepas and
>>Benjamin Thyreau for their hard work on the Qt improvements, and for
>>their overall hospitality.  Python really seems to have a remarkably
>>friendly community, worldwide!
>>
>>
>>WHAT is IPython?
>>
>>
>>1. An interactive shell superior to Python's default. IPython has many
>>features for object introspection, system shell access, and its own 
>>special command system for adding functionality when working interactively.
>>
>>2. An embeddable, ready to use interpreter for your own programs. 
>>IPython can be started with a single call from inside another program, 
>>providing access to the current namespace.
>>
>>3. A flexible framework which can be used as the base environment for 
>>other systems with Python as the underlying language.
>>
>>
>>Release notes
>>-
>>
>>As always, the NEWS file can be found at http://ipython.scipy.org/NEWS,
>>and the full ChangeLog at http://ipython.scipy.org/ChangeLog.  The
>>highlights of this release follow.
>>
>>This is mainly a bugfix release, to clean up the problems reported in
>>0.6.13.  As I said at the time, I intend to start new development now
>>(more details on that in a separate email).  As always, however, a few
>>new goodies managed to sneak by.
>>
>>* A new -qthread option to support controlling Qt apps from within
>>ipython, similar to what -gthread and -wthread do for GTK/WX.  This was
>>contributed by Denis Rivière , Yann Cointepas
>> and Benjamin Thyreau .
>>  Many thanks to them!  The lack of Qt support was a glaring omission of
>>ipython's gui features, so I'm extremely happy to have their contribution.
>>
>>   For those of you who may be matplotlib users as well, I should note
>>that as of mpl 0.81 (the next release, or use current CVS), the -pylab
>>option will also support interactive matplotlib use with the Qt backend.
>>  This is also thanks to work done by Denis, Yann and Benjamin against
>>the matplotlib Qt backend, in conjunction with the IPython improvements.
>>
>>* New -e option to %run to suppress tracebacks from sys.exit() calls.
>>This can be very useful to silence all the noise generated when running
>>unittests from within ipython.
>>
>>* New ';' escape to autoquote a line without splitting:
>>
>>In [6]: ,foo a b c
>>--> foo("a", "b", "c")
>>
>>In [7]: ;foo a b c
>>--> foo("a b c")
>>
>>In the process, I fixed ',' quoting, which I'd broken in .13.
>>
>>* Fix -wthread to work with WXPython 2.6 (this also impacts matplotlib
>>users who run the WX backend).
>>
>>* Added new matcher (it goes at the end of the priority list) to do
>>tab-completion on named function arguments.  Submitted by George Sakkis
>>.  See the thread at
>>
>>http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
>>
>>for more details.
>>
>>* Various other fixes for obscure bugs, but all of which caused reported
>>IPython crashes.  Details in Changelog.
>>
>>
>>Enjoy, and as usual please report any problems.
>>
>>Regards,
>>
>>Fernando.
>>
>> 
>>
>>
>>
>Hi All,
>
>Fernando, if I may ask, as I'm a Fedora3 user. You mention that there 
>are RPMs for FC3, for Python2.3, 2.4. I'm new to Python. Is IPython 
>built into FC3s Python or is it a stand-alone program.? Sorry for 
>troubling you with this. Cheers.
>
>Mark Sargent.
>  
>
Hi All,

apologies...figured it out...cheers...p.s. thanx for such a cool tool, 
Fernando and friends..

Mark Sargent.
-- 
http://mail.python.org/mailman/listinfo/python-list


Moving Places, Subtracting from slices/lists

2005-06-01 Thread Mark Sargent
Hi All,

playing around with the tut now. How can I get this code to remove the 
original instance of 'roof'.?
 >>> hotcat = ['Cat', 'roof', 'on', 'a', 'hot', 'tin']
 >>> for x in hotcat[:]:
... if x == 'roof': hotcat.insert(6,x)
...
 >>> hotcat
['Cat', 'roof', 'on', 'a', 'hot', 'tin', 'roof']

Perhaps a replace or something after the 2nd line of the for function.?
 >>> hotcat = ['Cat', 'roof', 'on', 'a', 'hot', 'tin']
 >>> for x in hotcat[:]:
... if x == 'roof': hotcat.insert(6,x)
... hotcat[x:len(x)] = []
...
Traceback (most recent call last):
  File "", line 3, in ?
TypeError: slice indices must be integers

 I feel I'm close to it.

Cheers.

Mark Sargent.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Moving Places, Subtracting from slices/lists

2005-06-02 Thread Mark Sargent
Hi All,

getting closer, me thinks.

 >>> hotcat = ['Cat', 'roof', 'on', 'a', 'hot', 'tin']
 >>> for x in hotcat[:]:
... if x == 'roof': hotcat.insert(6,x)
... del hotcat[x]
...
Traceback (most recent call last):
  File "", line 3, in ?
TypeError: list indices must be integers

How do I get that x to be an integer b4 it is entered into the indice.? 
Cheers.

Mark Sargent.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Moving Places, Subtracting from slices/lists

2005-06-02 Thread Mark Sargent
Dennis Lee Bieber wrote:

>On Thu, 02 Jun 2005 16:12:44 +0900, Mark Sargent
><[EMAIL PROTECTED]> declaimed the following in
>comp.lang.python:
>
>  
>
>>How do I get that x to be an integer b4 it is entered into the indice.? 
>>Cheers.
>>
>>
>>
>   If you really want the index, ask for the index...
>
>  
>
>>>>hc
>>>>
>>>>
>['Cat', 'roof', 'on', 'a', 'hot', 'tin']
>  
>
>>>>try:
>>>>
>>>>
>...i = hc.index("roof")
>...new_hc = hc[:i] + hc[i+1:] + [hc[i]]
>... except ValueError:
>...pass
>... 
>  
>
>>>>new_hc
>>>>
>>>>
>['Cat', 'on', 'a', 'hot', 'tin', 'roof']
>
>  
>
Hi All,

ok, got the following for that.

 >>> hotcat = ['Cat', 'roof', 'on', 'a', 'hot', 'tin']
 >>> i = hotcat.index("roof")
 >>> hotcat = hotcat[:1] + hotcat[i+1:] + [hotcat[1]]
 >>> except ValueError:
  File "", line 1
except ValueError:
 ^
SyntaxError: invalid syntax

Cheers.

P.S. If it's not too much, could you explain this line.?
hotcat[:1] + hotcat[i+1:] + [hotcat[1]]
hotcat[:1] = Cat?
hotcat[i+1:] = all after roof?
what does [hotcat[1]] do.?

Mark Sargent.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Moving Places, Subtracting from slices/lists

2005-06-02 Thread Mark Sargent
Fredrik Lundh wrote:

>Elliot Temple wrote:
>
>  
>
>>btw hotcat[:] is a *copy* of hotcat, so just leave out "[:]"
>>
>>
>
>when you want to modify the thing you're looping over, you need
>to be careful.  looping over a copy is often a good idea (see the
>Python tutorial and the FAQ for more on this).
>
>  
>
Yes, I saw that, and that's why I was using the copy form in the 
loop...thanx for verifying this.

>>enumerate is a function that adds indexes to a list.  observe:
>>
>>
>
>  
>
>>>>hotcat = ['roof', 'roof', 'roof']
>>>>for index, word in enumerate(hotcat):
>>>>   if word == 'roof': del hotcat[index]
>>>>print hotcat
>>>>
>>>>
>['roof']
>
>if I understand the OP correctly, he wants to *move* the "roof" to the
>end of the string.
>  
>
correct...

>try:
>hotcat.remove("root")
>hotcat.append("root")
>except ValueError:
>pass
>
>is most likely the fastest way to do that.
>
> 
>
>  
>
will give it a blast...thanx

>
>  
>
Cheers.

Mark Sargent.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Moving Places, Subtracting from slices/lists

2005-06-03 Thread Mark Sargent

>what does [hotcat[1]] do.?
>
>  
>
ah, quite simple really, adds roof to the end of hotcat...thanx..

Mark Sargent.

-- 
http://mail.python.org/mailman/listinfo/python-list