Re: how to detect comment in source code file ?

2013-09-04 Thread Ben Finney
vnkumbh...@gmail.com writes: > how works python interpreter for finding comment ? It works as specified in the language reference. In particular, see http://docs.python.org/3/reference/lexical_analysis.html#comments>. > if possible find nested comment ? Python's comments are line-end comments o

Re: Beginner's guide to Python

2013-09-04 Thread Chris Angelico
On Wed, Sep 4, 2013 at 3:26 PM, Steve Hayes wrote: > Can anyone recommend a web site that gives a good beginner's guide to Python? > > One that tells one, especially -- > > -- what kind of projects Python is good for > -- what kind of projects it is not good for > -- a simple explanation of how it

Re: Beginner's guide to Python

2013-09-04 Thread prashanth B.G
Hi Steve , These links might be of help . http://swaroopch.com/notes/python/ -- Very well explained for beginners http://www.diveintopython.net/ -- Must read to pick up advanced stuff . This can also be used as a starting point to figure out what python might be used for

Re: to be pythonic: should caller or callee log?

2013-09-04 Thread Gildor Oronar
El 04/09/13 10:26, Ethan Furman escribió: I would say it is not really the caller's or the callee's job to do the logging, even though it should be done. What would be really handy is a function that sat in between the caller and callee that logged for you -- you know, a decorator: Thanks a l

Re: to be pythonic: should caller or callee log?

2013-09-04 Thread Gildor Oronar
Thanks: El 04/09/13 05:01, Terry Reedy escribió: I would expect that every account class has a transaction method. * If so, just call it, but assertIsNot(DebitAccount.transaction, AbstractAccount.transaction) for every subclass in your test suite. * If not, perhaps you need an abstract subclass

Re: can't find win32api from embedded pyrun call

2013-09-04 Thread Tim Golden
On 03/09/2013 21:50, David M. Cotter wrote: > I find i'm having this problem, but the solution you found isn't > quite specific enough for me to be able to follow it. > > I'm embedding Python27 in my app. I have users install > ActivePython27 in order to take advantage of python in my app, so the

Re: how does not work nested comment in python?

2013-09-04 Thread Vlastimil Brom
2013/9/4 : > example: > > print "hello" # print comment +"world"=> single line comment > print "hello" '''print comment''' +"world" => multiple line comment > -- > https://mail.python.org/mailman/listinfo/python-list Hi, python only has single line comments, which apply from a "#" to the en

Re: UnicodeDecodeError issue

