Python for Windows

2006-08-29 Thread mistral
I need compile code written in Python. I use Windows 98SE. Should I
download Python for Windows installer?
http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi
Will the msi installer modify registry or other system files? Does it
possible install Python not touching registry and system files?

thanks.

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


Re: Python for Windows

2006-08-30 Thread mistral

hg писал(а):

> Grant Edwards wrote:
>
> >
> >> Will the msi installer modify registry or other system files?
> >> Does it possible install Python not touching registry and
> >> system files?
> >
> You can make your own installer to install Python, and make sure the
> registry is not touched - I think the current installer modifies at
> least the .py .pyw file association.
>
> hg


not sure how to make custom installer to install Python on windows. Is
there some ready one?
If msi installer modify just pair of keys, and not touch system files,
then OK. Have it uninstaller also?

mistral

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

Re: Python for Windows

2006-08-31 Thread mistral

Larry Bates писал(а):

> mistral wrote:
> > hg писал(а):

> >> Grant Edwards wrote:

> >>>> Will the msi installer modify registry or other system files?
> >>>> Does it possible install Python not touching registry and
> >>>> system files?
> >> You can make your own installer to install Python, and make sure the
> >> registry is not touched - I think the current installer modifies at
> >> least the .py .pyw file association.

> >> hg
> >
> > 
> > not sure how to make custom installer to install Python on windows. Is
> > there some ready one?
> > If msi installer modify just pair of keys, and not touch system files,
> > then OK. Have it uninstaller also?

> > mistral
 --
> If you really want to install Python on Windows, I would recommend that
> you get ActiveState Python, it comes as .MSI installer and has
> uninstaller.

> http://www.activestate.com/Products/ActivePython/

> It does minimal registry changes and I know of no system file changes
> (but I could be wrong).  If you want to put a program written in python
> on a workstation you don't have to put python on it.  Use py2exe to
> package it and create an installer with Inno Setup.

> -Larry


ok, I just want run Python file, which will generate html file.

mistral

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

Re: Python for Windows

2006-08-31 Thread mistral

Larry Bates писал(а):

> mistral wrote:
> > hg писал(а):

> >> Grant Edwards wrote:

> >>>> Will the msi installer modify registry or other system files?
> >>>> Does it possible install Python not touching registry and
> >>>> system files?
> >> You can make your own installer to install Python, and make sure the
> >> registry is not touched - I think the current installer modifies at
> >> least the .py .pyw file association.

> >> hg
> >
> > 
> > not sure how to make custom installer to install Python on windows. Is
> > there some ready one?
> > If msi installer modify just pair of keys, and not touch system files,
> > then OK. Have it uninstaller also?

> > mistral
 --
> If you really want to install Python on Windows, I would recommend that
> you get ActiveState Python, it comes as .MSI installer and has
> uninstaller.

> http://www.activestate.com/Products/ActivePython/

> It does minimal registry changes and I know of no system file changes
> (but I could be wrong).  If you want to put a program written in python
> on a workstation you don't have to put python on it.  Use py2exe to
> package it and create an installer with Inno Setup.

> -Larry


ok, I just want run Python file, which will generate html file.

mistral

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

How to run Python file?

2006-09-02 Thread mistral
I have installed ActivePython
http://www.activestate.com/Products/ActivePython/
How I can run Python file, test.py?

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


Re: How to run Python file?

2006-09-02 Thread mistral

Rick Zantow писал(а):

> "Ant" <[EMAIL PROTECTED]> wrote in news:1157218244.750434.36220
> @h48g2000cwc.googlegroups.com:


> zefciu wrote:
> Pontus Ekberg wrote:
> ...
 > $ python test.py
 >
 > or
 >
 > $ ./test.py (if test.py is executable)
 >
 >
> Thats if you use un*x.  If you word under windows, the first would
 work,
 >
 > As would:
 >
 >> test.py
 >
 > Assuming python grabbed the .py extensions correctly (which it
shouold
 > have done with any recent version).
 >
 >

> As would:

 > test

 ... assuming you're on windows (Win2K or WinXP at least) and you've
 added ".py" to your PATHEXT environment variable.

> --
> rzed

-

Assuming I have Windows XP, and I installed ActiveState Python. No any
other additional manipulations were done, no any PATHEXTes environment
variables, etc, etc, nothing. How many preparatory work required to run
one small python file?

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

Re: How to run Python file?

2006-09-03 Thread mistral

Steve Holden писал(а):

> mistral wrote:
> > I have installed ActivePython
> > http://www.activestate.com/Products/ActivePython/
> > How I can run Python file, test.py?

> Sheesh, you must have had ten replies and nobody bothered to point you
> to the frequently-asked questions ... kids today!

>http://www.python.org/doc/faq/windows.html

> regards
>   Steve
> --
> Steve Holden   +44 150 684 7255  +1 800 494 3119
> Holden Web LLC/Ltd  http://www.holdenweb.com
> Skype: holdenweb   http://holdenweb.blogspot.com
> Recent Ramblings http://del.icio.us/steve.holden
---

Really, looks its clear and straightforward Python FAQ. 

thanks.

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

Need compile python code

2006-09-23 Thread mistral
Need compile python code, source is in html and starts with parameters:

#!/bin/sh -
"exec" "python" "-O" "$0" "$@"

I have installed ActivePython for windows.

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


Re: Need compile python code

2006-09-23 Thread mistral

Bjoern Schliessmann писал(а):

