Re: Need help please

2023-04-10 Thread Thomas Passin
On 4/10/2023 9:59 AM, Jack Gilbert wrote: I D/L 3.11.3, I can see it in CMD running W10 64bit I have IDL on my desktop, HOW do I get 3.11.3 on my desktop? If you mean "How can I create a shortcut to Python 3.11.3 on my desktop that opens an interactive Python session", here is one way:

Re: Need help please

2023-04-10 Thread Sravan Kumar Chitikesi
use where cmd to find out the path of the binary and create a shortcut to that file on desktop Regards, *Sravan Chitikesi* AWS Solutions Architect - Associate On Mon, Apr 10, 2023 at 10:03 AM Jack Gilbert <00jhen...@gmail.com> wrote: > I D/L 3.11.3, I can see it in CMD > > running W10 64bit >

Need help please

2023-04-10 Thread Jack Gilbert
I D/L 3.11.3, I can see it in CMD running W10 64bit I have IDL on my desktop, HOW do I get 3.11.3 on my desktop? Thanks Jack g -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with custom string formatter

2022-11-05 Thread MRAB
On 2022-11-05 11:07, Stefan Ram wrote: Robert Latest writes: result += ' ' *( length - len( result )) Nice, I didn't know that one could multiply strings by negative numbers without error. Thanks, but today I thought that maybe there might be a solution for getting a field of a fixed

Re: need help

2022-10-24 Thread Peter J. Holzer
On 2022-10-24 01:02:24 +, rbowman wrote: > On Mon, 24 Oct 2022 10:02:10 +1100, Cameron Simpson wrote: > > I'd say GMail are rudely dropping traffic to port 2525. Maybe try just > > 25, > > the normal SMTP port? > > 2525 is an alternative to 587, the standard TLS port. Port 587 is not the

Re: need help

2022-10-23 Thread Cameron Simpson
On 24Oct2022 01:02, rbowman wrote: On Mon, 24 Oct 2022 10:02:10 +1100, Cameron Simpson wrote: I'd say GMail are rudely dropping traffic to port 2525. Maybe try just 25, the normal SMTP port? 2525 is an alternative to 587, the standard TLS port. Yah. My point was more focussed on GMail's

Re: need help

2022-10-23 Thread rbowman
On Mon, 24 Oct 2022 10:02:10 +1100, Cameron Simpson wrote: > I'd say GMail are rudely dropping traffic to port 2525. Maybe try just > 25, > the normal SMTP port? 2525 is an alternative to 587, the standard TLS port. 25 and 587 work. telnet smtp.gmail.com 587 Trying 2607:f8b0:4023:1004::6d...

Re: need help

2022-10-23 Thread Cameron Simpson
Please try to choose more descriptive subject lines (eg "problem with sock.connect" or similar). That you want help is almost implicit, and what the whole list is for. Anyway, to your problem: On 23Oct2022 10:19, Shuaib Akhtar wrote: How to fix Traceback (most recent call last):   File

need help

2022-10-23 Thread Shuaib Akhtar
How to fix Traceback (most recent call last):   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\socket.py", line 833, in create_connection     sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt

Re: Need help with custom string formatter

2022-10-22 Thread Robert Latest via Python-list
Cameron Simpson wrote: > Stefan's code implements it's own format_field and falls back to the > original format_field(). That's standard subclassing practice, and worth > doing reflexively more of the time - it avoids _knowing_ that > format_field() just calls format(). > > So I'd take Stefan's

Re: Need help with custom string formatter

2022-10-21 Thread Cameron Simpson
On 21Oct2022 16:55, Stefan Ram wrote: I was not aware of "isdigit". There's also "isdecimal" and "isnumeric". They all have subtly different meanings :-) Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with custom string formatter

2022-10-21 Thread Cameron Simpson
On 21Oct2022 16:55, Stefan Ram wrote: Robert Latest writes: return super().format_field( value, format_string ) Why do you prefer super().format_field() over plain format()? The doc says: "format_field() simply calls format()." So I figured I might do the same. I am not aware of any

