Mailing List Archive

query
Im working on python script in an organisation.
I've to generate html reports and take print outs..
pagination is a problem for that.Can anyone tell me a
solution for generating printer freindly reports ?
regards
Babith

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
visit http://in.tv.yahoo.com
query [ In reply to ]
In article <mailman.1054580224.13116.python-list@python.org>,
"Babith C.J" <babith_cj@yahoo.co.in> wrote:

> Im working on python script in an organisation.
> I've to generate html reports and take print outs..
> pagination is a problem for that.Can anyone tell me a
> solution for generating printer freindly reports ?

Have a look at reportlab, www.reportlab.com. It doesn't deal with HTML
(AFAIK), but is excellent for printer-friendly reports (it outputs PDF).

Just
Re: query [ In reply to ]
libintr@gmail.com wrote:
> can anyone help me on indentation in python and tell me some nice text
> editors used for a beginner in python?
>
You MUST tell us what platform you run on for us to make a
recommendation. Remember Python runs on Windows, Linux, Mac, ...
On Windows my current favorite is PyScripter available at:

http://mmm-experts.com/Products.aspx?ProductId=4

Another good choice is Eclipse with Python plug-in but
it is a very large application. If you do Java and other
development as well as Python that might be an excellent
choice.

-Larry
--
http://mail.python.org/mailman/listinfo/python-list
Re: query [ In reply to ]
libintr@gmail.com wrote:

> can anyone help me on indentation in python and tell me some nice text
> editors used for a beginner in python?

http://effbot.org/pyfaq/tutor-whats-the-best-editor-ide-for-python

</F>

--
http://mail.python.org/mailman/listinfo/python-list
Re: query [ In reply to ]
Fredrik Lundh wrote:
> libintr@gmail.com wrote:
>
>> can anyone help me on indentation in python and tell me some nice text
>> editors used for a beginner in python?
>
> http://effbot.org/pyfaq/tutor-whats-the-best-editor-ide-for-python
>
> </F>
>
In Windows, I like PyScripter.

Colin W.

--
http://mail.python.org/mailman/listinfo/python-list
Re: Query [ In reply to ]
> I want to make a binary file , which would execute on it's own.

First do
$ which python
to get the location of your python binary. The default, i think, is just
/usr/bin/python.

Then add this line to the top of your file:
#!/usr/bin/python (or whatever the `which` command returned)

then finally do this command:
$ chmod +x <file>.py

