Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Retrieving Cookies
Post: Retrieving Cookies

Hello, I wrote the following code and ran it: #!/usr/bin/python3 # Import modules for CGI handling from os import environ import cgi, cgitb if environ.has_key('HTTP_COOKIE'): for cookie in map(str...
whois1230 General Coding Help 2 2,192 Nov-21-2020, 11:00 AM
    Thread: Simple URL Example – Get Method
Post: RE: Simple URL Example – Get Method

How can I use it?
whois1230 General Coding Help 7 9,198 Nov-19-2020, 07:17 PM
    Thread: Simple URL Example – Get Method
Post: RE: Simple URL Example – Get Method

Ok, so I installed flask. And then I wrote this in IDLE: #!/usr/bin/python3 # Import modules for CGI handling import cgi, cgitb # Create instance of FieldStorage form = cgi.FieldStorage() # Get data...
whois1230 General Coding Help 7 9,198 Nov-19-2020, 06:10 PM
    Thread: Simple URL Example – Get Method
Post: RE: Simple URL Example – Get Method

I am running the newest version of Python on Linux Ubuntu 18.04 LTS. The IDE I'm using to write Python code is IDLE. I tried to install Flask, and this is what happened: user@Lenovo-ideapad-110-17IKB:...
whois1230 General Coding Help 7 9,198 Nov-18-2020, 06:35 PM
    Thread: Simple URL Example – Get Method
Post: Simple URL Example – Get Method

Hello. I am learning Python 3 from a .pdf from Tutorialspoint. I am at a stage where I'm learning how to write CGI programs. I copied the following program, which when run should result in Hello ZARA ...
whois1230 General Coding Help 7 9,198 Nov-16-2020, 07:40 PM
    Thread: module 'os' has no attribute 'tmpfile'
Post: module 'os' has no attribute 'tmpfile'

Hello, I wrote the following program and tried to execute it: #!/usr/bin/python3.8 import os # The file has no directory entries associated with it and will be # deleted automatically once there are n...
whois1230 General Coding Help 3 4,529 Jun-11-2020, 02:38 PM
    Thread: [Errno 1] Operation not permitted
Post: RE: [Errno 1] Operation not permitted

(Jun-05-2020, 02:33 PM)ibreeden Wrote: There are spaces in the filename. So you should quote the path: sudo python3 "/home/user/Desktop/Programming/Python/Os lchown method.py" (One hint when on Linu...
whois1230 General Coding Help 8 42,837 Jun-11-2020, 02:19 PM
    Thread: [Errno 1] Operation not permitted
Post: RE: [Errno 1] Operation not permitted

(Jun-04-2020, 03:41 PM)bowlofred Wrote: Easiest is to invoke the program with sudo. $ sudo python3 myscript.py user@Lenovo-ideapad-110-17IKB:~$ sudo python3 /home/user/Desktop/Programming/Python/Os...
whois1230 General Coding Help 8 42,837 Jun-05-2020, 02:08 PM
    Thread: [Errno 1] Operation not permitted
Post: RE: [Errno 1] Operation not permitted

(Jun-02-2020, 08:49 PM)bowlofred Wrote: Python is asking the OS to complete the lchown(), but the OS said the operation failed. Usually, this means you don't have permission to do what you're tryin...
whois1230 General Coding Help 8 42,837 Jun-04-2020, 09:40 AM
    Thread: [Errno 1] Operation not permitted
Post: [Errno 1] Operation not permitted

Hello, I'm trying to run the following program, but I'm getting an error. My OS is Linux Ubuntu 18.04 LTS and the IDE is IDLE. #!/usr/bin/python3.8 import os, sys # Open a file path = "/home/user/Desk...
whois1230 General Coding Help 8 42,837 Jun-02-2020, 07:48 PM
    Thread: Python version on Linux
Post: RE: Python version on Linux

(Apr-10-2020, 06:57 PM)buran Wrote: try with python3.8 if you want that version. python3 is alias for 3.5user@user-Lenovo-ideapad-110-17IKB ~ $ python3.8 -V Python 3.8.2How do I know which version o...
whois1230 General Coding Help 5 3,526 Apr-10-2020, 07:01 PM
    Thread: Python version on Linux
Post: RE: Python version on Linux

(Apr-09-2020, 01:22 PM)buran Wrote: Linux mint18 has bot 2.7 and 3.5 versions. python2 is the system version (i.e. the one linux rely on for its tools If you want to use python3 use python3 command,...
whois1230 General Coding Help 5 3,526 Apr-10-2020, 06:54 PM
    Thread: Getting errors when trying to run programs
Post: RE: Getting errors when trying to run programs

(Apr-10-2020, 11:34 AM)DreamingInsanity Wrote: (Apr-10-2020, 11:21 AM)whois1230 Wrote: https://imgur.com/a/6OPMRci I managed to fix the 'indented block' problem, but now I'm getting this('break' o...
whois1230 General Coding Help 8 3,509 Apr-10-2020, 11:54 AM
    Thread: Getting errors when trying to run programs
Post: RE: Getting errors when trying to run programs

https://imgur.com/a/6OPMRci I managed to fix the 'indented block' problem, but now I'm getting this('break' outside loop): https://imgur.com/a/FB8RvGQ
whois1230 General Coding Help 8 3,509 Apr-10-2020, 11:21 AM
    Thread: Getting errors when trying to run programs
Post: RE: Getting errors when trying to run programs

(Apr-09-2020, 06:48 PM)michael1789 Wrote: Without seeing exactly what the code is, it looks like maybe the game is trying to gram an image from online, and either that page is gone or the image is g...
whois1230 General Coding Help 8 3,509 Apr-10-2020, 08:23 AM
    Thread: Getting errors when trying to run programs
Post: RE: Getting errors when trying to run programs

Tried another program from the book: https://imgur.com/a/Ky1VkWH I'm getting a syntax error
whois1230 General Coding Help 8 3,509 Apr-09-2020, 08:27 PM
    Thread: Getting errors when trying to run programs
Post: Getting errors when trying to run programs

I tried to copy the code of a game to see what happens, but I'm getting the following error: https://imgur.com/a/Usw3uCc I am new to Python and I am learning from the book named Python 3 from Tutorial...
whois1230 General Coding Help 8 3,509 Apr-09-2020, 06:42 PM
    Thread: Python version on Linux
Post: Python version on Linux

Hello, I'm running Linux Mint Cinnamon 18.3 64-bit and I want to learn Python 3. When I write python --version in the Terminal I get user@user-Lenovo-ideapad-110-17IKB ~ $ python --version Python 2.7....
whois1230 General Coding Help 5 3,526 Apr-09-2020, 01:07 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020