Re: Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Stefan Ram wrote: [the solution] thanks, right on the spot. I had already figured out that format_field() is the one method I need, and thanks for the str.translate method. I knew that raking seven RE's across the same string HAD to be stupid. Have a nice weekend! --

Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Hi all, I would like to modify the standard str.format() in a way that when the input field is of type str, there is some character replacement, and the string gets padded or truncated to the given field width. Basically like this: fmt = MagicString('<{s:6}>') print(fmt.format(s='Äußerst'))

Re: Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Hi Stefan, I have now implemented a version of this, works nicely. I have a few minor questions / remarks: > result += ' ' *( length - len( result )) Nice, I didn't know that one could multiply strings by negative numbers without error. > def __init__( self ): >

Re: Need help in blockchain coding.

2022-06-11 Thread Mats Wichmann
On 6/11/22 15:29, dn wrote: > On 12/06/2022 02.51, Ayesha Tassaduq wrote: >> I am a beginner in python I want to transfer generated hash to a local >> database. I try it with socket programming but I fail. can anyone please >> help me ow I can do this? > > Where is the database? > Where is the

Re: Need help in blockchain coding.

2022-06-11 Thread dn
On 12/06/2022 02.51, Ayesha Tassaduq wrote: > I am a beginner in python I want to transfer generated hash to a local > database. I try it with socket programming but I fail. can anyone please help > me ow I can do this? Where is the database? Where is the socket? What are the (full) error

Need help in blockchain coding.

2022-06-11 Thread Ayesha Tassaduq
I am a beginner in python I want to transfer generated hash to a local database. I try it with socket programming but I fail. can anyone please help me ow I can do this? class Block: def __init__( self, previous_block_hash, transaction_list ): self.previous_block_hash =

Re: need help with a translation issue

2021-04-17 Thread dn via Python-list
Longer response: NB I've not used the system and only quickly reviewed https://py-googletrans.readthedocs.io/_/downloads/en/documentation/pdf/ NBB I am treating you (and/or other interested-readers) as something of a 'beginner'. No insult is intended should I appear to be 'talking down'. On

Re: need help with a translation issue

2021-04-17 Thread Chris Angelico
On Sun, Apr 18, 2021 at 9:58 AM dn via Python-list wrote: > Alternately, what's there to stop some nefarious/stupid user (like me!) > entering "gobbledegook" and complaining that the program fails? "What is the French for fiddle-de-dee?" -- the Red Queen, to Alice (Incidentally, Google attempts

Re: need help with a translation issue

2021-04-17 Thread MRAB
On 2021-04-17 23:56, Quentin Bock wrote: I'm trying to take the user input and let them change the target language or dest code: from deep_translator import GoogleTranslator import googletrans import sys language_list = googletrans.LANGUAGES print(language_list) feedback = input("Would you

Re: need help with a translation issue

2021-04-17 Thread dn via Python-list
On 18/04/2021 10.56, Quentin Bock wrote: > I'm trying to take the user input and let them change the target language > or dest > code: > ... > language_list = googletrans.LANGUAGES > print(language_list) ... > user_choice = input ("Enter a language (the abbreviation or correctly > spelled

need help with a translation issue

2021-04-17 Thread Quentin Bock
I'm trying to take the user input and let them change the target language or dest code: from deep_translator import GoogleTranslator import googletrans import sys language_list = googletrans.LANGUAGES print(language_list) feedback = input("Would you like to translate a sentence of your own?

need help with a ctypes project for PyPI

