Re: Python for WEB-page !?

2017-01-19 Thread Johann Spies
It might be worth while to look at web2py (http://web2py.com).

Here is a good tutorial: http://killer-web-development.com/

Regards
Johann

-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-08 Thread Eric S. Johansson
On 1/5/2017 7:48 PM, Michael Torrie wrote:
> While Python can do that, using a web framework to process HTTP requests
> and generate HTML to display in the browser, I don't believe Python is
> the appropriate language for the task at hand.  Most web sites that do
> interactive formula calculations like you describe do it all in the
> browser using Javascript.  No need to have a web server do all that
> heavy lifting at all.  A simple html file would contain everything you need.
>
> Even if you want to use Python to generate the web page and process
> events, you'll still have to master Javascript at some point to make the
> webpages more interactive.

There are a few implementations of Python that generate code that can
run the browser. I'm currently using brython and its significantly
easier than struggling with JavaScript. It's not perfect by any means,
it has its own quirks and bugs but the developer is very responsive, the
product is getting better every month and I like to see the Python
community give it a bit more love

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-06 Thread Michael Torrie
On 01/05/2017 04:53 PM, Victor Porton wrote:
> Ionut Predoiu wrote:
>
>> I am a beginner in programming language.
>> I want to know what version of Python I must to learn to use, beside of
>> basic language, because I want to integrate in my site 1 page in which
>> users to can made calculus based on my formulas already write behind (the
>> users will only complete some field, and after push "Calculate" button
>> will see the results in form of: table, graphic, and so on ...). Please
>> take into account that behind will be more mathematical
>> equations/formulas, so the speed I think must be take into account.
>
> Consider PyPi. I never used it, but they say, it is faster than usual
> CPython interpreter.

With respect, I don't think it's appropriate to direct a python beginner to 
PyPi.  Far better to direct him to the relevant resources (like Django) and 
focus him on the standard Python interpreter, hopefully version 3.

Besides that, there's the old expression. Premature optimization is the root of 
all evil.  Until Python is shown to be too slow for a given task, it's 
premature to think about speedups like Cython or even PyPi.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-06 Thread Michael Torrie
On 01/05/2017 05:57 AM, Ionut Predoiu wrote:
> Good afternoon,
>
> I am a beginner in programming language. I want to know what version
> of Python I must to learn to use, beside of basic language, because I
> want to integrate in my site 1 page in which users to can made
> calculus based on my formulas already write behind (the users will
> only complete some field, and after push "Calculate" button will see
> the results in form of: table, graphic, and so on ...). Please take
> into account that behind will be more mathematical
> equations/formulas, so the speed I think must be take into account.

While Python can do that, using a web framework to process HTTP requests and 
generate HTML to display in the browser, I don't believe Python is the 
appropriate language for the task at hand.  Most web sites that do interactive 
formula calculations like you describe do it all in the browser using 
Javascript.  No need to have a web server do all that heavy lifting at all.  A 
simple html file would contain everything you need.

Even if you want to use Python to generate the web page and process events, 
you'll still have to master Javascript at some point to make the webpages more 
interactive.

-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Python for WEB-page !?

2017-01-06 Thread Deborah Swanson
Ionut Predoiu wrote, on January 05, 2017 11:07 PM
>
> Good morning,
>
> Thanks to all for feedback and advice.
> Because I am a beginner I will read more about versions of
> Python recommended by you.
>
> On the other side I am interested to know if exist some sites
> which have develop platform where can be use for free Python
> from browsers, without have it installed on PC/laptop. As
> beginner I want to practice from everywhere.

There's a website called Python Tutor where you can write Python programs and 
it will show you the structures built in memory as it executes. It's  very 
useful for seeing how recursive functions work, or any function or class you 
call. It will also work for simple programs and it has an output console you 
can print to.  (Well, it's more like a print window, but it works.) Very good 
for beginners, I used it all the time when I was first learning, and I still 
use it for recursive functions, since PyCharm doesn't step through recursion in 
a clear way.

http://pythontutor.com/


> I waiting with higher interest your feedback.
>
> Thanks to all members of community for support and advice.
> Keep in touch.
> Kind regards.
>
>
>
> On Thursday, January 5, 2017 at 2:57:23 PM UTC+2, Ionut Predoiu wrote:
> > Good afternoon,
> >
> > I am a beginner in programming language.
> > I want to know what version of Python I must to learn to
> use, beside of basic language, because I want to integrate in
> my site 1 page in which users to can made calculus based on
> my formulas already write behind (the users will only
> complete some field, and after push "Calculate" button will
> see the results in form of: table, graphic, and so on ...).
> > Please take into account that behind will be more
> mathematical equations/formulas, so the speed I think must be
> take into account.
> >
> > I waiting with higher interest your feedback.
> >
> > Thanks to all members of community for support and advice. Keep in
> > touch. Kind regards.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-06 Thread Victor Porton
Ionut Predoiu wrote:

> I am a beginner in programming language.
> I want to know what version of Python I must to learn to use, beside of
> basic language, because I want to integrate in my site 1 page in which
> users to can made calculus based on my formulas already write behind (the
> users will only complete some field, and after push "Calculate" button
> will see the results in form of: table, graphic, and so on ...). Please
> take into account that behind will be more mathematical
> equations/formulas, so the speed I think must be take into account.

Consider PyPi. I never used it, but they say, it is faster than usual CPython 
interpreter.

> I waiting with higher interest your feedback.
>
> Thanks to all members of community for support and advice.
> Keep in touch.
> Kind regards.

--
Victor Porton - http://portonvictor.org

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-06 Thread Ionut Predoiu
Good morning,

Thanks to all for feedback and advice. Because I am a beginner I will read more 
about versions of Python recommended by you.

On the other side I am interested to know if exist some sites which have 
develop platform where can be use for free Python from browsers, without have 
it installed on PC/laptop. As beginner I want to practice from everywhere.

I waiting with higher interest your feedback.

Thanks to all members of community for support and advice. Keep in touch.
Kind regards.



On Thursday, January 5, 2017 at 2:57:23 PM UTC+2, Ionut Predoiu wrote:
> Good afternoon,
>
> I am a beginner in programming language.
> I want to know what version of Python I must to learn to use, beside of basic
language, because I want to integrate in my site 1 page in which users to can 
made calculus based on my formulas already write behind (the users will only 
complete some field, and after push "Calculate" button will see the results in 
form of: table, graphic, and so on ...).
> Please take into account that behind will be more mathematical
equations/formulas, so the speed I think must be take into account.
>
> I waiting with higher interest your feedback.
>
> Thanks to all members of community for support and advice.
> Keep in touch.
> Kind regards.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-06 Thread Ionut Predoiu
Good afternoon,

Thank you for advice and promptitude in answer.

Keep in touch for further questions.
Kind regards.

On Thursday, January 5, 2017 at 2:57:23 PM UTC+2, Ionut Predoiu wrote:
> Good afternoon,
> 
> I am a beginner in programming language. 
> I want to know what version of Python I must to learn to use, beside of basic 
> language, because I want to integrate in my site 1 page in which users to can 
> made calculus based on my formulas already write behind (the users will only 
> complete some field, and after push "Calculate" button will see the results 
> in form of: table, graphic, and so on ...). 
> Please take into account that behind will be more mathematical 
> equations/formulas, so the speed I think must be take into account.
> 
> I waiting with higher interest your feedback.
> 
> Thanks to all members of community for support and advice.
> Keep in touch.
> Kind regards.

-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Python for WEB-page !?

2017-01-06 Thread Deborah Swanson
Ionut Predoiu wrote, on January 05, 2017 11:07 PM
> 
> Good morning,
> 
> Thanks to all for feedback and advice.
> Because I am a beginner I will read more about versions of 
> Python recommended by you.
> 
> On the other side I am interested to know if exist some sites 
> which have develop platform where can be use for free Python 
> from browsers, without have it installed on PC/laptop. As 
> beginner I want to practice from everywhere.

There's a website called Python Tutor where you can write Python
programs and it will show you the structures built in memory as it
executes. It's  very useful for seeing how recursive functions work, or
any function or class you call. It will also work for simple programs
and it has an output console you can print to.  (Well, it's more like a
print window, but it works.) Very good for beginners, I used it all the
time when I was first learning, and I still use it for recursive
functions, since PyCharm doesn't step through recursion in a clear way.

http://pythontutor.com/

 
> I waiting with higher interest your feedback. 
> 
> Thanks to all members of community for support and advice. 
> Keep in touch. 
> Kind regards. 
> 
> 
> 
> On Thursday, January 5, 2017 at 2:57:23 PM UTC+2, Ionut Predoiu wrote:
> > Good afternoon,
> > 
> > I am a beginner in programming language.
> > I want to know what version of Python I must to learn to 
> use, beside of basic language, because I want to integrate in 
> my site 1 page in which users to can made calculus based on 
> my formulas already write behind (the users will only 
> complete some field, and after push "Calculate" button will 
> see the results in form of: table, graphic, and so on ...). 
> > Please take into account that behind will be more 
> mathematical equations/formulas, so the speed I think must be 
> take into account.
> > 
> > I waiting with higher interest your feedback.
> > 
> > Thanks to all members of community for support and advice. Keep in 
> > touch. Kind regards.
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-06 Thread Ionut Predoiu
Good morning,

Thanks to all for feedback and advice.
Because I am a beginner I will read more about versions of Python recommended 
by you.

On the other side I am interested to know if exist some sites which have 
develop platform where can be use for free Python from browsers, without have 
it installed on PC/laptop. As beginner I want to practice from everywhere.

I waiting with higher interest your feedback. 

Thanks to all members of community for support and advice. 
Keep in touch. 
Kind regards. 



On Thursday, January 5, 2017 at 2:57:23 PM UTC+2, Ionut Predoiu wrote:
> Good afternoon,
> 
> I am a beginner in programming language. 
> I want to know what version of Python I must to learn to use, beside of basic 
> language, because I want to integrate in my site 1 page in which users to can 
> made calculus based on my formulas already write behind (the users will only 
> complete some field, and after push "Calculate" button will see the results 
> in form of: table, graphic, and so on ...). 
> Please take into account that behind will be more mathematical 
> equations/formulas, so the speed I think must be take into account.
> 
> I waiting with higher interest your feedback.
> 
> Thanks to all members of community for support and advice.
> Keep in touch.
> Kind regards.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-05 Thread breamoreboy
On Thursday, January 5, 2017 at 11:53:51 PM UTC, Victor Porton wrote:
> Ionut Predoiu wrote:
> 
> > I am a beginner in programming language.
> > I want to know what version of Python I must to learn to use, beside of
> > basic language, because I want to integrate in my site 1 page in which
> > users to can made calculus based on my formulas already write behind (the
> > users will only complete some field, and after push "Calculate" button
> > will see the results in form of: table, graphic, and so on ...). Please
> > take into account that behind will be more mathematical
> > equations/formulas, so the speed I think must be take into account.
> 
> Consider PyPi. I never used it, but they say, it is faster than usual 
> CPython interpreter.
> 

Really?  I'd strongly contrast the Python Package Index 
https://pypi.python.org/pypi with the Python implementation pypy at 
http://pypy.org/ :)

> -- 
> Victor Porton - http://portonvictor.org

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-05 Thread Michael Torrie
On 01/05/2017 05:57 AM, Ionut Predoiu wrote:
> Good afternoon,
> 
> I am a beginner in programming language. I want to know what version
> of Python I must to learn to use, beside of basic language, because I
> want to integrate in my site 1 page in which users to can made
> calculus based on my formulas already write behind (the users will
> only complete some field, and after push "Calculate" button will see
> the results in form of: table, graphic, and so on ...). Please take
> into account that behind will be more mathematical
> equations/formulas, so the speed I think must be take into account.

While Python can do that, using a web framework to process HTTP requests
and generate HTML to display in the browser, I don't believe Python is
the appropriate language for the task at hand.  Most web sites that do
interactive formula calculations like you describe do it all in the
browser using Javascript.  No need to have a web server do all that
heavy lifting at all.  A simple html file would contain everything you need.

Even if you want to use Python to generate the web page and process
events, you'll still have to master Javascript at some point to make the
webpages more interactive.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-05 Thread Michael Torrie
On 01/05/2017 04:53 PM, Victor Porton wrote:
> Ionut Predoiu wrote:
> 
>> I am a beginner in programming language.
>> I want to know what version of Python I must to learn to use, beside of
>> basic language, because I want to integrate in my site 1 page in which
>> users to can made calculus based on my formulas already write behind (the
>> users will only complete some field, and after push "Calculate" button
>> will see the results in form of: table, graphic, and so on ...). Please
>> take into account that behind will be more mathematical
>> equations/formulas, so the speed I think must be take into account.
> 
> Consider PyPi. I never used it, but they say, it is faster than usual 
> CPython interpreter.

With respect, I don't think it's appropriate to direct a python beginner
to PyPi.  Far better to direct him to the relevant resources (like
Django) and focus him on the standard Python interpreter, hopefully
version 3.

Besides that, there's the old expression. Premature optimization is the
root of all evil.  Until Python is shown to be too slow for a given
task, it's premature to think about speedups like Cython or even PyPi.


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-05 Thread Victor Porton
Ionut Predoiu wrote:

> I am a beginner in programming language.
> I want to know what version of Python I must to learn to use, beside of
> basic language, because I want to integrate in my site 1 page in which
> users to can made calculus based on my formulas already write behind (the
> users will only complete some field, and after push "Calculate" button
> will see the results in form of: table, graphic, and so on ...). Please
> take into account that behind will be more mathematical
> equations/formulas, so the speed I think must be take into account.

Consider PyPi. I never used it, but they say, it is faster than usual 
CPython interpreter.

> I waiting with higher interest your feedback.
> 
> Thanks to all members of community for support and advice.
> Keep in touch.
> Kind regards.

-- 
Victor Porton - http://portonvictor.org
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-05 Thread Uri Even-Chen
I recommend starting with Python 3, I also use it (3.5.2) for my Django
projects - Speedy Net and Speedy Match.

Uri.


*Uri Even-Chen*
[image: photo] Phone: +972-54-3995700
Email: u...@speedy.net
Website: http://www.speedysoftware.com/uri/en/
  
    


On Thu, Jan 5, 2017 at 5:18 PM, Chris Angelico  wrote:

> On Thu, Jan 5, 2017 at 11:57 PM, Ionut Predoiu 
> wrote:
> > I am a beginner in programming language.
> > I want to know what version of Python I must to learn to use, beside of
> basic language, because I want to integrate in my site 1 page in which
> users to can made calculus based on my formulas already write behind (the
> users will only complete some field, and after push "Calculate" button will
> see the results in form of: table, graphic, and so on ...).
> > Please take into account that behind will be more mathematical
> equations/formulas, so the speed I think must be take into account.
> >
>
> Building a web site can be done with Flask, Django, aiohttp, or a
> number of other frameworks. Generating graphs can be done with
> matplotlib. Speed won't be a problem - a computer can do a LOT of
> mathematical calculations in the time it takes to request something
> over the internet.
>
> Have fun exploring!
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for WEB-page !?

2017-01-05 Thread Chris Angelico
On Thu, Jan 5, 2017 at 11:57 PM, Ionut Predoiu  wrote:
> I am a beginner in programming language.
> I want to know what version of Python I must to learn to use, beside of basic 
> language, because I want to integrate in my site 1 page in which users to can 
> made calculus based on my formulas already write behind (the users will only 
> complete some field, and after push "Calculate" button will see the results 
> in form of: table, graphic, and so on ...).
> Please take into account that behind will be more mathematical 
> equations/formulas, so the speed I think must be take into account.
>

Building a web site can be done with Flask, Django, aiohttp, or a
number of other frameworks. Generating graphs can be done with
matplotlib. Speed won't be a problem - a computer can do a LOT of
mathematical calculations in the time it takes to request something
over the internet.

Have fun exploring!

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Python for WEB-page !?

2017-01-05 Thread Ionut Predoiu
Good afternoon,

I am a beginner in programming language. 
I want to know what version of Python I must to learn to use, beside of basic 
language, because I want to integrate in my site 1 page in which users to can 
made calculus based on my formulas already write behind (the users will only 
complete some field, and after push "Calculate" button will see the results in 
form of: table, graphic, and so on ...). 
Please take into account that behind will be more mathematical 
equations/formulas, so the speed I think must be take into account.

I waiting with higher interest your feedback.

Thanks to all members of community for support and advice.
Keep in touch.
Kind regards.
-- 
https://mail.python.org/mailman/listinfo/python-list


Screenscraping, in python, a web page that requires javascript?

2007-08-09 Thread Dan Stromberg - Datallegro

Is there a method, with python, of screenscraping a web page, if that web
page uses javascript?

I know about BeautifulSoup, but AFAIK at this time, BeautifulSoup is for
HTML that doesn't have embedded javascript.

Thanks!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Screenscraping, in python, a web page that requires javascript?

2007-08-09 Thread John J. Lee
Dan Stromberg - Datallegro [EMAIL PROTECTED] writes:

 Is there a method, with python, of screenscraping a web page, if that web
 page uses javascript?

Not pure CPython, no.


 I know about BeautifulSoup, but AFAIK at this time, BeautifulSoup is for
 HTML that doesn't have embedded javascript.

It's not that BeautifulSoup is unhappy with JS, it's just that there's
no support for executing the JS.

There are some Java libraries that know how to execute JS embedded in
web pages, which could be used from Jython:

http://www.thefrontside.net/crosscheck

http://htmlunit.sourceforge.net/

http://httpunit.sourceforge.net/


You can also automate a browser, but that still seems to be painful in
one way or another.


John
-- 
http://mail.python.org/mailman/listinfo/python-list


[perl-python] get web page programatically

2005-02-04 Thread Xah Lee
# -*- coding: utf-8 -*-
# Python

# suppose you want to fetch a webpage.
from urllib import urlopen
print
urlopen('http://xahlee.org/Periodic_dosage_dir/_p2/russell-lecture.html').read()

# note the line
# from library_name import function_name1,function_name2...
# it reads the library and import the function name
# to see available functions in a module one can use dir
# import urllib; print dir(urllib)

# for more about this module import syntax, see
# http://python.org/doc/tut/node8.html

#-
# sometimes in working with html pages, you need to creat links
# In url, some chars need to be encoded.
# the quote function does it. unquote function reverses it. Very
nice.

from urllib import quote
print quote(~joe's home page)
print 'http://www.google.com/search?q=' + quote(ménage à trois)
# (rely on the French to teach us interesting words)

# for more about the urllib module, see
# http://python.org/doc/lib/module-urllib.html


in perl, it's messy as usual. Long story short the simplest way is to
use the perl program HEAD or GET in /usr/bin or /usr/local/bin. When
one of the networking module is installed, perl contaminate your bin
dirs with these programs. In the unix shell, try
GET 'http://yahoo.com/'
should do the job. HEAD is similar for http
head. (assuming they are installed.)

if you need more complexty, perl has LWP::Simple and LWP::UserAgent to
begin with. (there are a host of spaghetti others) Both of these needs
to be installed extra. Perhaps consult your sys admin. The last time i
used them was some 2 years ago, so the following code is untested, but
should be it. I don't recall which one can't do what. Your milage may
vary.

use strict;
# use LWP::Simple;
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
$ua-timeout(120);
my $url='http://yahoo.com/';
my $request = new HTTP::Request('GET', $url);
my $response = $ua-request($request);
my $content = $response-content();
print $content;
__END__

# note the above perl code. In many perl codes, they sport the Object
Oriented syntax, often concomitantly with a normal syntax version as
well.


this post is from the perl-python a-day mailing list. Please see
http://xahlee.org/perl-python/python.html

 Xah
 [EMAIL PROTECTED]
 http://xahlee.org/PageTwo_dir/more.html

--
http://mail.python.org/mailman/listinfo/python-list


Re: [perl-python] get web page programatically

2005-02-04 Thread Dan Perl

Xah Lee [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
# note the line
# from library_name import function_name1,function_name2...
# it reads the library and import the function name
# to see available functions in a module one can use dir
# import urllib; print dir(urllib)

After about a month, this tutorial has finally reached the syntax of the 
import statement!

And word of advice to python beginners, print dir(urllib) is not very 
useful in the sense mentioned here (it prints all the names defined in the 
module with no explanations, and those names are not only functions, BTW). 
But help(urllib) is much more useful.  Even with such a simple script, 
this tutorial still managed to give some bad advice. 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [perl-python] get web page programatically

2005-02-04 Thread Chris Mattern
Xah Lee wrote:

snip

Just the standard warnings for any novices unfamiliar with Mr. Lee.
Mr. Lee's posts are regularly riddled with severe errors (I found
the assertion that LWP::Simple and LWP::UserAgent aren't part of
the standard base perl install a particularly amusing one in this 
particular post).  Please be advised that you should get your
perl information from accurate sources.  http://learn.perl.org
is an excellent place to start, with pointers to excellent Perl
books and even some readable for free online (notably Beginning
Perl).
-- 
 Christopher Mattern

Which one you figure tracked us?
The ugly one, sir.
...Could you be more specific?
-- 
http://mail.python.org/mailman/listinfo/python-list