File size: 1,520 Bytes
6c36389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Python Parser</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100 min-h-screen flex items-center justify-center">
    <div class="bg-white p-8 rounded-lg shadow-lg max-w-2xl w-full">
        <h1 class="text-3xl font-bold text-gray-800 mb-6 text-center">Python Code Parser</h1>
        
        <!-- File Upload -->
        <form method="post" enctype="multipart/form-data" class="space-y-6">
            <div>
                <label class="block text-sm font-medium text-gray-700 mb-2">Upload a Python File</label>
                <input type="file" name="file" accept=".py" class="w-full p-2 border rounded-lg focus:ring-2 focus:ring-blue-500">
            </div>

            <!-- Paste Code -->
            <div>
                <label class="block text-sm font-medium text-gray-700 mb-2">Or Paste Your Code</label>
                <textarea name="code" rows="6" class="w-full p-2 border rounded-lg focus:ring-2 focus:ring-blue-500" placeholder="Paste Python code here..."></textarea>
                <input type="text" name="filename" class="mt-2 w-full p-2 border rounded-lg" placeholder="Enter filename (e.g., script.py)">
            </div>

            <button type="submit" class="w-full bg-blue-600 text-white p-2 rounded-lg hover:bg-blue-700 transition">Parse</button>
        </form>
    </div>
</body>
</html>