2021-02-03 Thread Simon Zhang
Hi, I have created a ctypes project as in the following link's first answer: https://stackoverflow.com/questions/42585210/extending-setuptools-extension-to-use-cmake-in-setup-py Since my machine's gcc is too high version or something, I used the docker image located here:

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-17 Thread Michał Jaworski
I've looked into the details of the deb package that Cameron mentioned. It may be the one that you Chris uss because it does indeed include a pyscand.so file. Quick question to you Chris: the utilities you've mentioned are the code that you've written yourself or utilities from

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-17 Thread Chris Green
Cameron Simpson wrote: > >> Guessing from the library name, have you looked on the OKI.com site > >> for current software? Maybe here? What's your printer model? > >> > >> https://www.oki.com/au/printing/support/drivers-and-utilities/index.html > >> > >> > >It comes from OKI with the Linux

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Cameron Simpson
On 16Dec2020 21:59, Chris Green wrote: >Cameron Simpson wrote: >> On 16Dec2020 18:51, Chris Green wrote: >> >The specific problem that finally prevented me from managing to get it >> >to work was a (Linux) .so file that had been built for Python 2 and, >> >as I don't have the source, I can't

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Angelico
On Thu, Dec 17, 2020 at 9:06 AM Chris Green wrote: > > Also, make note of the specific Python 2 version where your software > > works - the CPython API does change somewhat sometimes. > > > I still have python 2. The issue is that the programs need modules > which come from a PPA to support

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Green
Cameron Simpson wrote: > On 16Dec2020 18:51, Chris Green wrote: > >The specific problem that finally prevented me from managing to get it > >to work was a (Linux) .so file that had been built for Python 2 and, > >as I don't have the source, I can't build for Python 3. > > ChrisA I think

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Angelico
On Thu, Dec 17, 2020 at 8:26 AM Cameron Simpson wrote: > > On 16Dec2020 18:51, Chris Green wrote: > >The specific problem that finally prevented me from managing to get it > >to work was a (Linux) .so file that had been built for Python 2 and, > >as I don't have the source, I can't build for

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Cameron Simpson
On 16Dec2020 18:51, Chris Green wrote: >The specific problem that finally prevented me from managing to get it >to work was a (Linux) .so file that had been built for Python 2 and, >as I don't have the source, I can't build for Python 3. ChrisA I think suggested keeping a Python 2.7 install

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Angelico
On Thu, Dec 17, 2020 at 7:27 AM MRAB wrote: > > On 2020-12-16 19:16, Chris Angelico wrote: > > On Thu, Dec 17, 2020 at 6:06 AM Chris Green wrote: > >> > >> Some time ago (in July) I asked some questions here > >> about problems migrating some code from Python 2 to Python 3. > >> > >> The

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread MRAB
On 2020-12-16 19:16, Chris Angelico wrote: On Thu, Dec 17, 2020 at 6:06 AM Chris Green wrote: Some time ago (in July) I asked some questions here about problems migrating some code from Python 2 to Python 3. The specific problem that finally prevented me from managing to get it to work was a

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Angelico
On Thu, Dec 17, 2020 at 6:06 AM Chris Green wrote: > > Some time ago (in July) I asked some questions here > about problems migrating some code from Python 2 to Python 3. > > The specific problem that finally prevented me from managing to get it > to work was a (Linux) .so file that had been

Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Green
Some time ago (in July) I asked some questions here about problems migrating some code from Python 2 to Python 3. The specific problem that finally prevented me from managing to get it to work was a (Linux) .so file that had been built for Python 2 and, as I don't have the source, I can't build

Re: Need help in installing numpy

2020-11-11 Thread MRAB
On 2020-11-10 23:32, adelamsaleh--- via Python-list wrote: Dear Python Community, I am new to python.  I sucessfully installed python 3.9 from python.org on my windows 10 pc. I checked it by typing 'py' in the windows cmd prompt and the system indeed responds with the version number, then the

Need help in installing numpy

2020-11-11 Thread adelamsaleh--- via Python-list
Dear Python Community, I am new to python.  I sucessfully installed python 3.9 from python.org on my windows 10 pc. I checked it by typing 'py' in the windows cmd prompt and the system indeed responds with the version number, then the >>> prompt, and I can run simple programs without any

Re: Need Help Urgently

2020-02-26 Thread Bob Gailer
On Feb 26, 2020 10:56 AM, "Prakash Samal" wrote: > > [ABCD client error]: Connection to broker at 126.0.0.1: lost! > "timestamp":"Wed Feb 19 11:48:41 > > [XYZ]: Connection to broker at 126.0.0.1: lost! > "timestamp":"Wed Feb 19 11:48:40 > > Note: I want to read the error code i.e ABCD

Need Help Urgently