2013-09-04 Thread Antoon Pardon
Op 03-09-13 17:23, wxjmfa...@gmail.com schreef: > > > The Latin alphabet uses Greek lettering. > > The Cyrillic alphabet uses Greek lettering. > > Greek: One should not confuse modern Greek > with ancient Greek, polytonic Greek full > of diacritics. > > Plenty of European languages (~

Re: how to detect comment in source code file ?

2013-09-04 Thread Paul Rudin
Ben Finney writes: > vnkumbh...@gmail.com writes: > >> how works python interpreter for finding comment ? > > It works as specified in the language reference. In particular, see > http://docs.python.org/3/reference/lexical_analysis.html#comments>. > >> if possible find nested comment ? > > Python

Re: UnicodeDecodeError issue

2013-09-04 Thread Ferrous Cranus
Τη Δευτέρα, 2 Σεπτεμβρίου 2013 9:28:36 μ.μ. UTC+3, ο χρήστης Dave Angel έγραψε: > On 2/9/2013 11:05, Ferrous Cranus wrote: > > > > > Στις 2/9/2013 3:21 μμ, ο/η Dave Angel έγραψε: > > >> Starting with the byte string in the error message: > > > f = open("junk.txt", "w") > > > f.write(b

ANN: eGenix pyOpenSSL Distribution 0.13.2.1.0.1.5

2013-09-04 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.13.2.1.0.1.5 An easy-to-install and easy-to-use distribution of the pyOpenSSL Python interface fo

Re: MySQL data types vs Django/Python data types

2013-09-04 Thread Fábio Santos
On 1 Sep 2013 21:54, "Gary Roach" wrote: > > Hi all, > > System: > Debian Wheezy Linux > Python 2.7 > Django 1.5 > MySql 5.5 > > I am new to Python and Django and am having trouble matching Python data types with those of MySQL. MySQL has about 7 basic data types in

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Ferrous Cranus
Τη Τετάρτη, 4 Σεπτεμβρίου 2013 5:14:31 π.μ. UTC+3, ο χρήστης Piet van Oostrum έγραψε: > Where does it display that? > Do you happen to read that mail in a Microsoft program? yes. Thunderbird. > If yes, then it is the fault of that program. Read the mail in some > other program and you will pro

Downloading the feed using feedparser

2013-09-04 Thread mukesh tiwari
Hello all, I am trying to download the feed of http://blogs.forrester.com/feed but I am stuck with a problem. >>> import feedparser >>> d = feedparser.parse('http://blogs.forrester.com/feed') >>> d.etag u'"1378291653-1"' >>> d.modified 'Wed, 04 Sep 2013 10:47:33 +' >>> feedparser.parse('htt

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Dave Angel
On 4/9/2013 05:57, Ferrous Cranus wrote: > Τη Τετάρτη, 4 Σεπτεμβρίου 2013 5:14:31 π.μ. UTC+3, ο χρήστης Piet van Oostrum > έγραψε: > >> Where does it display that? >> Do you happen to read that mail in a Microsoft program? > > yes. Thunderbird. When did Microsoft take over Thunderbird's developm

Re: UnicodeDecodeError issue

2013-09-04 Thread Dave Angel
On 4/9/2013 04:35, Ferrous Cranus wrote: > Τη Δευτέρα, 2 Σεπτεμβρίου 2013 9:28:36 μ.μ. UTC+3, ο χρήστης Dave Angel > έγραψε: >> On 2/9/2013 11:05, Ferrous Cranus wrote: >> >> >> >> > Στις 2/9/2013 3:21 μμ, ο/η Dave Angel έγραψε: >> >> >> Starting with the byte string in the error message: >>

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Ferrous Cranus
Στις 4/9/2013 2:15 μμ, ο/η Dave Angel έγραψε: Τη Τετάρτη, 4 Σεπτεμβρίου 2013 5:14:31 π.μ. UTC+3, ο χρήστης Piet van Oostrum έγραψε: Where does it display that? Do you happen to read that mail in a Microsoft program? yes. Thunderbird. When did Microsoft take over Thunderbird's development

Re: UnicodeDecodeError issue

2013-09-04 Thread Ferrous Cranus
Στις 4/9/2013 2:26 μμ, ο/η Dave Angel έγραψε: On 4/9/2013 04:35, Ferrous Cranus wrote: Τη Δευτέρα, 2 Σεπτεμβρίου 2013 9:28:36 μ.μ. UTC+3, ο χρήστης Dave Angel έγραψε: On 2/9/2013 11:05, Ferrous Cranus wrote: Στις 2/9/2013 3:21 μμ, ο/η Dave Angel έγραψε: Starting with the byte string in

Re: Python TUI that will work on DOS/Windows and Unix/Linux

2013-09-04 Thread James Harris
"James Harris" wrote in message news:kvmvpg$g96$1...@dont-email.me... > Am looking for a TUI (textual user interface) mechanism to allow a Python > program to create and update a display in text mode. For example, if a > command prompt was sized 80x25 it would be made up of 80 x 25 = 2000 > ch

Re: how does not work nested comment in python?

2013-09-04 Thread Dave Angel
On 4/9/2013 02:13, vnkumbh...@gmail.com wrote: > example: > > print "hello" # print comment +"world"=> single line comment >>> print "hello" # print comment +"world"=> single line comment hello > print "hello" '''print comment''' +"world" => multiple line comment >>> print "hello"

Re: to be pythonic: should caller or callee log?

2013-09-04 Thread Xaxa Urtiz
Le mercredi 4 septembre 2013 09:44:27 UTC+2, Gildor Oronar a écrit : > Thanks: > > > > El 04/09/13 05:01, Terry Reedy escribió: > > > > > I would expect that every account class has a transaction method. > > > * If so, just call it, but > > > assertIsNot(DebitAccount.transaction, AbstractAc

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Dave Angel
On 4/9/2013 07:29, Ferrous Cranus wrote: > Στις 4/9/2013 2:15 μμ, ο/η Dave Angel έγραψε: >>> Τη Τετάρτη, 4 Σεπτεμβρίου 2013 5:14:31 π.μ. UTC+3, ο χρήστης Piet van >>> Oostrum έγραψε: Where does it display that? Do you happen to read that mail in a Microsoft program? >>> yes. Thunderbird

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 03.09.2013 09:48, schrieb Ferrous Cranus: > Si there a workaround for that please? Yes, use/setup your own mailserver. Google will not allow you to send as ("i.e., From:") an arbitrary address besides the one you've authenticated as. - -- - --- H

Re: UnicodeDecodeError issue

2013-09-04 Thread Dave Angel
On 4/9/2013 07:38, Ferrous Cranus wrote: > Στις 4/9/2013 2:26 μμ, ο/η Dave Angel έγραψε: >> So first in the interpreter, I ran f = open("junk.txt", "w") f.write(b'\xb6\xe3\xed\xf9\xf3\xf4\xef\xfc\xed\xef\xec\xe1 \xf3\xf5\xf3\xf4\xde\xec\xe

Re: UnicodeDecodeError issue

2013-09-04 Thread wxjmfauth
Le mercredi 4 septembre 2013 10:01:50 UTC+2, Antoon Pardon a écrit : > Op 03-09-13 17:23, wxjmfa...@gmail.com schreef: > > > > > > > > > > > The Latin alphabet uses Greek lettering. > > > > > > The Cyrillic alphabet uses Greek lettering. > > > > > > Greek: One should not confus

Dealing with \r in CSV fields in Python2.4

2013-09-04 Thread Tim Chase
I've got some old 2.4 code (requires an external lib that hasn't been upgraded) that needs to process a CSV file where some of the values contain \r characters. It appears that in more recent versions (just tested in 2.7; docs suggest this was changed in 2.5), Python does the Right Thing™ and just

Re: Dealing with \r in CSV fields in Python2.4

2013-09-04 Thread Skip Montanaro
> _csv.Error: newline inside string How are the lines actually terminated, with \r\n or with just \n? If it's just \n, what happens if you specify \n as the line terminator? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Ferrous Cranus
Στις 4/9/2013 3:18 μμ, ο/η Heiko Wundram έγραψε: Am 03.09.2013 09:48, schrieb Ferrous Cranus: Si there a workaround for that please? Yes, use/setup your own mailserver. Google will not allow you to send as ("i.e., From:") an arbitrary address besides the one you've authenticated as. Hello Hei

Re: Dealing with \r in CSV fields in Python2.4

2013-09-04 Thread MRAB
On 04/09/2013 16:04, Tim Chase wrote: I've got some old 2.4 code (requires an external lib that hasn't been upgraded) that needs to process a CSV file where some of the values contain \r characters. It appears that in more recent versions (just tested in 2.7; docs suggest this was changed in 2.5

Re: Dealing with \r in CSV fields in Python2.4

2013-09-04 Thread Tim Chase
On 2013-09-04 10:20, Skip Montanaro wrote: > > _csv.Error: newline inside string > > How are the lines actually terminated, with \r\n or with just \n? If > it's just \n, what happens if you specify \n as the line terminator? Unfortunately, the customer feed contains DOS newlines ("\r\n"). I'm

Re: UnicodeDecodeError issue

2013-09-04 Thread Ferrous Cranus
Στις 4/9/2013 3:38 μμ, ο/η Dave Angel έγραψε: 'file' isn't magic. And again, it doesn't look at the filename, it looks at the content. So, you are saying that it looks a the content of the file and not of what encoding we used to save the file into? But the contents have within: f.write(b'\x

Re: Dealing with \r in CSV fields in Python2.4

2013-09-04 Thread Tim Chase
On 2013-09-04 16:31, MRAB wrote: > You could try replacing the '\r' with another character that doesn't > appear elsewhere and then change it back afterwards. > > MARKER = '\x01' > > def cr_to_marker(f): > for line in f: > yield line.replace('\r', MARKER) > > def marker_to_cr(item)

Re: Beginner's guide to Python

2013-09-04 Thread Steve Hayes
On Wed, 4 Sep 2013 14:03:09 + (UTC), Grant Edwards wrote: >On 2013-09-04, Steve Hayes wrote: > >> Can anyone recommend a web site that gives a good beginner's guide to Python? > >http://www.greenteapress.com/thinkpython/ > >> -- what kind of projects Python is good for > >Text processing >Sc

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Piet van Oostrum
Heiko Wundram writes: > Am 03.09.2013 09:48, schrieb Ferrous Cranus: >> Si there a workaround for that please? > > Yes, use/setup your own mailserver. Google will not allow you to send > as ("i.e., From:") an arbitrary address besides the one you've > authenticated as. Actually, it does allow yo

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Piet van Oostrum
Ferrous Cranus writes: > I this hoq you mean? [...] > > SUBJECT = u"Mail από τον επισκέπτη: ( %s )" % FROM > > MESSAGE = "\nFrom: %s\r\n" + "To: %s\r\n" + "Subject: > %s\r\n\r\n" % ( FROM, [TO], SUBJECT ) +

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Piet van Oostrum
Ferrous Cranus writes: > I think it's logical to act that way. I think it is not, see my other post on this subject. > The real 'FROM' address that GMail uses to send mail from my 'mail.py' > to some recipient is my real GMail's account address, and not the FROM > address that any arbitrary po

Find out where a class is used throughout a program.

2013-09-04 Thread Azureaus
Hi All, I'm fairly new to Python so please forgive me If I sound confused or include anything a bit irrelevant. I've had some great responses from this group already though so thanks. I have a source file that is laid out roughly like class: class methods methods init statement class: method

ICCEBS 2013 – Announce & Invitation

2013-09-04 Thread tava...@fe.up.pt
Dear Colleague, We are pleased to announce the International Conference on Computational and Experimental Biomedical Sciences (ICCEBS2013 - www.fe.up.pt/~iccebs) in Ponta Delgada, S Miguel Island, Azores, October 20-22, 2013. The use of more robust, affordable and efficient techniques and techno

Re: Beginner's guide to Python

2013-09-04 Thread Grant Edwards
On 2013-09-04, Steve Hayes wrote: > Can anyone recommend a web site that gives a good beginner's guide to Python? http://www.greenteapress.com/thinkpython/ > -- what kind of projects Python is good for Text processing Scientific data analysis and visualization Database stuff CRM Web sites Data

nozama-cloudsearch-service a local Amazon CloudSearch instance.

2013-09-04 Thread Oisin Mulvihill
Hello, Have you ever wanted to test your app against a dev version of your production CloudSearch? Is management saying budget constraints won't allow this? Then Nozama CloudSearch is for you. It is a light weight implementation of Amazon's CloudSearch service you can run locally. Its has additio

How to exit a cgi file after a download

2013-09-04 Thread Ferrous Cranus
Python help. I use the following code in a cgi file to give the client a download link to download a file. --- print "%s" % (' Down Load ') A click on "Down Load" opens a pop up browser window which allows the user to choose where to download the "Setup.zip" file, then after the down

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Piet van Oostrum
Ferrous Cranus writes: > Στις 4/9/2013 3:18 μμ, ο/η Heiko Wundram έγραψε: >> Am 03.09.2013 09:48, schrieb Ferrous Cranus: >>> Si there a workaround for that please? >> Yes, use/setup your own mailserver. Google will not allow you to send >> as ("i.e., From:") an arbitrary address besides the one

Re: Downloading the feed using feedparser

2013-09-04 Thread Irmen de Jong
On 4-9-2013 13:12, mukesh tiwari wrote: > Hello all, I am trying to download the feed of > http://blogs.forrester.com/feed but I > am stuck with a problem. > import feedparser d = feedparser.parse('http://blogs.forrester.com/feed') d.etag > u'"1378291653-1"' d.modified > 'Wed, 04

Re: Reading from stdin first, then use curses

2013-09-04 Thread Veritatem Ignotam
I'd like to bump this. I asked a similar question a few weeks ago and had no reply. Here's my question: I'm fairly new to python and even newer to curses. Does any one have a good solution for how to embed the output of a subprocess (ex. subprocess.Popen("htop", stdout=subprocess.PIPE)) into an nc

How to exit a cgi file after a download.

2013-09-04 Thread inq1ltd
Python help. I use the following code in a cgi file to give the client a download link to download a file. --- print "%s" % (' Down Load ') A click on "Down Load" opens a pop up browser window which allows the user to choose where to download the "Setup.zip" file, then after the down

Re: Find out where a class is used throughout a program.

2013-09-04 Thread dieter
Azureaus writes: > ... > is there a way of finding out / visualising where a particular class is > called/used throughout a program? I do not know a simple and reliable way. When I face such a situation, I use standard operating system utilities (e.g. "grep -r" under *nix) to search for occurre

Broadcasting TimeSeries

2013-09-04 Thread Davide Dalmasso
Hello, I opened my Python Shell and I wrote the following: >>> import numpy as np >>> import pandas as pd then I made a function >>> def afunc(aframe): return aframe - aframe.mean(axis=1) and I defined a DataFrame with time as index >>> A = >>> pd.DataFrame(np.random.randn(5,3),columns=[

Re: Reading from stdin first, then use curses

2013-09-04 Thread Antoon Pardon
Op 04-09-13 20:45, Veritatem Ignotam schreef: I'd like to bump this. I asked a similar question a few weeks ago and had no reply. Here's my question: I'm fairly new to python and even newer to curses. Does any one have a good solution for how to embed the output of a subprocess (ex. subprocess.P

Re: How to exit a cgi file after a download.

2013-09-04 Thread Joel Goldstick
This same message comes up under one of Niko's many aliases. Is this another? Why post twice? On Wed, Sep 4, 2013 at 2:44 PM, inq1ltd wrote: > Python help. > > I use the following code in a cgi file > to give the client a download link to > download a file. > > --- > > print "%s" % (' Down > Lo

Re: How to exit a cgi file after a download

2013-09-04 Thread random832
On Wed, Sep 4, 2013, at 12:49, Ferrous Cranus wrote: > Without closing it, the client can download > again and forever if they choose to because > the cgi window is open and the link is still > active. Why is this a problem? They usually won't want to, and if they do want to (for example if th

Re: How to exit a cgi file after a download

2013-09-04 Thread Benjamin Kaplan
On Sep 4, 2013 1:29 PM, "Ferrous Cranus" wrote: > > Python help. > > I use the following code in a cgi file > to give the client a download link to > download a file. > > --- > > print "%s" % (' Down > Load ') > > > > A click on "Down Load" opens a pop up browser > window which allows the use

Re: Find out where a class is used throughout a program.

2013-09-04 Thread Irmen de Jong
On 4-9-2013 22:08, dieter wrote: > Azureaus writes: >> ... >> is there a way of finding out / visualising where a particular class is >> called/used throughout a program? > > I do not know a simple and reliable way. Not 100% reliable, but arguably easier than reverting to simple text search to

Re: Find out where a class is used throughout a program.

2013-09-04 Thread Terry Reedy
On 9/4/2013 4:08 PM, dieter wrote: Azureaus writes: ... is there a way of finding out / visualising where a particular class is called/used throughout a program? I do not know a simple and reliable way. When I face such a situation, I use standard operating system utilities (e.g. "grep -r"

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Piet van Oostrum
Piet van Oostrum writes: > Ferrous Cranus writes: > >> I this hoq you mean? > [...] >> >> SUBJECT = u"Mail από τον επισκέπτη: ( %s )" % FROM >> >> MESSAGE = "\nFrom: %s\r\n" + "To: %s\r\n" + "Subject: >> %s\r\

Re: Dealing with \r in CSV fields in Python2.4

2013-09-04 Thread Terry Reedy
On 9/4/2013 11:04 AM, Tim Chase wrote: I've got some old 2.4 code (requires an external lib that hasn't been upgraded) that needs to process a CSV file where some of the values contain \r characters. It appears that in more recent versions (just tested in 2.7; docs suggest this was changed in 2.

Re: Broadcasting TimeSeries

2013-09-04 Thread Terry Reedy
On 9/4/2013 4:06 PM, Davide Dalmasso wrote: I opened my Python Shell and I wrote the following: This is with Idle. I believe you are running on Windows. import numpy as np import pandas as pd then I made a function def afunc(aframe): return aframe - aframe.mean(axis=1) and I defin

a dialog for throublshooting instead of print command pyqt

2013-09-04 Thread Mohsen Pahlevanzadeh
Dear all, I need to a dialg such as aler in javascript in pyqt, my question is at: http://stackoverflow.com/questions/18625406/a-dialog-for-throublshooting-instead-of-print-command-pyqt Before answering, thank you... Yours, Mohsen -- https://mail.python.org/mailman/listinfo/python-list

Re: How to exit a cgi file after a download.

2013-09-04 Thread alex23
On 5/09/2013 5:42 AM, Joel Goldstick wrote: This same message comes up under one of Niko's many aliases. Is this another? Why post twice? Because he's a troll. -- https://mail.python.org/mailman/listinfo/python-list

Re: Find out where a class is used throughout a program.

2013-09-04 Thread alex23
On 5/09/2013 2:32 AM, Azureaus wrote: To try and make this question as general as possible - is there a way of finding out / visualising where a particular class is called/used throughout a program? One option is to produce call graphs of the running code: http://pycallgraph.slowchop.com/ --

Re: UnicodeDecodeError issue

2013-09-04 Thread Dave Angel
On 4/9/2013 10:29, Ferrous Cranus wrote: > Στις 4/9/2013 3:38 μμ, ο/η Dave Angel έγραψε: >> 'file' isn't magic. And again, it doesn't look at the filename, it >> looks at the content. > So, you are saying that it looks a the content of the file and not of > what encoding we used to save the file

Re: Find out where a class is used throughout a program.

2013-09-04 Thread Roy Smith
In article <9d290db6-b9cb-41af-8107-e7f27d2da...@googlegroups.com>, Azureaus wrote: > To try and make this question as general as possible - is there a way of > finding out / visualising where a particular class is called/used throughout > a program? Sure. $ cd $ find . -name "*.py" | xarg

Re: how to detect comment in source code file ?

2013-09-04 Thread Steven D'Aprano
On Wed, 04 Sep 2013 17:02:42 +1000, Ben Finney wrote: > vnkumbh...@gmail.com writes: > >> how works python interpreter for finding comment ? > > It works as specified in the language reference. In particular, see > http://docs.python.org/3/reference/lexical_analysis.html#comments>. > >> if poss

Re: Find out where a class is used throughout a program.

2013-09-04 Thread Steven D'Aprano
On Wed, 04 Sep 2013 09:32:28 -0700, Azureaus wrote: > To try and make this question as general as possible - is there a way of > finding out / visualising where a particular class is called/used > throughout a program? I need to find out the way in which these classes > are being used and their ty

Re: UnicodeDecodeError issue

2013-09-04 Thread Steven D'Aprano
On Thu, 05 Sep 2013 00:17:36 +, Dave Angel wrote: > On 4/9/2013 10:29, Ferrous Cranus wrote: > >> Στις 4/9/2013 3:38 μμ, ο/η Dave Angel έγραψε: >>> 'file' isn't magic. And again, it doesn't look at the filename, it >>> looks at the content. >> So, you are saying that it looks a the content o

Modest book on Python grahpics several years ago

2013-09-04 Thread W. eWatson
About 4-5 years ago, two authors (possibly one) wrote a book on Python for beginners. It was probably no more than 200 pages thick, and likely cost close to $25. Several years later they wrote another book on Python graphics. Does anyone recall the name of these books? I don't think it was p

Re: UnicodeDecodeError issue

2013-09-04 Thread Chris Angelico
On Thu, Sep 5, 2013 at 1:07 PM, Steven D'Aprano wrote: > Technically, it's not ASCII, since ASCII only knows about bytes \x00 > through \x7F (decimal 0 through 127). That's why it isn't correct to > describe Python bytes strings as "ASCII strings". They're byte strings > that happen to be displaye

Re: Beginner's guide to Python

2013-09-04 Thread Andrew Berg
On 2013.09.04 22:39, Dennis Lee Bieber wrote: > On Wed, 04 Sep 2013 07:26:47 +0200, Steve Hayes > declaimed the following: > >>Can anyone recommend a web site that gives a good beginner's guide to Python? >> >>One that tells one, especially -- >> >>-- what kind of projects Python is good for >

Re: Beginner's guide to Python

2013-09-04 Thread Chris Angelico
On Thu, Sep 5, 2013 at 2:03 PM, Andrew Berg wrote: > On 2013.09.04 22:39, Dennis Lee Bieber wrote: >> On Wed, 04 Sep 2013 07:26:47 +0200, Steve Hayes >> declaimed the following: >> >>>Can anyone recommend a web site that gives a good beginner's guide to Python? >>> >>>One that tells one, especial

NameError: global name '' is not defined , but a bit differences

2013-09-04 Thread Mohsen Pahlevanzadeh
Dear all , i get the error : NameError: global name 'ui' is not defined Complete question is at : http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-differences Before answering, Thank you for your attention...! Yours, Mohsen -- https://mail.python.org/ma

Re: UnicodeDecodeError issue

2013-09-04 Thread Cameron Simpson
On 04Sep2013 12:38, Dave Angel wrote: | 'file' isn't magic. Chuckle... | What heuristics it uses, I don't know, but it has | hundreds of them. ... because the file of heuristics is /usr/share/file/magic :-) See "man 5 magic". Cheers, -- Cameron Simpson A vacuum is a hell of a lot better tha

Re: UnicodeDecodeError issue

2013-09-04 Thread Steven D'Aprano
On Thu, 05 Sep 2013 13:59:17 +1000, Chris Angelico wrote: > On Thu, Sep 5, 2013 at 1:07 PM, Steven D'Aprano > wrote: >> Technically, it's not ASCII, since ASCII only knows about bytes \x00 >> through \x7F (decimal 0 through 127). That's why it isn't correct to >> describe Python bytes strings as

Re: how to detect comment in source code file ?

2013-09-04 Thread Vincent Vande Vyvre
Le 04/09/2013 08:05, vnkumbh...@gmail.com a écrit : how works python interpreter for finding comment ? if possible find nested comment ? If you need to find it yourself, you can use the module tokenize. ex.: --- import tokenize from St

Re: NameError: global name '' is not defined , but a bit differences

2013-09-04 Thread Benjamin Kaplan
On Wed, Sep 4, 2013 at 9:17 PM, Mohsen Pahlevanzadeh wrote: > Dear all , > > i get the error : > > NameError: global name 'ui' is not defined > > Complete question is at : > http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-differences > > Before answering, Thank

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Ferrous Cranus
Στις 4/9/2013 7:16 μμ, ο/η Piet van Oostrum έγραψε: Ferrous Cranus writes: I this hoq you mean? [...] SUBJECT = u"Mail από τον επισκέπτη: ( %s )" % FROM MESSAGE = "\nFrom: %s\r\n" + "To: %s\r\n"