[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

_struct in Python 2.5.2

Olaf Schwarz

2/24/2008 3:39:00 PM

Hi,

I am trying to run this application
http://svn.navi.cx/misc/trunk/pytho...
on uNSLUng Linux 6.10 using the optware python packages.

As I obtained segmentation faults using Python 2.4, I have upgraded to
2.5.2. Now the execution terminates a lot earlier with this error
message:

File "/usr/local/bemused_mpd/bemused-mpd.py", line 33, in <module>
import bemused
File "/usr/local/bemused_mpd/bemused.py", line 27, in <module>
import bluetooth, syslog
File "/opt/lib/python2.5/site-packages/bluetooth.py", line 2, in
<module>
import struct
File "/opt/lib/python2.5/struct.py", line 30, in <module>
from _struct import Struct, error
ImportError: No module named _struct

I found out that there has been a file named _struct.so in 2.5.1 but
it has disappeared in 2.5.2. With no package available for downgrading
to 2.5.1 and no idea how to resolve this I am stuck at this point.

Any help appreciated.

Thank you
Olaf
13 Answers

Martin v. Loewis

2/24/2008 6:54:00 PM

0

> I found out that there has been a file named _struct.so in 2.5.1 but
> it has disappeared in 2.5.2. With no package available for downgrading
> to 2.5.1 and no idea how to resolve this I am stuck at this point.
>
> Any help appreciated.

Where did you get your copy of Python 2.5.2 from, and how did you
install it? _struct should be there; if it isn't, something went
wrong during the installation.

Regards,
Martin

Nanjundi

3/4/2008 3:12:00 AM

0

On Feb 24, 10:39 am, Olaf Schwarz <olaf_schwarz...@yahoo.de> wrote:
> Hi,
>
> I am trying to run this applicationhttp://svn.navi.cx/misc/trunk/pytho...
> on uNSLUng Linux 6.10 using the optware python packages.
>
> As I obtained segmentation faults using Python 2.4, I have upgraded to
> 2.5.2. Now the execution terminates a lot earlier with this error
> message:
>
> File "/usr/local/bemused_mpd/bemused-mpd.py", line 33, in <module>
> import bemused
> File "/usr/local/bemused_mpd/bemused.py", line 27, in <module>
> import bluetooth, syslog
> File "/opt/lib/python2.5/site-packages/bluetooth.py", line 2, in
> <module>
> import struct
> File "/opt/lib/python2.5/struct.py", line 30, in <module>
> from _struct import Struct, error
> ImportError: No module named _struct
>
> I found out that there has been a file named _struct.so in 2.5.1 but
> it has disappeared in 2.5.2. With no package available for downgrading
> to 2.5.1 and no idea how to resolve this I am stuck at this point.
>
> Any help appreciated.
>
> Thank you
> Olaf

Hi Olaf,
If you are still stuck, run
../configure
make
make install

if you skip the command make, then the required files (<python-install-
path>lib/python2.5/lib-dynload/_struct.so) doesn't get created. Get
the latest 2.5.2 rpm from python.org, it works.

Good luck.
-N

The Old Man

6/27/2014 5:45:00 PM

0

On Friday, June 27, 2014 11:20:24 AM UTC-4, jerry kraus wrote:

> Thus my point. Was the AK family specifically designed as the "People's Weapon", for small scale revolutionary movements around the world, to get them going, as it were? It certainly seems to have worked out that way, in many cases. For a small group with minimal resources fighting an unpopular government, the AK would seem to be ideal.

Depends on who is supplying the rebels. In Nicaragua, they had M-16s, in other Central American countries, they used AK-47s.

Regards,
John Braungart

The Old Man

6/27/2014 5:51:00 PM

0

On Friday, June 27, 2014 11:20:24 AM UTC-4, jerry kraus wrote:

> Thus my point. Was the AK family specifically designed as the "People's Weapon", for small scale revolutionary movements around the world, to get them going, as it were? It certainly seems to have worked out that way, in many cases. For a small group with minimal resources fighting an unpopular government, the AK would seem to be ideal.

Depends on who the rebels are fighting. The Contras of Nicaragua used M-16s, while the rebels fighting governments that we backed used AK-47s. Mostly anyway.

Regards,
John Braungart

pyotr filipivich

6/27/2014 7:59:00 PM

0

The Old Man <Braungart@verizon.net> on Fri, 27 Jun 2014 10:44:57 -0700
(PDT) typed in soc.history.what-if the following:
>On Friday, June 27, 2014 11:20:24 AM UTC-4, jerry kraus wrote:
>
>> Thus my point. Was the AK family specifically designed as the "People's Weapon", for small scale revolutionary movements around the world, to get them going, as it were? It certainly seems to have worked out that way, in many cases. For a small group with minimal resources fighting an unpopular government, the AK would seem to be ideal.
>
>Depends on who is supplying the rebels. In Nicaragua, they had M-16s, in other Central American countries, they used AK-47s.

In the US, it is a toss up. It would be prudent to have some
thing in each of the "popular" calibers. That would be (IMHO) .223,
308, 30-06, 7.62x39, 7.62x54, 9mm, 45 ACP, .38 & .38 Special (IIRC,
You can shoot a 38 special round in a .357 but not the other way
around), 40, 12 ga.
But your mileage (or budget) may vary.
--
pyotr filipivich.
For Sale: Uncirculated Roman Drachmas, feature Julius Ceaser's Portrait,
several dated 44 BCE. Comes with Certificate of Authenticity.

pyotr filipivich

6/27/2014 10:56:00 PM

0

Bill <blackusenet@gmail.com> on Fri, 27 Jun 2014 10:58:16 +0100 typed
in soc.history.what-if the following:
>On Thu, 26 Jun 2014 20:06:40 -0700, pyotr filipivich
><phamp@mindspring.com> wrote:
>
>>"Paul J. Adam" <paul.j.adam@gmail.com> on Thu, 26 Jun 2014 18:33:19
>>+0100 typed in soc.history.what-if the following:
>>>
>>>> The AK family is a low maintenance weapon. It's great if you're
>>>> living in a field or need to push it up into the thatch to hide it for
>>>> a time but I'd have though second rate for an occasional user living
>>>> in a city...
>>
>> The AK family is low maintenance. It is reliable. You pull the
>>trigger and it shoots, the bullet goes where you aimed it. Why would
>>an occasional user living in a city not want that?
>
>Because the specialised user needs something that will both meet their
>specialism and also, in an 'emergency', work as a general purpose
>device.
>
>The AK family work as well for the second case as anything, but for
>the specialised tool they're less than ideal.

True. But. there are occasions when, for whatever reason, I may
not have / want the specialized tool. E.G., I carry a Leatherman
Multitool at all times. Of it I have said "I would not want to do any
large projects with it, but it is interesting the number of 'projects'
I have done with it."
Given my druthers, I would rather have The Tool for The Situation.
But, sometimes you gotta go with what you have. Which sometimes mean,
"Never mind, we can't do it perfectly, we'll have to do it close
enough." (Or not at all.)
--
pyotr filipivich.
For Sale: Uncirculated Roman Drachmas, feature Julius Ceaser's Portrait,
several dated 44 BCE. Comes with Certificate of Authenticity.

William Black

6/28/2014 10:38:00 PM

0

On Fri, 27 Jun 2014 15:56:22 -0700, pyotr filipivich
<phamp@mindspring.com> wrote:

>Bill <blackusenet@gmail.com> on Fri, 27 Jun 2014 10:58:16 +0100 typed
>in soc.history.what-if the following:
>>On Thu, 26 Jun 2014 20:06:40 -0700, pyotr filipivich
>><phamp@mindspring.com> wrote:
>>
>>>"Paul J. Adam" <paul.j.adam@gmail.com> on Thu, 26 Jun 2014 18:33:19
>>>+0100 typed in soc.history.what-if the following:
>>>>
>>>>> The AK family is a low maintenance weapon. It's great if you're
>>>>> living in a field or need to push it up into the thatch to hide it for
>>>>> a time but I'd have though second rate for an occasional user living
>>>>> in a city...
>>>
>>> The AK family is low maintenance. It is reliable. You pull the
>>>trigger and it shoots, the bullet goes where you aimed it. Why would
>>>an occasional user living in a city not want that?
>>
>>Because the specialised user needs something that will both meet their
>>specialism and also, in an 'emergency', work as a general purpose
>>device.
>>
>>The AK family work as well for the second case as anything, but for
>>the specialised tool they're less than ideal.
>
> True. But. there are occasions when, for whatever reason, I may
>not have / want the specialized tool. E.G., I carry a Leatherman
>Multitool at all times.

And I carry a Gerber Legend.

It's twice the weight of the Leatherman but a hell of a sight more
capable...

A Leatherman won't cope with either my Land Rover when I'm in the UK,
or India when I'm not...

William Black

6/28/2014 10:38:00 PM

0

On Fri, 27 Jun 2014 08:20:24 -0700 (PDT), jerry kraus
<jkraus1999@gmail.com> wrote:

>On Thursday, June 26, 2014 10:06:40 PM UTC-5, pyotr filipivich wrote:
>> "Paul J. Adam" <paul.j.adam@gmail.com> on Thu, 26 Jun 2014 18:33:19
>>
>> +0100 typed in soc.history.what-if the following:
>>
>> >
>>
>> >> The AK family is a low maintenance weapon. It's great if you're
>>
>> >> living in a field or need to push it up into the thatch to hide it for
>>
>> >> a time but I'd have though second rate for an occasional user living
>>
>> >> in a city...
>>
>>
>>
>> The AK family is low maintenance. It is reliable. You pull the
>>
>> trigger and it shoots, the bullet goes where you aimed it. Why would
>>
>> an occasional user living in a city not want that?
>>
>> >
>>
>Thus my point. Was the AK family specifically designed as the "People's Weapon", for small scale revolutionary movements around the world, to get them going, as it were?

Absolute rubbish.

It was specifically designed for the Red Army and its tactical
doctrines.

pyotr filipivich

6/29/2014 4:55:00 AM

0

Bill <blackusenet@gmail.com> on Sat, 28 Jun 2014 23:37:37 +0100 typed
in soc.history.what-if the following:
>On Fri, 27 Jun 2014 15:56:22 -0700, pyotr filipivich
><phamp@mindspring.com> wrote:
>
>>Bill <blackusenet@gmail.com> on Fri, 27 Jun 2014 10:58:16 +0100 typed
>>in soc.history.what-if the following:
>>>On Thu, 26 Jun 2014 20:06:40 -0700, pyotr filipivich
>>><phamp@mindspring.com> wrote:
>>>
>>>>"Paul J. Adam" <paul.j.adam@gmail.com> on Thu, 26 Jun 2014 18:33:19
>>>>+0100 typed in soc.history.what-if the following:
>>>>>
>>>>>> The AK family is a low maintenance weapon. It's great if you're
>>>>>> living in a field or need to push it up into the thatch to hide it for
>>>>>> a time but I'd have though second rate for an occasional user living
>>>>>> in a city...
>>>>
>>>> The AK family is low maintenance. It is reliable. You pull the
>>>>trigger and it shoots, the bullet goes where you aimed it. Why would
>>>>an occasional user living in a city not want that?
>>>
>>>Because the specialised user needs something that will both meet their
>>>specialism and also, in an 'emergency', work as a general purpose
>>>device.
>>>
>>>The AK family work as well for the second case as anything, but for
>>>the specialised tool they're less than ideal.
>>
>> True. But. there are occasions when, for whatever reason, I may
>>not have / want the specialized tool. E.G., I carry a Leatherman
>>Multitool at all times.
>
>And I carry a Gerber Legend.
>
>It's twice the weight of the Leatherman but a hell of a sight more
>capable...
>
>A Leatherman won't cope with either my Land Rover when I'm in the UK,
>or India when I'm not...

I have both. I carry the Leatherman because it is more "handy"
for me.

But the point is, sometimes, you have a limited choice for what to
have on hand - budget, space, etwas. And to use an "old cliche" -
first rule of a gun fight - bring a gun. OTOH, having the wrong gun,
_may_ be worse than no gun. I'm recalling the story of the guy who
was on the buss out of Addis Abba, feeling secure because he had a 357
Magnum revolver. Till the first stop, and the guy stopping the buss
had an AK-47, with the standard 30 round magazine. And he was not
alone.
--
pyotr filipivich.
For Sale: Uncirculated Roman Drachmas, feature Julius Ceaser's Portrait,
several dated 44 BCE. Comes with Certificate of Authenticity.

Jerry Kraus

6/30/2014 5:12:00 PM

0

On Saturday, June 28, 2014 5:38:17 PM UTC-5, Bill wrote:
> On Fri, 27 Jun 2014 08:20:24 -0700 (PDT), jerry kraus
>
> <
> >Thus my point. Was the AK family specifically designed as the "People's Weapon", for small scale revolutionary movements around the world, to get them going, as it were?
>
>
>
> Absolute rubbish.
>
>
>
> It was specifically designed for the Red Army and its tactical
>
> doctrines.

Which was a communist, people's army, with global revolutionary objectives.