2020-02-26 Thread Prakash Samal
[ABCD client error]: Connection to broker at  126.0.0.1: lost! "timestamp":"Wed Feb 19 11:48:41 [XYZ]: Connection to broker at  126.0.0.1: lost! "timestamp":"Wed Feb 19 11:48:40 Note: I want to read the error code i.e ABCD Client error from the line and also wrt timestamp value. Let me

Re: I need help for multidimensional loop

2020-01-26 Thread DL Neil via Python-list
On 27/01/20 12:08 PM, pyotr filipivich wrote: Growth Hacking Formation on Sun, 26 Jan 2020 12:36:05 -0800 (PST) typed in comp.lang.python the following: Hi guys, I need your help please to sold a complicate problem. It is difficult for me to find the solution but in fact, I am sure it is

Re: I need help for multidimensional loop

2020-01-26 Thread pyotr filipivich
Growth Hacking Formation on Sun, 26 Jan 2020 12:36:05 -0800 (PST) typed in comp.lang.python the following: >Hi guys, > >I need your help please to sold a complicate problem. > >It is difficult for me to find the solution but in fact, I am sure it is just >a few lines of code. > >The problem is

Re: I need help for multidimensional loop

2020-01-26 Thread Python
Le 26/01/2020 à 21:36, Growth Hacking Formation a écrit : Hi guys, I need your help please to sold a complicate problem. It is difficult for me to find the solution but in fact, I am sure it is just a few lines of code. The problem is about some kind of multidimensional loop with some test

I need help for multidimensional loop

2020-01-26 Thread Growth Hacking Formation
Hi guys, I need your help please to sold a complicate problem. It is difficult for me to find the solution but in fact, I am sure it is just a few lines of code. The problem is about some kind of multidimensional loop with some test IF. I worked hours on it, but I am a newbie and it is too

Re: Hello, I need help.

2019-10-15 Thread Piet van Oostrum
Damla Pehlivan writes: > Dear Python Team, [...] > I am writing this mail quite emotionally. I asked a new "friend" for help, > but he laughed. He said it was because I am a girl and this is why I could > not do it. I want to prove to him and the whole world that I can do it. I > have a lesson

Re: Hello, I need help.

2019-10-15 Thread Peter Pearson
On Tue, 15 Oct 2019 18:57:04 +0300, Damla Pehlivan wrote: [snip] > . . . I downloaded the python program, and I > also downloaded Pycharm to use it. To be fair, I do not know what I am > doing, but I made some progress last night and I was happy about it. Today > when I came back from

Re: Hello, I need help.

2019-10-15 Thread Igor Korot
Hi, Are you trying to run your program, PyCharm, or the python console? Thank you. On Tue, Oct 15, 2019 at 12:01 PM Damla Pehlivan wrote: > > Dear Python Team, > First, I would like to introduce myself. My name is Damla Pehlivan, and I > live in Ankara/Turkey. I am a university student at

Hello, I need help.

2019-10-15 Thread Damla Pehlivan
Dear Python Team, First, I would like to introduce myself. My name is Damla Pehlivan, and I live in Ankara/Turkey. I am a university student at Ankara University. My major is Biology; therefore, I want to learn Python to use for Data Science. When I researched and asked my professors, they

Re: Need help: integrating unittest with setuptools

2019-09-02 Thread YuXuan Dong
No, it doesn't. The stackoverflow question you posted is about the renaming of `winreg`. `_winreg` is renamed to `winreg`. That's why the poster can't find the module. My program is written for and running on unix-like systems. I think `winreg` should not appear here. I have tried running

Re: Need help: integrating unittest with setuptools

2019-09-01 Thread Sayth Renshaw
On Monday, 2 September 2019 04:44:29 UTC+10, YuXuan Dong wrote: > Hi, everybody: > > I have met a problem while I ran `python setup.py test`: > > unittest.case.SkipTest: No module named 'winreg' > > I ran the command in MacOS and my project is written for only UNIX-like > systems. I

Need help: integrating unittest with setuptools

