-
June 7th, 2003, 04:51 PM
#11
I think it's a fairly safe bet that under DOS, python does not support sockets.
No doubt you are right. However I use DOS Edit on my XP install on almost a daily basis. All of the examples on this tut. were written in Edit. I love it as a program. Edit <filename> save exit python <filename>. It's nice and quick.
-
June 7th, 2003, 07:26 PM
#12
i agree with you HT about edit i like the way it holds the indent when you make a new line...but how does that relate to sockets??
does python have a DOS version? i know perl does.
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
-
June 7th, 2003, 08:08 PM
#13
Thanks...now I have something to mull over for another few weeks...
Honestly, thanks for introducing Python...it actually reminds me of BASIC, with obvious advancements, so it should be fun to fool around with.
Ouroboros
"entia non sunt multiplicanda praeter necessitatem"
"entities should not be multiplied beyond necessity."
-Occam's Razor
-
June 7th, 2003, 09:14 PM
#14
Originally posted here by Tedob1
i agree with you HT about edit i like the way it holds the indent when you make a new line...but how does that relate to sockets??
does python have a DOS version? i know perl does.
I'm assuming the sockets were mentioned because DOS doesn't have native network support, so socket calls would be pretty much useless. As for a DOS version of python, not that I have seen...
-
April 12th, 2005, 08:18 AM
#15
Junior Member
File "add.py", line 1
from socket import *
^
SyntaxError: invalid syntax
why is the error
-
April 12th, 2005, 01:35 PM
#16
# My first -ever- Python program, created after seeing an introductory sample of looping.
# Created May 26, 2003, Memorial Day
# NOTE: My first hands-on experience with Python, totaling a whopping 10 minutes of basic
# tutorial experience, immediately followed by 4 hours of perfecting the tutorial example
# okay, so the truth is I can't seem to NOT veer from trying to be more creative
# when I should be following along with a very simple introductory Python tutorial.
# Look at it this way, maybe I'm gifted in the programming field, I liked it.
#
# Here is the example I should of been following: (the code without the "#" is the 4 hour job.
#for i in range(0, 10) :
# if i % 2 == 0 :
# print i, 'is an even number'
# else :
# print i, 'is an odd number'
for i in range (0,25) :
if i == 0 :
print i, '(zero) is not a divisable number'
elif i % 3 == 0 :
print i, 'is evenly divided by three'
if i == 1 :
print i, '(One) is not evenly divisable by three'
elif i % 3 == 1 :
print i, 'is divisable by three with a remainder of', i % 3
if i == 2 :
print i, '(Two) is not evenly divisable by three'
elif i % 3 == 2 :
print i, 'is divisable by three with a remainder of', i % 3
Python is addictive for me.
ZT3000
Beta tester of "0"s and "1"s"
-
April 12th, 2005, 07:42 PM
#17
Originally posted here by backspace
File "add.py", line 1
from socket import *
^
SyntaxError: invalid syntax
why is the error
Hey Hey,
I'm surprised to see this thread pulled up after so long... What version of python were you using and which operating system was it for... there may be some vital differences among the way you import files, depending on the version used. These examples were working with both ActivePython for Win32 and The Linux version, however depending on which actual version you have it may explain it.
Peace,
HT
-
April 12th, 2005, 08:35 PM
#18
The reason is because the file socket.py is not in the current directory and you don't have the environment variable PYTHONPATH set to point to the location of the socket.py file.
No, I'm not a genius. This thread being resurrected reminded me that I wanted to look into Python to see what it could do and I had the same issue.... But I RTFM....
Don\'t SYN us.... We\'ll SYN you.....
\"A nation that draws too broad a difference between its scholars and its warriors will have its thinking done by cowards, and its fighting done by fools.\" - Thucydides
-
September 9th, 2005, 06:54 PM
#19
Banned
Sounds Like...
It Kinda sounds like your reading it from the book "Learning Python" Thats just my opinion but, your pretty good at the tutorials... I have a question, I keep getting negative anti points. Why, I keep going in newbie forums but i still get negative anti points...?
-
September 9th, 2005, 08:16 PM
#20
Re: Sounds Like...
Originally posted here by PrOxY_LoCaToR
It Kinda sounds like your reading it from the book "Learning Python" Thats just my opinion but, your pretty good at the tutorials... I have a question, I keep getting negative anti points. Why, I keep going in newbie forums but i still get negative anti points...?
Well replying to old threads is a pretty good way to get negative points, asking about negative points is another way to increase the amount of reds you get.
Just a hint, check the comments on the assignment, they might give you a clue as to why your getting hit.
Cheers:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|