Re: Bot

2020-12-02 Thread Marco Sulla
On Wed, 2 Dec 2020 at 04:13, Álvaro d'Ors  wrote:
>
> Hi guys, I'm new here, can anyone help me built a bot than can input data
> in a website?

I never used it, but you can try Chatterbot:
https://chatterbot.readthedocs.io/en/stable/
-- 
https://mail.python.org/mailman/listinfo/python-list


problem in installation of python 3.9.0

2020-12-02 Thread Priyankgasree K
Hello,
I am Priyankgasree, i am facing problem in installing python3.9.0.
after i finish download it always says you have to repair or uninstall. I
have repaired and uninstalled and reinstalled several times but i can't do
anything . And also I cant able to download other versions of python. So
tell me what`s the problem and the solution
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: problem in installation of python 3.9.0

2020-12-02 Thread Mats Wichmann

On 12/2/20 10:57 AM, Priyankgasree K wrote:

Hello,
 I am Priyankgasree, i am facing problem in installing python3.9.0.
after i finish download it always says you have to repair or uninstall. I
have repaired and uninstalled and reinstalled several times but i can't do
anything . And also I cant able to download other versions of python. So
tell me what`s the problem and the solution


Don't rerun the installer.  That's its purpose: to let you install, or 
modify the existing installation.  You can remove the downloaded 
installer after you're done with it.


Instead, either run Python from a shell - use the command name py if you 
installed the Python launcher.  Or use the Windows search box to look 
for the command named python, the match you want should looke something 
like "Python 3.9 (64-bit)  App"


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


Re: problem in installation of python 3.9.0

2020-12-02 Thread Dan Stromberg
On Wed, Dec 2, 2020 at 9:45 AM Mats Wichmann  wrote:

> On 12/2/20 10:57 AM, Priyankgasree K wrote:
> > Hello,
> >  I am Priyankgasree, i am facing problem in installing
> python3.9.0.
> > after i finish download it always says you have to repair or uninstall. I
> > have repaired and uninstalled and reinstalled several times but i can't
> do
> > anything . And also I cant able to download other versions of python. So
> > tell me what`s the problem and the solution
>
> Don't rerun the installer.  That's its purpose: to let you install, or
> modify the existing installation.  You can remove the downloaded
> installer after you're done with it.
>
> Instead, either run Python from a shell - use the command name py if you
> installed the Python launcher.  Or use the Windows search box to look
> for the command named python, the match you want should looke something
> like "Python 3.9 (64-bit)  App"
>
This seems to be a common question and answer.

Perhaps the installer could be named better, or Python could provide a
shortcut for itself?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: problem in installation of python 3.9.0

2020-12-02 Thread Mats Wichmann



On 12/2/20 10:58 AM, Dan Stromberg wrote:

Don't rerun the installer.  




This seems to be a common question and answer.



It certainly does...

Perhaps the installer could be named better, or Python could provide a 
shortcut for itself?





I know it makes proper start menu entries for itself, but I guess people 
don't much look at those any longer? (dunno, I'm not primarily a Windows 
user).

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


Re: problem in installation of python 3.9.0

2020-12-02 Thread Barry


> On 2 Dec 2020, at 18:01, Dan Stromberg  wrote:
> 
> On Wed, Dec 2, 2020 at 9:45 AM Mats Wichmann  wrote:
> 
>>> On 12/2/20 10:57 AM, Priyankgasree K wrote:
>>> Hello,
>>> I am Priyankgasree, i am facing problem in installing
>> python3.9.0.
>>> after i finish download it always says you have to repair or uninstall. I
>>> have repaired and uninstalled and reinstalled several times but i can't
>> do
>>> anything . And also I cant able to download other versions of python. So
>>> tell me what`s the problem and the solution
>> 
>> Don't rerun the installer.  That's its purpose: to let you install, or
>> modify the existing installation.  You can remove the downloaded
>> installer after you're done with it.
>> 
>> Instead, either run Python from a shell - use the command name py if you
>> installed the Python launcher.  Or use the Windows search box to look
>> for the command named python, the match you want should looke something
>> like "Python 3.9 (64-bit)  App"
>> 
> This seems to be a common question and answer.
> 
> Perhaps the installer could be named better, or Python could provide a
> shortcut for itself?

You mean like including the word setup or installer in the file name?
That’s what everybody else does isn’t it?

Barry

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

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


A picture book written with Python programs

2020-12-02 Thread Shari Eskenas
A Day in Code: Python is an educational book that tells a story through Python 
programs that represent real-life situations. Each program introduces a new 
Python programming concept.  It is currently a Kickstarter project: 
https://www.kickstarter.com/projects/914595512/a-day-in-code-python
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Converting images to PDF. Final file has blank pages before and after.

2020-12-02 Thread Michael Baca
On Monday, November 30, 2020 at 7:15:37 PM UTC-7, MRAB wrote:
> On 2020-12-01 01:20, Michael Baca wrote: 
> > Hello, new to the group, rather new to programming. 
> > 
> > I'm writing a program that takes images and converts them into PDF's. It 
> > works after quite a few days of trying, however the final file has a blank 
> > page inserted before and after each page containing the images. 
> > 
> > This uses FPDF to do the conversion. I've been up and down trying to figure 
> > out where I'm adding an extra page, so it might be an FPDF issue. 
> > 
> > def multi_convert(pdf_Filename, file_path): 
> > if (dir): 
> > file_list = [] 
> > print(""), print("") 
> > print("Converting... This may take awhile depending on the number of 
> > images.") 
> > 
> > for entry in os.scandir(file_path): 
> > if (entry.path.endswith(".jpg") or entry.path.endswith(".png")) and 
> > entry.is_file(): 
> > file_list.append(entry.path) 
> > else: 
> > print("Error: ") 
> > print("Invalid Directory - {}", dir) 
> > cover = Image.open(str(file_list[0])) 
> > width, height = cover.size 
> > 
> > pdf = FPDF(unit="pt", format=[width, height]) 
> > 
> > for page in file_list: 
> > pdf.add_page() 
> > pdf.image(str(page)) 
> > 
> > pdf.output(file_path + pdf_Filename + ".pdf", "F") 
> > exit() 
> >
> It says in the documentation for the .image method: 
> 
> """ 
> x: 
> 
> Abscissa of the upper-left corner. If not specified or equal to None, 
> the current abscissa is used (version 1.7.1 and up). 
> 
> y: 
> 
> Ordinate of the upper-left corner. If not specified or equal to None, 
> the current ordinate is used; moreover, a page break is triggered first 
> if necessary (in case automatic page breaking is enabled) and, after the 
> call, the current ordinate is moved to the bottom of the image (version 
> 1.7.1 and up). 
> """ 
> 
> In other words, you're not specifying where the top-left corner of the 
> image should go, so it's putting it at the current position, wherever 
> that is, and it's responding to the positioning by inserting additional 
> pages. 
> 
> The solution is to specify the images' positions, and, perhaps, also 
> their sizes, if necessary. 
> 
> By the way, why doesn't the function end with "exit()"? That'll make it 
> exit the Python completely; rarely a good idea.

Thank you very much for the help. That makes sense, as I remember reading about 
the image placement, but I didn't think it mattered. My use is very simple, I 
occasionally need to covert images into to PDF's and this makes it easier than 
going online. So I figured it was okay to leave that out. I need to go back and 
read the  manual some more. 

It's a CLI program, it takes a few different arguments and when it's done it 
just returns to the shell. That's why I have the exit() where I do. Is there a 
better/safer way to exit the program?
-- 
https://mail.python.org/mailman/listinfo/python-list