convertir ces instructions de java vers python
bonjour, je suis entrain de convertir un script du java vers python,
je ne sais pas comment transcrire ces quelques instructions:
Code:
1 2 3 4 5 6 7 8
|
setTitle("rec");
getContentPane().setLayout(null);
setBackground(Color.lightGray);
setBounds(100,50,270,240);
date=new Date();
rand=new Random(date.getTime());
setVisible(true); |
Code:
1 2 3 4 5 6 7
|
File loader=new File("image.bmp");
FileInputStream in=new FileInputStream(loader);
int bytes_read=0;
size=(int)loader.length();
in.read(_data);
in.close(); |
Code:
1 2 3 4 5
|
box=this.getGraphics();
box.setColor(Color.blue);
box.drawRect(x+10,y+y_pos,Side,Side);
box.drawRect(x+9,y+y_pos-1,Side+2,Side+2); |
Merci pour votre aide!