2019-09-01 Thread YuXuan Dong
Hi, everybody: I have met a problem while I ran `python setup.py test`: unittest.case.SkipTest: No module named 'winreg' I ran the command in MacOS and my project is written for only UNIX-like systems. I don't use any Windows-specified API. How dose `winreg` come here? In my

Re: need help understanding: converting text to binary

2019-04-23 Thread Eli the Bearded
In comp.lang.python, Cameron Simpson wrote: > On 23Apr2019 20:35, Eli the Bearded <*@eli.users.panix.com> wrote: >> That feels entirely wrong. I don't know what b'\x9A' means without >> knowing the character set and character encoding. If the encoding is a >> multibyte one, b'\x9A' doesn't mean

Re: need help understanding: converting text to binary

2019-04-23 Thread Gregory Ewing
Cameron Simpson wrote: If you don't know the encoding then you don't know you're looking at a hex digit. OTOH, if the binary data contain ASCII data then you do know the encoding: it is ASCII. Not necessarily, it could be a superset of ASCII such as latin-1 or utf-8. You do need to know that

Re: need help understanding: converting text to binary

2019-04-23 Thread Cameron Simpson
On 23Apr2019 20:35, Eli the Bearded <*@eli.users.panix.com> wrote: In comp.lang.python, Chris Angelico wrote: Is there a more python-esque way to convert what should be plain ascii What does "plain ASCII" actually mean, though? ASCII encoded binary data. ASCII is code points that fit in

Re: need help understanding: converting text to binary

2019-04-23 Thread Eli the Bearded
In comp.lang.python, Paul Rubin wrote: > Eli the Bearded <*@eli.users.panix.com> writes: >> # decode a single hex digit >> def hord(c): ... > >def hord(c): return int(c, 16) That's a good method, thanks. > > # decode quoted printable, specifically the MIME-encoded words > > # variant

Re: need help understanding: converting text to binary

2019-04-23 Thread Eli the Bearded
In comp.lang.python, Chris Angelico wrote: > Have you checked to see if Python can already do this? You mention I'm sure there's a library already. I'm trying to mix library usage with my own code to get practice writing in python. In this case, I want code to deal with MIME encoding in email

Re: need help understanding: converting text to binary

2019-04-22 Thread MRAB
On 2019-04-23 01:54, Eli the Bearded wrote: Here's some code I wrote today: [snip] # decode a single hex digit def hord(c): c = ord(c) if c >= ord(b'a'): return c - ord(b'a') + 10 elif c >= ord(b'A'): There's a bug here: return c - ord(b'a') + 10 It

Re: need help understanding: converting text to binary

2019-04-22 Thread Chris Angelico
On Tue, Apr 23, 2019 at 10:58 AM Eli the Bearded <*@eli.users.panix.com> wrote: > > Here's some code I wrote today: > > -- cut here 8< -- > HEXCHARS = (b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', > b'A', b'B', b'C', b'D', b'E', b'F', > b'a', b'b',

need help understanding: converting text to binary

2019-04-22 Thread Eli the Bearded
Here's some code I wrote today: -- cut here 8< -- HEXCHARS = (b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'A', b'B', b'C', b'D', b'E', b'F', b'a', b'b', b'c', b'd', b'e', b'f') # decode a single hex digit def hord(c): c = ord(c) if c >=

Re: Need help with Python3.4 and Avro

2019-02-28 Thread Terry Reedy
On 2/28/2019 11:19 AM, Mihir Kothari wrote: I am not sure if this is the right list, but trying to get help from experienced python users for my issue. This is a good place to get a somewhat different set of such people. I have posted the issue in stackoverflow, but yet to see any response.

Need help with Python3.4 and Avro

2019-02-28 Thread Mihir Kothari
Hi, I am not sure if this is the right list, but trying to get help from experienced python users for my issue. I have posted the issue in stackoverflow, but yet to see any response. I am trying my luck here. I have my question here: https://stackoverflow.com/q/54833834/3165644 If needed, I can

Re: OT - need help with PHP

2019-02-02 Thread Bob Gailer
Thank you. I will get back to you on that shortly. Bob -- https://mail.python.org/mailman/listinfo/python-list

Re: OT - need help with PHP

