Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43570
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <nagia.retsina@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'scripts': 0.03; 'skip:[ 20': 0.04; 'syntax': 0.04; 'messages.': 0.05; 'root': 0.05; 'subject:Python': 0.06; 'debugging': 0.07; 'python3': 0.07; 'restarting': 0.07; 'exec': 0.09; 'hooks': 0.09; 'missing)': 0.09; 'restart': 0.09; 'to:addr:comp.lang.python': 0.09; 'wrapper': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'apache': 0.15; 'damage.': 0.16; 'name).': 0.16; 'simpson': 0.16; 'skip:[ 30': 0.16; 'stderr': 0.16; 'subject:Unicode': 0.16; 'subject:issue': 0.16; 'syntaxerror:': 0.16; 'too?': 0.16; 'wrote:': 0.18; 'command': 0.22; 'cc:addr:gmail.com': 0.22; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; 'script.': 0.24; 'cheers,': 0.24; 'file.': 0.24; '(or': 0.24; 'environment': 0.24; 'sort': 0.25; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'appear': 0.29; 'change,': 0.30; 'along': 0.30; '(which': 0.31; 'cgi': 0.31; 'gather': 0.31; 'file': 0.32; 'there.': 0.32; 'probably': 0.32; 'stuff': 0.32; 'supposed': 0.32; 'run': 0.32; 'another': 0.32; 'open': 0.33; 'running': 0.33; 'cc:no real name:2**1': 0.33; 'subject:with': 0.35; 'no,': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'should': 0.36; 'too': 0.37; 'server': 0.38; 'feed': 0.38; 'writes': 0.38; 'anything': 0.39; 'days': 0.60; 'even': 0.60; 'money.': 0.60; 'skip:2 20': 0.60; 'most': 0.60; 'from:no real name:2**0': 0.61; 'browser': 0.61; 'further': 0.61; 'you.': 0.62; 'here:': 0.62; 'email addr:gmail.com': 0.63; 'such': 0.63; 'visit': 0.64; 'provide': 0.64; 'invalid': 0.68; 'line,': 0.68; 'prompt': 0.68; 'said:': 0.68; '8bit%:92': 0.71; '8bit%:100': 0.72; 'touch': 0.74; 'browser.': 0.78; 'account.': 0.80; 'env': 0.84; 'skip:/ 30': 0.84; 'yourself..': 0.84; '6.4': 0.91; 'lord': 0.91; 'anymore,': 0.95; '2013': 0.98 |
| X-Received | by 10.49.61.234 with SMTP id t10mr1331509qer.16.1365938569649; Sun, 14 Apr 2013 04:22:49 -0700 (PDT) |
| Newsgroups | comp.lang.python |
| Date | Sun, 14 Apr 2013 04:22:49 -0700 (PDT) |
| In-Reply-To | <mailman.584.1365931737.3114.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=94.68.88.82; posting-account=hGu1uQoAAACZy7LiR653nG0NwqDrTyoS |
| References | <f6140a71-533e-4a6c-810d-6b8b1b046932@googlegroups.com> <mailman.584.1365931737.3114.python-list@python.org> |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-IP | 94.68.88.82 |
| MIME-Version | 1.0 |
| Subject | Re: Unicode issue with Python v3.3 |
| From | nagia.retsina@gmail.com |
| To | comp.lang.python@googlegroups.com |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| Cc | nagia.retsina@gmail.com, python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Message-ID | <mailman.585.1365938578.3114.python-list@python.org> (permalink) |
| Lines | 198 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1365938578 news.xs4all.nl 2709 [2001:888:2000:d::a6]:34040 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:43570 |
Show key headers only | View raw
Τη Κυριακή, 14 Απριλίου 2013 12:28:32 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε:
> On 13Apr2013 23:00, nagia.retsina@gmail.com <nagia.retsina@gmail.com> wrote:
>
> | root@nikos [/home/nikos/public_html/foo-py]# pwd
>
> | /home/nikos/public_html/foo-py
>
> | root@nikos [/home/nikos/public_html/foo-py]# cat foo.py
>
> | #!/bin/sh
>
> | exec 2>>/home/nikos/cgi.err.out
>
> | echo "$0 $*" >&2
>
> | id >&2
>
> | env | sort >&2
>
> | set -x
>
> | exec /full/path/to/foo-py ${1+"$@"}
>
> |
>
> | root@nikos [/home/nikos/public_html/foo-py]# python3 foo.py
>
> | File "foo.py", line 2
>
> | exec 2>>/home/nikos/cgi.err.out
>
> | ^
>
> | SyntaxError: invalid syntax
>
>
>
> That is because foo.py isn't a python script anymore, it is a shell script.
>
> Its purpose is to divert stderr to a file and to recite various
>
> things about the environment to that file in addition to any error
>
> messages.
>
>
>
> Just run it directly:
>
>
>
> ./foo.py
>
>
>
> The #! line should cause it to be run by the shell.
>
>
>
> I also recommend you try to do all this as your normal user account.
>
> Root is for administration, such as stopping/starting apache and
>
> so on. Not test running scripts from the command line; consider:
>
> if the script has bugs, as root it can do an awful lot of damage.
>
>
>
> | root@nikos [/home/nikos/public_html/foo-py]#
>
> | As far as thr tail -f of the error_log:
>
> | root@nikos [/home/nikos/public_html]# touch /var/log/httpd/error_log
>
>
>
> That won't do you much good; apache has not opened it, and so it
>
> will not be writing to it. It was writing to a file of that name,
>
> but you removed that file. Apache probably still has its hooks in the old
>
> file (which now has no name).
>
>
>
> Restarting apache should open (or create if missing) this file for you.
>
>
>
> | root@nikos [/home/nikos/public_html]# tail -f /var/log/httpd/error_log
>
> | and its empty even when at the exact same time i run 'python3
>
> | metrites.py' from another interactive prompt when it supposed to
>
> | give live feed of the error messages.
>
>
>
> No, _apache_ writes to that file. So only when you visit the web
>
> page will stuff appear there.
>
>
>
> If you just run things from the command line, error messages will appear on your terminal. Or, after this line of the wrapper script:
>
>
>
> exec 2>>/home/nikos/cgi.err.out
>
>
>
> the error messages will appear in cgi.err.out.
>
>
>
> | Cameron would it be too much to ask to provide you with root
>
> | access to my VPS server so you can have a look there too?
>
> | i can pay you if you like if you wait a few days to gather some money.
>
>
>
> I really do not recommend that:
>
>
>
> - it is nuts to blithely allow a stranger root access to your system
>
> - you won't learn anything about CGI scripts
>
>
>
> What you need for further debugging of your python issues is access
>
> to the error messages from the CGI script. That is the purpose of
>
> the wrapper script.
>
>
>
> Get the wrapper running on the command line and then test it via the browser.
>
>
>
> Cheers,
>
> --
>
> Cameron Simpson <cs@zip.com.au>
>
>
>
> Lord grant me the serenity to accept the things I can not change,
>
> the courage to change the things that I can,
>
> and the wisdom to hide the bodies of those people I had to kill
>
> because they pissed me off.
>
> - Jeffrey Papen <JPapen@asucla.ucla.edu>
Well i trust you because you are the only one along with Lele that are helpimg me here:
i tried what you said:
root@nikos [/home/nikos/public_html/cgi-bin]# service httpd restart
root@nikos [/home/nikos/public_html/cgi-bin]# python3 metrites.py
root@nikos [/home/nikos/public_html]# cd foo-py/
root@nikos [/home/nikos/public_html/foo-py]# ls
./ ../ foo.py*
root@nikos [/home/nikos/public_html/foo-py]# ./foo.py
root@nikos [/home/nikos/public_html/foo-py]# cd ..
root@nikos [/home/nikos/public_html]# cat cgi.err.out
root@nikos [/home/nikos/public_html/cgi-bin]# cat /var/log/httpd/error_log
root@nikos [/home/nikos/public_html/cgi-bin]#
and i have run the script form browser but i still see nothing.
I insist that you will make the most of this if you access the VPS yourself.
it runs CentOS 6.4
Please accept, i trust you.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-09 14:10 -0700
Re: Unicode issue with Python v3.3 Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-09 15:34 -0600
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-09 20:16 -0700
Re: Unicode issue with Python v3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-10 04:25 +0000
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-10 14:46 +1000
Re: Unicode issue with Python v3.3 rusi <rustompmody@gmail.com> - 2013-04-09 22:06 -0700
Re: Unicode issue with Python v3.3 rusi <rustompmody@gmail.com> - 2013-04-09 23:04 -0700
Re: Unicode issue with Python v3.3 Antoine Pitrou <solipsis@pitrou.net> - 2013-04-10 07:04 +0000
Re: Unicode issue with Python v3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-10 08:28 +0000
People in the python community [was Re: Unicode issue with Python v3.3] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-10 08:34 +0000
Re: People in the python community [was Re: Unicode issue with Python v3.3] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-10 10:31 +0100
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 03:50 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 03:50 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 03:53 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 03:53 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Peter Otten <__peter__@web.de> - 2013-04-10 13:11 +0200
Re: People in the python community [was Re: Unicode issue with Python v3.3] Peter Otten <__peter__@web.de> - 2013-04-10 13:13 +0200
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 07:43 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-10 16:15 +0100
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 09:50 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Michael Torrie <torriem@gmail.com> - 2013-04-11 21:20 -0600
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 09:50 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Chris Angelico <rosuav@gmail.com> - 2013-04-11 01:19 +1000
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 07:43 -0700
Re: Unicode issue with Python v3.3 Arnaud Delobelle <arnodel@gmail.com> - 2013-04-10 23:56 +0100
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-10 00:23 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 01:06 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-11 09:17 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-10 21:50 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-11 20:45 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 03:54 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 03:54 -0700
Re: Unicode issue with Python v3.3 Nikos <nagia.retsina@gmail.com> - 2013-04-11 09:55 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-13 11:41 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 21:50 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-13 20:28 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-13 07:16 -0700
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-14 01:45 +1000
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-14 10:01 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-13 07:16 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 21:50 -0700
Re: Unicode issue with Python v3.3 Nikos <nagia.retsina@gmail.com> - 2013-04-11 09:55 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-10 21:50 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 00:13 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 00:13 -0700
Re: Unicode issue with Python v3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-11 07:50 +0000
Re: Unicode issue with Python v3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-11 08:20 +0000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 03:07 -0700
Re: Unicode issue with Python v3.3 Lele Gaifax <lele@metapensiero.it> - 2013-04-11 12:45 +0200
Re: Unicode issue with Python v3.3 Nobody <nobody@nowhere.com> - 2013-04-10 19:08 +0100
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 11:25 -0700
Re: Unicode issue with Python v3.3 Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-10 13:50 -0600
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-09 20:16 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 21:36 -0700
Re: Unicode issue with Python v3.3 alex23 <wuwei23@gmail.com> - 2013-04-11 22:06 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 22:42 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 05:50 -0700
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-12 23:14 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 06:18 -0700
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-12 23:21 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 06:18 -0700
Re: Unicode issue with Python v3.3 rusi <rustompmody@gmail.com> - 2013-04-12 06:29 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 07:36 -0700
Re: Unicode issue with Python v3.3 Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-12 12:37 -0600
Re: Unicode issue with Python v3.3 Roy Smith <roy@panix.com> - 2013-04-12 14:49 -0400
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 13:48 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 13:48 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-13 23:00 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-14 19:28 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-14 04:22 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-18 09:00 +1000
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-17 20:37 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-17 20:37 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-19 12:16 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-14 04:22 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-15 11:42 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-15 11:42 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-16 23:56 -0700
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-17 17:01 +1000
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-17 17:32 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-16 23:56 -0700
csiph-web