Re: python (parted) question

2003-09-08 Thread Andrew Clausen
On Mon, Sep 08, 2003 at 03:40:47PM -0700, Paul Telford wrote:
> I posed this question several days ago and received no response.  mdz
> (correctly) nudged me with a cluestick by telling me that perhaps I should
> be more specific in describing my problem.  So here goes... I'm no python
> hacker, so maybe I'm missing something obvious.

I never received your email.

> This same code worked with libparted1.4, and broke at the 1.6 upgrade.  
> I'm not sure if the problem is in libparted, python-parted, or user-error.  
> I'm perfectly willing to accept the latter, but I hope to find a solution 
> anyway.  :)

1.6 is not compatible with 1.4.  Where did you get python-parted for
libparted 1.6?

The names of the PedDisk constructor changed, to reflect changes in the
semantics.

Cheers,
Andrew




Re: python (parted) question

2003-09-11 Thread Andrew Clausen
On Mon, Sep 08, 2003 at 03:40:47PM -0700, Paul Telford wrote:
> static PyObject *
> disk_get_partition(PyObject *self, PyObject *args)
> {
> PyPartedObject *o;
> int num;
> 
> if (!PyArg_ParseTuple(args, "Oi", &o, &num))
> return NULL;
> 
> return PyPartedObject_new("PedPartition",
>   ped_disk_get_partition((PedDisk *)o->obj,
>  num));
> }
> 
> 
> 
> This same code worked with libparted1.4, and broke at the 1.6 upgrade.  
> I'm not sure if the problem is in libparted, python-parted, or user-error.  
> I'm perfectly willing to accept the latter, but I hope to find a solution 
> anyway.  :)

I'm quite busy right now, so I'll give you some suggestions :)

So, to begin... could you stick a ped_disk_print((PedDisk*)o->obj)
call in the above function?

> Is anyone else out there even using python-parted?  There doesn't seem to 
> be much info about it...

BTW, there are two python-parted ports.  I personally like the other
one better (by [EMAIL PROTECTED]), so you might want to take a look at that
also.  I don't think it's been ported to 1.6 though.

Cheers,
Andrew