2019-02-01 Thread Chris Angelico
On Sat, Feb 2, 2019 at 7:08 AM bob gailer wrote: > HOW TO CALL A FUNCTION USING VOIP.MS REST/JSON API > The following samples show how to get all Servers Information from our > database and how to select a specific Server for your display purposes. > > Please Note: > - When using our REST/JSON

Re: OT - need help with PHP

2019-02-01 Thread bob gailer
Thank you for your various responses.  All helpful and encouraging. RE mailing list: I followed the instructions at http://php.net/manual/en/faq.mailinglist.php. I have had no response. Shouldn't I get something either welcoming me to the list or requesting a confirmation? Here are the

Re: OT - need help with PHP

2019-02-01 Thread mm0fmf
On 01/02/2019 15:36, Chris Angelico wrote: On Sat, Feb 2, 2019 at 2:31 AM Bob Gailer wrote: Trying to setup PHP on Windows 10 using the curl extension to run standalone. Why? I am trying to use an API where the only coding examples are written in PHP. My goal is to use python, and the place

Re: OT - need help with PHP

2019-02-01 Thread Larry Martell
On Fri, Feb 1, 2019 at 10:30 AM Bob Gailer wrote: > I can't even figure out how to sign up for a PHP email list. http://php.net/manual/en/faq.mailinglist.php -- https://mail.python.org/mailman/listinfo/python-list

Re: OT - need help with PHP

2019-02-01 Thread Chris Angelico
On Sat, Feb 2, 2019 at 2:31 AM Bob Gailer wrote: > > Trying to setup PHP on Windows 10 using the curl extension to run > standalone. Why? I am trying to use an API where the only coding examples > are written in PHP. My goal is to use python, and the place where I'm stuck > is: the examples use

OT - need help with PHP

2019-02-01 Thread Bob Gailer
Trying to setup PHP on Windows 10 using the curl extension to run standalone. Why? I am trying to use an API where the only coding examples are written in PHP. My goal is to use python, and the place where I'm stuck is: the examples use Curl to post requests; my attempts to translate this to

Need help with a message embedded in an image

2018-12-22 Thread rootsfinder
I am doing a series of puzzles. One of the puzzles has to do with a message embedded in an image. I am not familiar with python can someone please help me. Here is a link to the images and the code. https://drive.google.com/open?id=1dg5jMFtkUvKzhxv_Fqe7QMI_5x-p_CIr Thank you very much. --

Need help for python on my pc.

2018-11-22 Thread Sourav Banik
Hello Python team, I'm using python 3.7(32 bit) for several months on my same laptop (x64 processor). I worked on some django project very swiftly without any problem. But for a few days I am facing a serious problem. My python files are not showing properly by the file manager. It is just showing

Re: Need help for python on my pc.

2018-11-21 Thread boB Stepp
On Wed, Nov 21, 2018 at 12:19 PM Sourav Banik wrote: > > Hello Python team, > I'm using python 3.7(32 bit) for several months on my same laptop (x64 > processor). I worked on some django project very swiftly without any > problem. But for a few days I am facing a serious problem. My python files

Re: Need help for python on my pc.

2018-11-21 Thread Calvin Spealman
Hi, I'm afraid attachments are stripped out of e-mails sent to this list. Anything you sent was not included, so you'll need to share them in some other way if you'd like to ask for help. On Wed, Nov 21, 2018 at 1:18 PM Sourav Banik wrote: > Hello Python team, > I'm using python 3.7(32 bit) for

Need help for python on my pc.

2018-11-21 Thread Sourav Banik
Hello Python team, I'm using python 3.7(32 bit) for several months on my same laptop (x64 processor). I worked on some django project very swiftly without any problem. But for a few days I am facing a serious problem. My python files are not showing properly by the file manager. It is just showing

