Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Need some help with a script

Name: Anonymous 2011-02-06 17:32

I have a problem here

When coding in Python, I get this error :


Traceback (most recent call last):
File "exl13.py", line 3, in <module>
script, first, second, third - argv
NameError: name 'script' is not defined

Here's the code : pastebin.com/NYek4iAF

Am I doing something wrong?

Name: Anonymous 2011-02-06 17:35

Go back to stackoverflow.com.

Name: Anonymous 2011-02-06 17:35

Am I doing something wrong?

You're probably using a wrong version of Python.

Name: Anonymous 2011-02-06 17:37

>>3
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Name: Anonymous 2011-02-06 17:38

>>2
I wasn't on stackoverflow.com when I asked this.

I was on /g/, they redirected me to here

Name: Anonymous 2011-02-06 17:43

Am I doing something wrong?

What do you think?

Maybe the line NameError: name 'script' not defined indicates what's wrong.

Name: Anonymous 2011-02-06 17:44

>>5

/g/ is definitely the right place for this, just tell the one guy who spams links to /prog/ to fuck off.

Name: Anonymous 2011-02-06 17:45

>>5
noko goes in Email field.

Name: Anonymous 2011-02-06 17:51

How does /g/ know about /prog/ anyway? They're such a bunch of mouthbreathers, I didn't think they'd even know the texboards exist.

Name: Anonymous 2011-02-06 18:07

>>9
There is a certain individual there who gets really angry every time anyone posts anything about programming so he says he reports them and posts links to /prog/, he also does this in generally off-topic threads.

Name: Anonymous 2011-02-06 18:16

>>7,10
implying that's not you

Name: Anonymous 2011-02-06 18:18

>>10
Could someone please instruct that faggotconcerned gentleman to point those people to /halp/ instead of /prog/.

Name: Anonymous 2011-02-06 18:19

>>12
s/\./?/

Name: Anonymous 2011-02-06 18:25

just how many of you actually browse /g/?

Name: Anonymous 2011-02-06 18:28

>>14
I only browse /jp/ and /prog/.

Name: Anonymous 2011-02-06 18:31

>>14
I only browse /prague/, /gif/ and /toy/.

Name: Anonymous 2011-02-06 18:33

>>16
Since when they have /python/?

Name: Anonymous 2011-02-06 19:00

>>17
Tsk.

Name: Anonymous 2011-02-07 1:02

By looking at the script >>1 posted, IHBT.

Name: Anonymous 2011-02-07 1:36

>>15
>jp

lol fuck off weeaboo.

Name: Anonymous 2011-02-07 2:11

>>20
You've been here for about a week I'm guessing.

Name: Anonymous 2011-02-07 2:48

>>20
>jp
Y U DUNT QOTE PROPELY?

Name: Anonymous 2011-02-07 5:10

>>1
Use = instead of - at 3rd line
IHBT

Name: Anonymous 2011-02-08 21:34

#!/usr/bin/perl

my($script, $first, $second, $third) = ($0, @ARGV);

$\ = "\n";

print "The script is called: ", $script;
print "Your first variable is: ", $first;
print "Your second variable is: ", $second;
print "Your third variable is: ", $third;


Once again, Perl triumphs where all others fail.

Don't change these.
Name: Email:
Entire Thread Thread List