> mistral wrote:
>
> > Need compile python code, source is in html and starts with
> > parameters:
>
> Excuse me?
>
> > #!/bin/sh -
> > "exec" "python" "-O" "$0" "$@"
>
> Is the line break intended?
>
> > I have installed ActivePython for windows.
>
> What exactly do you want?
>
> Python code is always compiled (to byte code) before it's run.
>
> Regards,
>
>
> Björn
>
> --

Just to comple python ode - it creates html page, nothing more, nothing
else.. Just generate one html page.

mistral

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

Re: Need compile python code

2006-09-23 Thread mistral

Bjoern Schliessmann писал(а):

> mistral wrote:
>
> > Need compile python code, source is in html and starts with
> > parameters:
>
> Excuse me?
>
> > #!/bin/sh -
> > "exec" "python" "-O" "$0" "$@"
>
> Is the line break intended?
>
> > I have installed ActivePython for windows.
>
> What exactly do you want?
>
> Python code is always compiled (to byte code) before it's run.
>
> Regards,
>
>
> Björn
>
> --

Just to comple python ode - it creates html page, nothing more, nothing
else.. Just generate one html page.

mistral

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

Re: Need compile python code

2006-09-23 Thread mistral

MonkeeSage писал(а):

> mistral wrote:
> > Just to comple python ode - it creates html page, nothing more, nothing
> > else.. Just generate one html page.
>
> I *think* this is what you want:
>
> python -O -m py_compile file.py
> python file.pyo
>
> See: http://docs.python.org/lib/module-pycompile.html
>
> Regards,
> Jordan

--
this not work for me, show compilation error.  Is there simple way
compile pythone file? its absolutely unclear with command line. Just
show me exact command I need run(from python interactive shell?)

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

Re: Need compile python code

2006-09-23 Thread mistral

MonkeeSage wrote:
> mistral wrote:
> > this not work for me, show compilation error.  Is there simple way
> > compile pythone file? its absolutely unclear with command line. Just
> > show me exact command I need run(from python interactive shell?)
>
> OK...
>
> # cd to where the file.py is
> $ cd /some/dir
>
> # start python interactively, enable optimized compiling
> $ python -O
> ...
>
> # import your file.py -- if this doesn't work then
> # your file has errors and will not compile --
> # if it works then your file is now compiled --
> # file.pyo should now exist with file.py
> >>> import file
>
> # you can also do it explicitly --
> # import the compiler
> >>> import py_compile
> >>> py_compiler.compile('file.py')
>
> If that still doesn't work, show us the error, or we can't help you
> very easily.
>
> Regards,
> Jordan
---

No, something is wrong there. what I need is just compile one python
file which will generate html page, with parameters:
"exec" "python" "-O" "$0" "$@"

 just need simple way do this(script is correct), i will not set any
patches anywhere, can i do this wrom normal GUI?

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


Re: Need compile python code

2006-09-23 Thread mistral

MonkeeSage писал(а):

> mistral wrote:
> > No, something is wrong there. what I need is just compile one python
> > file which will generate html page, with parameters:
> > "exec" "python" "-O" "$0" "$@"
> >
> >  just need simple way do this(script is correct), i will not set any
> > patches anywhere, can i do this wrom normal GUI?
>
> Hmmm... Are you talking about _RUNNING_ python scripts? Is that what
> you mean by "compile" -- you mean execute? Is that what this broken
> shell script means?
>
> "exec" "python" "-O" "$0" "$@"
>
> You don't need exec, the double quote on every word breaks it, and
> passing $0 (which is the shell script itself) to python is sure to
> break. Try this:
>
> #!/bin/sh
> python -O "$@"
>
> Then:
>
> $ run_python.sh file.py arg1 arg2 arg3
>
> Regards,
> Jordan
---
the html page just encoded within that py script. To get it, i need run
this python file.
Since i can no work with this command line, i tried via Python IDE
interface: I run this IDE, select File > Run > specify file name, in
'Parameters' box type parameters:

exec python -O $0 $@

and run. I got some file in output - unknown file type, then I renamed
it and got something look like a page i need. Dont know is this right
way or not, but it provided some result.. (unlike useless command line
interface)
All this extremelly inconvenient however. This ActivePython wrote in my
Registry 243 registry entries..

mistral

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

Re: Need compile python code

2006-09-25 Thread mistral

Piet van Oostrum писал(а):

> >>>>> "MonkeeSage" <[EMAIL PROTECTED]> (M) wrote:
>
> >M> mistral wrote:
> >>> No, something is wrong there. what I need is just compile one python
> >>> file which will generate html page, with parameters:
> >>> "exec" "python" "-O" "$0" "$@"
> >>>
> >>> just need simple way do this(script is correct), i will not set any
> >>> patches anywhere, can i do this wrom normal GUI?
>
> >M> Hmmm... Are you talking about _RUNNING_ python scripts? Is that what
> >M> you mean by "compile" -- you mean execute? Is that what this broken
> >M> shell script means?
>
> >M> "exec" "python" "-O" "$0" "$@"
>
> >M> You don't need exec, the double quote on every word breaks it, and
> >M> passing $0 (which is the shell script itself) to python is sure to
> >M> break. Try this:
>
> I guess this is a trick to use a python script as a shell script that
> executes itself. In other words it is both a shell script and a python
> script and when executed as a shell script then it passes itself to the
> python interpreter. When executed as a python script the first line is a
> comment and the second line is a string (equal to 'execpython-O$0$@'), so
> both are skipped.
>
> You can't use that in windows, or maybe there is an equivalent trick.
> --
> Piet van Oostrum <[EMAIL PROTECTED]>
> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
> Private email: [EMAIL PROTECTED]
---

anyway, this is a wrong and clumsy way writing of scripts, rather than
write clear and correct code comfortable to work.

mistral

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