Re: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-10 Thread Abdur-Rahmaan Janhangeer
*if any(roll != 1 and roll != 5 for roll in result):* another extract of py's beauty! Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-10 Thread Neil Cerutti
roll in result): > # - THIS LINE IS WHERE I NEED HELP # ( if 2, 3, 4, 6 in list: ) > print("you can roll again") > else: > print("you have all 1's and 5's in your result") Ha! Didn't think I'd get to apply DeMorgan's Law so soon. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-06 Thread bob gailer
# your program is quite complicated. classes are overkill. A simpler solution is: import random for i in range(5):     roll = random.randint(1,6)     if roll not in (1,5):     print('you can roll again')     break else:     print("you have all 1's and 5's in your result'") # comments on 

Re: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-06 Thread eliteanarchyracer
Well these worked like a charm. Cant say I understand some of them and will have to look into utilizing them in the future, but I appreciate everyones responses and thank you all. Never needed to check for multiple instances in a list before. Nice to have help! --

Re: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-06 Thread Alister via Python-list
On Sat, 06 Oct 2018 21:56:09 +0200, Thomas Jollans wrote: > On 06/10/2018 20:10, eliteanarchyra...@gmail.com wrote: >> # - THIS LINE IS WHERE I NEED HELP # ( if 2, 3, 4, 6 in list: >> ) >> print("you can roll again") >> else: >> pri

Re : Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-06 Thread armand.fouca...@telecom-bretagne.eu
- Armand FOUCAULT armand.fouca...@telecom-bretagne.eu Message original Objet**: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST De**: eliteanarchyra...@gmail.com : python-list@python.org Cc**: Hi, I am new to python and would like someones help

Re: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-06 Thread Thomas Jollans
On 06/10/2018 20:10, eliteanarchyra...@gmail.com wrote: # - THIS LINE IS WHERE I NEED HELP # ( if 2, 3, 4, 6 in list: ) print("you can roll again") else: print("you have all 1's and 5's in your result") You can use a loop: for good_number in [2,3,4,6]

Re: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-06 Thread MRAB
p = object.roll_dice() result.append(temp) print(result) # - THIS LINE IS WHERE I NEED HELP # ( if 2, 3, 4, 6 in list: ) print("you can roll again") else: print("you have all 1's and 5's in your result") The simplest (and longest) way is: if 2 in result or 3

Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST

2018-10-06 Thread eliteanarchyracer
ult die1 = Dice(6) die2 = Dice(6) die3 = Dice(6) die4 = Dice(6) die5 = Dice(6) alldice = [die1, die2, die3, die4, die5] result = [] start = input("Press enter to roll your dice:") for object in alldice: temp = object.roll_dice() result.append(temp) print(result) # - THIS

Re: I need help to put the output from terminal in a csv file

2018-09-07 Thread catanaangelo
Thanks a lot, I've managed to make it work they way I wanted -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help to put the output from terminal in a csv file

2018-09-07 Thread Rhodri James
On 07/09/18 13:55, catanaang...@gmail.com wrote: HI! I need help putting the output from terminal in a csv file. I work on linux and I have python 2.7.15. I am running a python program which also runs some shell scripts. I need to capture the output from the .sh scripts and put it nicely

Re: I need help to put the output from terminal in a csv file

2018-09-07 Thread Brian Oney via Python-list
Please study the following to get you started. It looks like JSON output that you are dealing, which is good. I added a ", to the "body"-line, because I assume that you botched that when giving an example. ```python #!/usr/bin/env python import json output = ''' {    "error" : {   

I need help to put the output from terminal in a csv file

2018-09-07 Thread catanaangelo
HI! I need help putting the output from terminal in a csv file. I work on linux and I have python 2.7.15. I am running a python program which also runs some shell scripts. I need to capture the output from the .sh scripts and put it nicely in a csv table. I am using "commands.getoutput(

Re: I need help with this python regex

2018-04-28 Thread Peter J. Holzer
On 2018-04-27 21:04:49 -0700, Ed Manning wrote: > Here is the source code. > > > import re > > > log = open("csg.txt", "r") # Opens a file call session.txt > regex = re.compile(r'policy id \d+') # search for the policy ID > regex1 = re.compile(r'log count \d+') # search for the policy ID > >

I need help with this python regex

2018-04-27 Thread Ed Manning
Here is the source code. import re log = open("csg.txt", "r") # Opens a file call session.txt regex = re.compile(r'policy id \d+') # search for the policy ID regex1 = re.compile(r'log count \d+') # search for the policy ID for match in log: x = regex.findall(match) y =

