Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Writing a simple shell
Post: Writing a simple shell

Hi All I'm new to Python and trying to write a shell I can execute on a remote machine which connects back to my host machine. My host machine is running a netcat listener. However, when I run the fo...
syno7878 General Coding Help 0 1,778 Mar-20-2021, 07:01 PM
    Thread: Appending to a text string
Post: RE: Appending to a text string

Hi I tried your code and I got the following error message. I'm using Python 2.7: invalid syntax: test.py, line 4, pos 39 in file C:\python-scripts\test.py f_out.write(f'{line} {index}\n') The prin...
syno7878 Homework 10 4,325 May-03-2020, 09:44 AM
    Thread: Appending to a text string
Post: RE: Appending to a text string

Hi All I think I'm nearly there with the code: f = open("file.txt", "rt") s = f.read() f = open("new-file.txt", "wt") for count in range(1,201): s+=str(count) print({s},{count}) f.write...
syno7878 Homework 10 4,325 May-02-2020, 07:08 PM
    Thread: Appending to a text string
Post: RE: Appending to a text string

Hi there Thanks for the reply. Now I've got: f = open("password.txt", "rt") s = f.read() f.close() f = open("password2.txt", "wt") count = 0 while count <= 200 : f.write(s) count += 1 ...
syno7878 Homework 10 4,325 May-02-2020, 05:10 PM
    Thread: Appending to a text string
Post: Appending to a text string

Hi All I have the following code which reads the contents of a file, appends 1,2,3, etc to the contents and then writes the results to a new file: f = open("text-file.txt", "rt") s = f.read() f.clos...
syno7878 Homework 10 4,325 May-02-2020, 03:34 PM

User Panel Messages

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