This makes <file> executable ( that's what the x stands for ).

now run it with:
$ ./<file>.py

you can also trim the .py from the file and it will work just the same.

To have your script work like installed binaries, put it in a folder in your
PATH variable. For example, if you added the path /home/<you>/bin/ to your
path variable ( PATH=$PATH:/home/<you>/bin/ ) Bash would search that
directory when you typed in a command to execute. What this means is if you
rename your <file>.py to just <file> and stick it in /home/<you>/bin/ you
could just do

$ <file>

at any time to run your program.

hope my verbosity is helpful.

--
-Nate
Re: query [ In reply to ]
On 9/19/21 06:42, Shashwat Pandey wrote:

> How to Fix Installation Error of PyAudio in VS Code ( Windows 32 Bit ) ??
>
> Please Answer Me....
> It's very essential to complete my concept digitalization system project.

This comes up somewhat often - pyaudio has not released new binary
installer packages for some time. When the system you install on
doesn't find a matching binary package, it tries to build it from the
from source. This doesn't work if you don't have a compiler:

> ERROR: Command errored out with exit status 1:
> command:
> 'C:\Users\PRIYA\AppData\Local\Programs\Python\Python39-32\python.exe' -u -c
> 'import io, os, sys, setuptools, tokenize; sys.argv[0] =
> '"'"'C:\\Users\\PRIYA\\AppData\\Local\\Temp\\pip-install-v8hphebk\\pyaudio_4240cdb9492c47abb6d002cdb32aa86c\\setup.py'"'"';
> __file__='"'"'C:\\Users\\PRIYA\\AppData\\Local\\Temp\\pip-install-v8hphebk\\pyaudio_4240cdb9492c47abb6d002cdb32aa86c\\setup.py'"'"';f
> = getattr(tokenize, '"'"'open'"'"', open)(__file__) if
> os.path.exists(__file__) else io.StringIO('"'"'from setuptools import
> setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
> install --record
> 'C:\Users\PRIYA\AppData\Local\Temp\pip-record-bdr6wfd9\install-record.txt'
> --single-version-externally-managed --compile --install-headers
> 'C:\Users\PRIYA\AppData\Local\Programs\Python\Python39-32\Include\pyaudio'
> cwd:
> C:\Users\PRIYA\AppData\Local\Temp\pip-install-v8hphebk\pyaudio_4240cdb9492c47abb6d002cdb32aa86c\
> Complete output (9 lines):
> running install
> running build
> running build_py
> creating build
> creating build\lib.win32-3.9
> copying src\pyaudio.py -> build\lib.win32-3.9
> running build_ext
> building '_portaudio' extension
> error: Microsoft Visual C++ 14.0 or greater is required. Get it with
> "Microsoft C++ Build Tools":

quite honestly, even if you do install msvc on your Windows system, it
will probably still fail to build as there are usually some addditional
setup steps.

This kind of thing is fairly easy to prospect for - got to
https://pypi.org, search for your package, and when found, click on
Download Files and look at what's available. In the case of the
"official" pyaudio, there haven't been versions since Python 3.6.

In this case there's an alternate build you can download, if you look here:

https://pypi.org/project/pyaudio-wheels/

(in other words, instead of installing "pyaudio" try installing
"pyaudio-wheels"). Hopefully that will work out for you.


--
https://mail.python.org/mailman/listinfo/python-list
Re: query [ In reply to ]
On 2021-09-19 13:42, Shashwat Pandey wrote:
> ---------- Forwarded message ---------
> From: <python-list-owner@python.org>
> Date: Sun, Sep 19, 2021, 13:20
> Subject: query
> To: <shashwatpandey2303@gmail.com>
>
>
> Hello! I see you want to post a message to the Python List. We would
> be happy to help, but you must subscribe first:
>
> https://mail.python.org/mailman/listinfo/python-list
>
> After you have subscribed, please send your message to
> python-list@python.org again. Please do not include images as this is
> a text-only forum -- instead, copy/paste or transcribe the information
> from the image that you want us to know.
>
> Alternatively, this list is mirrored both ways with the
> comp.lang.python newsgroup (news:comp.lang.python).
>
> Some people find it easier to follow this and other lists via gmane
> (http://news.gmane.org/gmane.comp.python.general), a service which
> offers a newsgroup interface to many online mailing lists.
>
> *NB all posts to the mailing list are publicly archived at:*
>
> https://mail.python.org/pipermail/python-list
>
>
>
>
>
> ---------- Forwarded message ----------
> From: Shashwat Pandey <shashwatpandey2303@gmail.com>
> To: python-list@python.org
> Cc:
> Bcc:
> Date: Sun, 19 Sep 2021 13:19:31 +0530
> Subject: query
> Hello,
> One thing I want to ask...
>
> How to Fix Installation Error of PyAudio in VS Code ( Windows 32 Bit ) ??
>
> Please Answer Me....
> It's very essential to complete my concept digitalization system project.
>
> the error is given below please solve this problem
>
>
> PS C:\Users\PRIYA> pip install pyaudio
> Collecting pyaudio
> Using cached PyAudio-0.2.11.tar.gz (37 kB)
> Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not
> installed.
> Installing collected packages: pyaudio
> Running setup.py install for pyaudio ... error
> ERROR: Command errored out with exit status 1:
> command:
> 'C:\Users\PRIYA\AppData\Local\Programs\Python\Python39-32\python.exe' -u -c
> 'import io, os, sys, setuptools, tokenize; sys.argv[0] =
> '"'"'C:\\Users\\PRIYA\\AppData\\Local\\Temp\\pip-install-v8hphebk\\pyaudio_4240cdb9492c47abb6d002cdb32aa86c\\setup.py'"'"';
> __file__='"'"'C:\\Users\\PRIYA\\AppData\\Local\\Temp\\pip-install-v8hphebk\\pyaudio_4240cdb9492c47abb6d002cdb32aa86c\\setup.py'"'"';f
> = getattr(tokenize, '"'"'open'"'"', open)(__file__) if
> os.path.exists(__file__) else io.StringIO('"'"'from setuptools import
> setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
> install --record
> 'C:\Users\PRIYA\AppData\Local\Temp\pip-record-bdr6wfd9\install-record.txt'
> --single-version-externally-managed --compile --install-headers
> 'C:\Users\PRIYA\AppData\Local\Programs\Python\Python39-32\Include\pyaudio'
> cwd:
> C:\Users\PRIYA\AppData\Local\Temp\pip-install-v8hphebk\pyaudio_4240cdb9492c47abb6d002cdb32aa86c\
> Complete output (9 lines):
> running install
> running build
> running build_py
> creating build
> creating build\lib.win32-3.9
> copying src\pyaudio.py -> build\lib.win32-3.9
> running build_ext
> building '_portaudio' extension
> error: Microsoft Visual C++ 14.0 or greater is required. Get it with
> "Microsoft C++ Build Tools":
> https://visualstudio.microsoft.com/visual-cpp-build-tools/
> ----------------------------------------
> ERROR: Command errored out with exit status 1:
> 'C:\Users\PRIYA\AppData\Local\Programs\Python\Python39-32\python.exe' -u -c
> 'import io, os, sys, setuptools, tokenize; sys.argv[0] =
> '"'"'C:\\Users\\PRIYA\\AppData\\Local\\Temp\\pip-install-v8hphebk\\pyaudio_4240cdb9492c47abb6d002cdb32aa86c\\setup.py'"'"';
> __file__='"'"'C:\\Users\\PRIYA\\AppData\\Local\\Temp\\pip-install-v8hphebk\\pyaudio_4240cdb9492c47abb6d002cdb32aa86c\\setup.py'"'"';f
> = getattr(tokenize, '"'"'open'"'"', open)(__file__) if
> os.path.exists(__file__) else io.StringIO('"'"'from setuptools import
> setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
> install --record
> 'C:\Users\PRIYA\AppData\Local\Temp\pip-record-bdr6wfd9\install-record.txt'
> --single-version-externally-managed --compile --install-headers
> 'C:\Users\PRIYA\AppData\Local\Programs\Python\Python39-32\Include\pyaudio'
> Check the logs for full command output.
> WARNING: You are using pip version 21.2.3; however, version 21.2.4 is
> available.
> You should consider upgrading via the
> 'C:\Users\PRIYA\AppData\Local\Programs\Python\Python39-32\python.exe -m pip
> install --upgrade pip' command.
>
By default, pip looks for packages on PyPI.

Unfortunately, it looks like PyAudio is not available on PyPI for that
version of Python.

Fortunately, it _is_ available from Christoph Gohlke's site:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

The one you want is:

PyAudio?0.2.11?cp39?cp39?win32.whl
--
https://mail.python.org/mailman/listinfo/python-list