Re: Need help to understand not the answer

2017-07-30 Thread Rick Johnson
On Saturday, July 29, 2017 at 2:16:36 PM UTC-5, new_to_c0ding wrote: > Hello all, I have been scratching my head since morning but > could not understand this quiz question. I would appreciate > if someone could help me understand what is it asking me to > do. I dont need the answer but just the

Re: Need help to understand not the answer

2017-07-29 Thread devinderaujla
On Saturday, July 29, 2017 at 3:49:55 PM UTC-4, MRAB wrote: > On 2017-07-29 20:16, new_to_c0ding wrote: > > Hello all, > > I have been scratching my head since morning but could not understand this > > quiz question. I would appreciate if someone could help me understand what > > is it asking me

Re: Need help to understand not the answer

2017-07-29 Thread MRAB
On 2017-07-29 20:16, new_to_c0ding wrote: Hello all, I have been scratching my head since morning but could not understand this quiz question. I would appreciate if someone could help me understand what is it asking me to do. I dont need the answer but just the right direction to look at. ###

Re: Need help to understand not the answer

2017-07-29 Thread Piet van Oostrum
new_to_c0ding writes: > Now as per instructions, class MITCampus(Campus) has (self, center_loc, > tent_loc = Location(0,0)) and it is mentioned that center_loc and tent_loc > are Location objects but when I code them as Locations, I get error from the > tester: >

Need help to understand not the answer

2017-07-29 Thread new_to_c0ding
Hello all, I have been scratching my head since morning but could not understand this quiz question. I would appreciate if someone could help me understand what is it asking me to do. I dont need the answer but just the right direction to look at. ### Do not change the Location or Campus

Re: I need help with making my claculator

2017-05-24 Thread woooee
This is most likely using class objects instead of instance objects. Not a normal thing in Python. As stated above, it is difficult, as the responses in this thread show, to get assistance with some alternate coding style. It is better to use Python in the way that is intended. Otherwise,

Re: I need help with making my claculator

2017-05-24 Thread MRAB
On 2017-05-25 00:02, woo...@gmail.com wrote: How do you then run the mainloop, i.e. get it to do something? tkinter.mainloop() -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help with making my claculator

2017-05-24 Thread woooee
How do you then run the mainloop, i.e. get it to do something? -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help with making my claculator

2017-05-22 Thread Peter Otten
woo...@gmail.com wrote: > First, you have to have a Tk instance before you do anything else. Take a > look at this example, and then expand upon it to create the calculator > http://python-textbok.readthedocs.io/en/1.0/Introduction_to_GUI_Programming.html While I agree that creating a Tk

Re: I need help with making my claculator

2017-05-21 Thread woooee
First, you have to have a Tk instance before you do anything else. Take a look at this example, and then expand upon it to create the calculator http://python-textbok.readthedocs.io/en/1.0/Introduction_to_GUI_Programming.html -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help with making my claculator

2017-05-20 Thread bartc
On 20/05/2017 14:49, Steve D'Aprano wrote: On Sat, 20 May 2017 09:13 pm, bartc wrote: Try running the program. (I did that but I can't follow this style of coding so can't help.) Chris is within his rights to refuse to run untrusted code downloaded over the internet. It's not even the

Re: I need help with making my claculator

2017-05-20 Thread Joel Goldstick
problem, and some of us will put *hours* of work into > it. But give us something vague or boring or trivial, and What's In It For > Us? > > The Original Poster garsink at gmail.com cares so little for our time that > he or she didn't even *ask* a question. Or give a name we can call

Re: I need help with making my calculator

2017-05-20 Thread Steve D'Aprano
On Sat, 20 May 2017 11:42 am, gars...@gmail.com wrote: > m using Python 3.4.2 > This is my code: Please read this first: http://sscce.org/ And then indent the "calc" method so that it is part of the class: > def calc(self, display): > try: > display.set(eval(display.get())) >

  1   2   3   4   5   6   7   8   9   10   >