Bake the pumpkin pieces for 30 minutes, or until tender.
Weigh the cooked pumpkin and measure two-thirds of its weight in sugar (e.g. if the pumpkin weighs 750g/1lb 10oz, use 500g/1lb sugar). Place the pumpkin into a food processor and blend until smooth.
Transfer the pumpkin into a saucepan with the sugar and cook over a low heat, stirring occasionally, for 30 minutes. Set aside to cool.
Lay out two filo sheets on a lightly floured surface. Cut the sheets into rectangular pieces measuring 7.5cm x 15cm/6in x 3in.
Place a spoonful of pumpkin purée at one end of the pastry sheet. Fold one corner of the pastry over the mixture so that it forms a triangle, then fold the remaining pastry over the top to continue the triangle pattern. Repeat until all of the pastry has been folded and you have a triangle-shaped pastry. Brush the end of the pastry with water and seal. Repeat with the remaining filling and pastry.
Fill a deep-fat fryer or a large, deep, heavy-bottomed pan two-thirds full with vegetable oil. Heat the oil to 180C/350F (use a probe thermometer to check the temperature if you're not using a deep-fat fryer). (CAUTION: Hot oil can be dangerous. Don't leave unattended).
Carefully place the pastries into the hot oil and cook for 2-3 minutes or until just cooked through. Remove from the oil using a slotted spoon and set aside to drain on kitchen paper.