Re: Crash when launching python

2024-09-04 Thread Barry Scott via Python-list
> On 4 Sep 2024, at 16:27, Guenther Sohler via Python-list > wrote: > > Is it possible to turn on debugging and to display on the console, where > python is loading files from ? > I assume you have a .app that is then packaged into a .dmg. It will be the .app that

Re: Crash when launching python

2024-09-04 Thread Greg Ewing via Python-list
ere's usually just one executable file in there. Run that from a shell and you should see anything written to stdout or stderr. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Unofficial PyBitmessage port to run with Python3 and PyQt5

2024-09-06 Thread Schimon Jehudah via Python-list
available soon to help with coding. Kind regards, Schimon On Thu, 5 Sep 2024 04:42:20 - 711 Spooky Mart via Python-list wrote: > from > https://www.reddit.com/r/bitmessage/comments/1d5ff18/unofficial_pybitmessage_port_to_run_with_python3/ > > Unofficial PyBitmessage port to run with

Re: BitChan (python project)

2024-09-06 Thread Schimon Jehudah via Python-list
Greetings, 711! This is very good! Do you know of Plebbit? It might be good to interoperate with Plebbit too. https://plebbit.com/ Kind regards, Schimon On Thu, 5 Sep 2024 04:53:05 - 711 Spooky Mart via Python-list wrote: > from https://github.com/813492291816/BitChan > > B

Re: PyBitmessage is not dead. Ignore the FUD.

2024-09-06 Thread Schimon Jehudah via Python-list
Greetings! I am interested in adding support for Bitmessage to Slixfeed news bot. Support is currently provided to XMPP and it will be extended to Email, IRC and Session. https://git.xmpp-it.net/sch/Slixfeed Schimon On Thu, 5 Sep 2024 04:40:10 - 711 Spooky Mart via Python-list wrote

Re: Python3 Fork of BMWrapper

2024-09-06 Thread Schimon Jehudah via Python-list
Good day, 711 Spooky Mart! Did you consider to add support for IRC or XMPP too? Best regards, Schimon On Thu, 5 Sep 2024 04:47:39 - 711 Spooky Mart via Python-list wrote: > from https://github.com/kashikoibumi/bmwrapper > > bmwrapper is a poorly hacked together python scri

[RELEASE] Python 3.13.0RC2, 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20 are now available!

2024-09-07 Thread Łukasz Langa via Python-list
behalf of your friendly release team, Ned Deily @nad <https://discuss.python.org/u/nad> Steve Dower @steve.dower <https://discuss.python.org/u/steve.dower> Pablo Galindo Salgado @pablogsal <https://discuss.python.org/u/pablogsal> Łukasz Langa @ambv <https://discuss.python.org/u/ambv> Thomas Wouters @thomas <https://discuss.python.org/u/thomas> signature.asc Description: Message signed with OpenPGP -- https://mail.python.org/mailman/listinfo/python-list

psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Karsten Hilbert via Python-list
TIP: The transaction might succeed if retried. 2024-08-20 22:17:04 DEBUG gm.logging[140274459512896 MainThread] (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #178): with_traceback: -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Rob Cliffe via Python-list
On 07/09/2024 16:48, Karsten Hilbert via Python-list wrote: Dear all, unto now I had been thinking this is a wise idiom (in code that needs not care whether it fails to do what it tries to do^1): conn = psycopg2.connection(...) curs = conn.cursor() try

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Karsten Hilbert via Python-list
about the SQL itself succeeded but then the COMMIT failed due to serialization. I was wondering about where to best place any needed conn.commit(). My knee-jerk reaction was to then put it last in the try: block... All this is probably more related to Python than to PostgreSQL. Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Karsten Hilbert via Python-list
gmLog2.log_stack_trace() __safely_close_cursor_and_rollback_close_conn ( curs_close, tx_rollback, conn_close ) raise if get_col_idx: col_idx = get_col_indices(curs) curs_close() tx_commit() conn_close() return (data, col_idx) # Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Karsten Hilbert via Python-list
ept: block. Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Greg Ewing via Python-list
.rollback() Doing an explicit rollback ensures that the transaction is always rolled back if it is interrupted for any reason. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Karsten Hilbert via Python-list
Am Sun, Sep 08, 2024 at 12:48:50PM +1200 schrieb Greg Ewing via Python-list: > On 8/09/24 9:20 am, Karsten Hilbert wrote: > > try: > > do something > > except: > > log something > > finally: > > .commit(

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Karsten Hilbert via Python-list
Am Sun, Sep 08, 2024 at 12:48:50PM +1200 schrieb Greg Ewing via Python-list: > On 8/09/24 9:20 am, Karsten Hilbert wrote: > > try: > > do something > > except: > > log something > > finally: > > .commit(

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Rob Cliffe via Python-list
On 07/09/2024 22:20, Karsten Hilbert via Python-list wrote: Am Sat, Sep 07, 2024 at 02:09:28PM -0700 schrieb Adrian Klaver: Right, and this was suggested elsewhere ;) And, yeah, the actual code is much more involved :-D I see that. The question is does the full code you show fail? The

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Karsten Hilbert via Python-list
Am Sun, Sep 08, 2024 at 02:58:03PM +0100 schrieb Rob Cliffe via Python-list: > >Ugly: > > > > try: > > do something > > except: > > log something > > finally: > > try: > >

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Greg Ewing via Python-list
o it's always called. Good point. Putting the rollback first would be safer/ -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Greg Ewing via Python-list
tions are caught and logged. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-09 Thread Karsten Hilbert via Python-list
Am Mon, Sep 09, 2024 at 01:48:32PM +1200 schrieb Greg Ewing via Python-list: > That code doesn't inspire much confidence in me. It's far too > convoluted with too much micro-management of exceptions. > > I would much prefer to have just *one* place where exceptions are >

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-09 Thread Karsten Hilbert via Python-list
Am Mon, Sep 09, 2024 at 01:48:32PM +1200 schrieb Greg Ewing via Python-list: > That code doesn't inspire much confidence in me. It's far too > convoluted with too much micro-management of exceptions. It is catching two exceptions, re-raising both of them, except for re-raisin

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-09 Thread Jon Ribbens via Python-list
back if it is interrupted for any reason. What if there's an exception in your exception handler? I'd put the rollback in the 'finally' handler, so it's always called. If you've already called 'commit' then the rollback does nothing of course. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Jon Ribbens via Python-list
(non-database-related) exception and that thread of execution is aborted. The database connection returns to the pool, and is re-used by another thread which continues using it to perform a different sequence of operations ... ending in a COMMIT, which commits one-and-a-half transactions. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Jon Ribbens via Python-list
uding a program or > system crash. If it's a program or system crash, sure, but anything less than that - how would the database even know, unless the program told it? -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Karsten Hilbert via Python-list
Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list: > > The database only needs to commit when it is explicitly told. Anything > > less -- no commit. > > So the Python code is half-way through a transaction when it throws > a (non-database-relate

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Karsten Hilbert via Python-list
Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list: > So the Python code is half-way through a transaction when it throws > a (non-database-related) exception and that thread of execution is > aborted. The database connection returns to the pool, How does it

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Jon Ribbens via Python-list
On 2024-09-09, Karsten Hilbert wrote: > Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list: >> So the Python code is half-way through a transaction when it throws >> a (non-database-related) exception and that thread of execution is >> aborted. Th

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Jon Ribbens via Python-list
>> So the Python code is half-way through a transaction when it throws a >> (non-database-related) exception and that thread of execution is >> aborted. The database connection returns to the pool ... > > The DBMS connection is deleted. How does that happen then? -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-10 Thread Jon Ribbens via Python-list
S worth its salt, rollback is something that happens automatically" and now you're saying it isn't automatic after all, "you write code to do it". That was my point. The database provides the tools, but it isn't psychic. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-10 Thread Karsten Hilbert via Python-list
Am Tue, Sep 10, 2024 at 08:38:30AM - schrieb Jon Ribbens via Python-list: > Ok. So we've moved away from "In any DBMS worth its salt, rollback is > something that happens automatically" Nope. The original post asked something entirely different. > and now you'

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-10 Thread Jon Ribbens via Python-list
On 2024-09-10, Karsten Hilbert wrote: > Am Tue, Sep 10, 2024 at 08:38:30AM - schrieb Jon Ribbens via Python-list: >> Ok. So we've moved away from "In any DBMS worth its salt, rollback is >> something that happens automatically" > > Nope. The original pos

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-10 Thread Jon Ribbens via Python-list
n mind. So > any partial transaction data saved on persistent storage that remains > after a system crash can be identified as such and discarded, leaving the > database in its pre-transaction state. Yes, nobody's disputing that. A good database will do what you tell it, and keep the data you give it. But what if you tell it the wrong thing or give it the wrong data? It's like, for example, a RAID array will save you from a faulty disk, but will not save you from the software writing incorrect data, which the RAID array will then faithfully copy across to all the disks overwriting the good data. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-11 Thread Jon Ribbens via Python-list
case of an exception is completely > unnecessary: the DBMS will take care of that for you. No, it won't. -- https://mail.python.org/mailman/listinfo/python-list

Re: PyBitmessage is not dead. Ignore the FUD.

2024-09-12 Thread Andy Burns via Python-list
711 Spooky Mart wrote: PyBitmessage is not dead. https://bitmessage.org It may help with looking "not dead" to have a changelog that has actually changed within the last 8 years? -- https://mail.python.org/mailman/listinfo/python-list

Istalling python

2015-11-24 Thread ARONA KANAGARATHNA via Python-list
I tried to install this software python 3.4.3 to my pc which run windows Xp 32. i could installed but it doesnot run.it gives this message "python35-32/python.exe isnot a valid win32 app.Please help me to get solved this problem Thanks Aruna -- https://mail.python.org/mailman/listinfo/p

Re: Late-binding of function defaults (was Re: What is a function parameter =[] for?)

2015-11-25 Thread Larry Hudson via Python-list
be more convenient for me if it were 16." No. It's 42.;-) -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Help with this program???

2015-11-27 Thread justin bloomer via Python-list
mechanisms should be used to ensure the data appears valid. -- https://mail.python.org/mailman/listinfo/python-list

Installation of Python troubles

2015-12-02 Thread bezan deme via Python-list
e installation process failed - unspecified error, etc.). Could you suggest something? Thanks,Demetris -- https://mail.python.org/mailman/listinfo/python-list

Re: HELP PLEASE printing single characters!

2015-12-03 Thread Larry Hudson via Python-list
, then loop through it. This will guarantee that each color is only used once. Not quite. Only if the original list has no repetitions. My personal approach would be to use a set to eliminate the duplicates, convert back to a list and shuffle that. no_reps = list(set(LIST)) random.shuffle(no_reps) print(no_reps) # Or use loop to print one-per-line -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Weird list conversion

2015-12-13 Thread Larry Hudson via Python-list
their ASCII representation? No. The data is returned as raw bytes. It's the print that is responsible for the way these bytes are _displayed_. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2015-12-25 Thread Larry Hudson via Python-list
your first mistake (because the rest is wrong because of this): READ YOUR INSTRUCTIONS! It says "Create a function..." Your 'solution' creates a list. A list is NOT a function. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

I can not install matplotlib, numpy, scipy, and pandas.

2016-01-06 Thread Omar Ray via Python-list
e not found in ['c:\\users\\---\\appdata\\local\\pro grams\\python\\python35-32\\lib', 'C:\\', 'c:\\users\\---\\appdata\\local\\progr ams\\python\\python35-32\\libs'] NOT AVAILABLE How do I download matplotlib and the other packages mentioned in the subject line? -Omar Ray -- https://mail.python.org/mailman/listinfo/python-list

Re: When I need classes?

2016-01-13 Thread Mike S via Python-list
that you just want to do. The state (data) is not rich enough to make making it the focal point of your program. Well said, thanks! -- https://mail.python.org/mailman/listinfo/python-list

help

2016-01-15 Thread sam Rogers via Python-list
adafruit project work. https://learn.adafruit.com/arduino-lesson-17-email-sending-movement-detector/overview Thanks,Sam -- https://mail.python.org/mailman/listinfo/python-list

Re: pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);

2016-01-24 Thread Larry Hudson via Python-list
. But if this string comes from a program where it is parsed by an API, it IS accepted. And this has been the case even since MSDOS prior to Windows. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2016-01-29 Thread Mike S via Python-list
better tutorial that actually bothers to mention what it needs to run. (You have read the tutorial from the beginning, yes?) Thank you Chris and Steven, I'll see if I can get iPython running and do a tutorial. -- https://mail.python.org/mailman/listinfo/python-list

>>> %matplotlib inline results in SyntaxError: invalid syntax

2016-01-29 Thread Mike S via Python-list
;>> import matplotlib.pyplot as plt >>> %matplotlib inline SyntaxError: invalid syntax What am I doing wrong? Suggested reading? TIA, Mike -- https://mail.python.org/mailman/listinfo/python-list

Re: psss...I want to move from Perl to Python

2016-01-30 Thread Larry Hudson via Python-list
Perl. It's somewhat old (2000), but a very interesting read. And probably relevant to your questions. -=- Larry -=- [1] Eric S. Raymond -- https://mail.python.org/mailman/listinfo/python-list

Re: x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up

2016-01-31 Thread Larry Hudson via Python-list
k the longer version is visually more obviously a line. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Error

2016-02-03 Thread Russell McCune via Python-list
i installed it incorrectly or what. What am I doing wrong?? Thank you Russell McCune -- https://mail.python.org/mailman/listinfo/python-list

trouble installing python

2016-02-07 Thread donald alsept via Python-list
Hello, I'm trying to install the 3.5.1 of Python and am running windows 7. I keep getting an error about api-ms-win-crt-runtime-|1-1-0.dll not being installed. Any advice on what is wrong? -- https://mail.python.org/mailman/listinfo/python-list

Re: Install Error

2016-02-08 Thread Mike S via Python-list
ine I got 3.4.4. to work, although I couldn't figure out how to get IPython notebook to work, so I'm focusing on getting that to work on my w7 and w10 boxes. Idk if you need Ipython. -- https://mail.python.org/mailman/listinfo/python-list

Re: setup failed

2016-02-08 Thread Mike S via Python-list
n.org/pipermail/python-list/2015-September/697456.html -- https://mail.python.org/mailman/listinfo/python-list

from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.

2016-02-08 Thread Mike S via Python-list
rt statement is the one having the problem, "from scipy.linalg import _fblas" How do I troubleshoot this? I'm wondering if I have version conflict between two modules. Thanks, Mike -- https://mail.python.org/mailman/listinfo/python-list

Re: from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.

2016-02-09 Thread Mike S via Python-list
On 2/9/2016 1:33 AM, Mark Lawrence wrote: On 09/02/2016 04:22, Mike S via Python-list wrote: I have Python 3.4.4 installed on Windows 7, also IPython, scipy, numpy, statsmodels, and a lot of other modules, and am working through this tutorial http://www.analyticsvidhya.com/blog/2016/02/time

Re: Cygwin and Python3

2016-02-09 Thread Larry Hudson via Python-list
lying that you shouldn't, just offhand I don't see a reason for it. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Cygwin and Python3

2016-02-09 Thread Mike S via Python-list
to run it with Cygwin? I'm not implying that you shouldn't, just offhand I don't see a reason for it. -=- Larry -=- Have you seen this? http://www.davidbaumgold.com/tutorials/set-up-python-windows/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Cygwin and Python3

2016-02-10 Thread Mike S via Python-list
On 2/10/2016 5:05 AM, Mark Lawrence wrote: On 10/02/2016 03:39, Mike S via Python-list wrote: On 2/9/2016 7:26 PM, Larry Hudson wrote: On 02/09/2016 08:41 AM, Fillmore wrote: Hi, I am having a hard time making my Cygwin run Python 3.5 (or Python 2.7 for that matter). The command will hang

Re: Cygwin and Python3

2016-02-11 Thread Mike S via Python-list
indows. Thanks for explaining, I had no idea what that comment might be based on. -- https://mail.python.org/mailman/listinfo/python-list

Re: Syntax error (The Python Book) Linux User and Developer Bookazine

2016-02-15 Thread Larry Hudson via Python-list
ke his style of teaching. Of course, take that as one person's opinion -- and as always, YMMV. :-) -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Larry Hudson via Python-list
n that are identical to the features of BASIC. Python requires a different mind-set to use it properly -- just like any other language. Here is a rather naive somewhat brute-force way to read your example data. I'm using a Python list here to simulate the file reading. (Actually, using re

Re: Guido on python3 for beginners

2016-02-20 Thread Larry Hudson via Python-list
of "Hello World", check out: http://www2.latech.edu/~acm/HelloWorld.shtml It's a collection of "Hello World" programs in umpteen languages. (Well, not really umpteen, but there are a lot of them.) ;-) -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-20 Thread Mike S via Python-list
tps://mail.python.org/mailman/listinfo/python-list

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-20 Thread Larry Hudson via Python-list
rary(s) available to everyone involved in a programming project. No need for anyone to re-invent the wheel! ;-)Python calls them modules rather than libraries, but it's the same thing. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

good python tutorial

2016-02-22 Thread Mike S via Python-list
This site was recommended by a friend, it looks really well put together, I thought it might be of interest to people considering online tutorials. http://www.python-course.eu/index.php -- https://mail.python.org/mailman/listinfo/python-list

Python used in several places in LIGO effort

2016-02-24 Thread Mike S via Python-list
https://www.reddit.com/r/IAmA/comments/45g8qu/we_are_the_ligo_scientific_collaboration_and_we/czxnlux?imm_mid=0e0d97&cmp=em-data-na-na-newsltr_20160224 -- https://mail.python.org/mailman/listinfo/python-list

Re: Computational Chemistry Analysis

2016-02-25 Thread Mike S via Python-list
/python-list

Speech recognition and synthesi in Python

2016-02-25 Thread Mike S via Python-list
Pretty nice example code... https://ggulati.wordpress.com/2016/02/24/coding-jarvis-in-python-3-in-2016/ -- https://mail.python.org/mailman/listinfo/python-list

The debug process never connected back to Wing IDE

2016-03-01 Thread quoc tuong via Python-list
Hi python stopped working on this error: The debug process never connected back to Wing IDE: Aborting debug session. See Trouble-shooting Failure to Debug in the product manual. can you please show me how to fix this issue, thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything good about Python except GUI IDE?

2016-03-02 Thread Mike S via Python-list
opment time and a GUI is needed, just my preference based on my experience. -- https://mail.python.org/mailman/listinfo/python-list

Read and count

2016-03-10 Thread Val Krem via Python-list
20 Yv2 2002 10 Yv2 2002 10 out put will be city xc1 2001 2 xc1 2002 3 yv1 2001 1 yv2 2002 3 Below is my starting code count=0 fo=open("dat", "r+") str = fo.read(); print "Read String is : ", str fo.close() Many thanks -- https://mail.python.org/mailman/listinfo/python-list

RE: Encapsulation in Python

2016-03-10 Thread Dan Strohl via Python-list
Theory, each approaches it in its own way, and each has its own benefits and challenges. This is a perfectly valid question (and a good one), but don’t let yourself get into the trap of feeling that Java is the definitive/best/only approach to OO (or Python for that matter, or C++, or whatever!). Dan Strohl > > Regards, > > Ben Mezger > > [1] - http://stackoverflow.com/q/4555932 -- https://mail.python.org/mailman/listinfo/python-list

Re: Read and count

2016-03-10 Thread Val Krem via Python-list
# .split() at whitespace, omits empty fields >city, year, x = line.split() ># collections.Counter has default 0, > # key is a tuple (city, year), parentheses omitted here >counts[city, year] += 1 > > print("city") > for city, year in sorted(counts): # iterate over keys >print(city.lower(), year, counts[city, year], sep = "\t") > > # Alternatively: > # for cy, n in sorted(counts.items()): > # city, year = cy > # print(city.lower(), year, n, sep = "\t") > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Re: Text input with keyboard, via input methods

2016-03-10 Thread Larry Hudson via Python-list
u" gives üoo gives ° (degree sign) Here's a cute one: CCCP gives ☭ (hammer & sickle) This gives you (relatively) easy access to a large range of 'special' characters. -- https://mail.python.org/mailman/listinfo/python-list

Different sources of file

2016-03-14 Thread Val Krem via Python-list
ob11 20100210 Bob22 20010107 Bob31 20021021 Bob42 20041117 Alexa2 2 20070120 Alexa3 1 20020511 Alexa4 2 20041126 Alexa5 2 20090715 -- https://mail.python.org/mailman/listinfo/python-list

RE: Replace weird error message?

2016-03-19 Thread Dan Strohl via Python-list
27;=' and '0' padding are not allowed in string format specifiers" > -Original Message- > From: Python-list [mailto:python-list-bounces+d.strohl=f5@python.org] > On Behalf Of Joel Goldstick > Sent: Wednesday, March 16, 2016 11:39 AM > Cc: python-list@p

problem with python 3.5.0

2016-03-19 Thread nasrin maarefi via Python-list
://mail.python.org/mailman/listinfo/python-list

file -SAS

2016-03-19 Thread Val Krem via Python-list
tError: No module named sas7bdat What did I miss? Val -- https://mail.python.org/mailman/listinfo/python-list

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-22 Thread Larry Hudson via Python-list
i is not used as an actual index but rather a line-number. So you can change "enumerate(something)" to "enumerate(something, 1)" to set the starting number to 1 instead of the default 0, and the lines will be numbered 1, 2 and 3 rather than 0, 1 and 2. As always, the choice is

Suggestion: make sequence and map interfaces more similar

2016-03-23 Thread Marco S. via Python-list
quences or maps indifferently, and let the code untouched. -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-27 Thread Marco S. via Python-list
ed much free time. But I suppose I can start with something quick and dirty. -- https://mail.python.org/mailman/listinfo/python-list

Which are best, well-tested ways to create REST services, with Json, in Python?

2016-03-28 Thread David Shi via Python-list
Has anyone done a recent reviews of creating REST services, in Python? Regards. David -- https://mail.python.org/mailman/listinfo/python-list

Re: Where is 'palindrome' defined?

2015-06-01 Thread Larry Hudson via Python-list
rlindrome' is not defined Thanks, Don't be embarrassed, everybody does this: You're blind to your own typos... You define palindrome() then call parlindrome() -- with an extra 'r'. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Python instead of Bash

2015-06-01 Thread Larry Hudson via Python-list
-=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Create on Win and run on Win or Mac

2015-06-01 Thread Bret Edwards via Python-list
://mail.python.org/mailman/listinfo/python-list

Create Web app on Win and run on Win or Mac

2015-06-01 Thread Bret Edwards via Python-list
till use Tkinter for a web app? Do I need to do (use) anything to create cross platform executables or would running in a browser make that step not required? Sorry for the newbie question, but I am obviously looking for a light switch. Thanks,Bret -- https://mail.python.org/mailman/listinfo/python-list

[no subject]

2015-06-25 Thread Knss Teja via Python-list
I WANT TO install 4.3  version ... but the MSI file is giving a DLL error .. what should I do :/ please use REPLY ALL .. so that I get the mail to my gmail inbox-- https://mail.python.org/mailman/listinfo/python-list

Trouble getting to windows My Documents directory

2015-07-10 Thread Mark Storkamp via Python-list
(and fix up the surrounding code with an absolute path) then it runs. But then it won't work properly for other users. Interestingly enough, when I moved this to a Mac so I could post to Usenet, I discovered it works fine on the Mac. Only Windows seems to be the problem. Windows 7. Any thoughts or suggestions? -- https://mail.python.org/mailman/listinfo/python-list

Re: Trouble getting to windows My Documents directory

2015-07-10 Thread Mark Storkamp via Python-list
In article , MRAB wrote: > On 2015-07-10 15:27, Mark Storkamp via Python-list wrote: > > I'm just learning Python, and I've run into trouble trying to change > > directory to the windows My Documents directory. There's likely a better > > way to do this

Re: Why doesn't input code return 'plants' as in 'Getting Started with Beautiful Soup' text (on page 30) ?

2015-07-12 Thread Larry Hudson via Python-list
that is Python syntax. > Maybe it is an inbuilt feature of Python's to discourage copy and pasting. > Absolutely not. As noted above, this is the way Python is defined to work. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Noob in Python. Problem with fairly simple test case

2015-07-15 Thread Larry Hudson via Python-list
ng!". In addition to using print(), in some places I like using input() instead, as in: input('x={}, y={} --> '.format(x, y)) Then the program stops at that point so you can study it. To continue just press , or Ctrl-C to abort. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Noob in Python. Problem with fairly simple test case

2015-07-16 Thread Larry Hudson via Python-list
On 07/15/2015 08:11 PM, Chris Angelico wrote: On Thu, Jul 16, 2015 at 1:01 PM, Larry Hudson via Python-list wrote: On 07/15/2015 05:11 AM, Chris Angelico wrote: [snip] In addition to using print(), in some places I like using input() instead, as in: input('x={}, y={} --> &#

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-02 Thread Larry Hudson via Python-list
uniquely determined is your fundamental problem. I do not have an answer for that. But I thought this might be a clearer description of what I think you are really looking for. I hope I'm right. ;-) Good luck. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-03 Thread Larry Hudson via Python-list
This is what I saw as the OP's underlying problem, but as I also said in my message, my interpretation certainly could be wrong.:-) -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-07 Thread Larry Hudson via Python-list
mns. This large indent is annoying. The editor mode can be set for smaller indents but the interactive mode can't -- at least I haven't found how if it is possible. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Pipes

2015-08-10 Thread Larry Hudson via Python-list
form everything from collecting and analyzing data to building software and publishing your results. I don't know if a book is relevant to your needs, but I thought it was worth mentioning. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Mock object but also assert method calls?

2015-08-13 Thread Thomas Lehmann via Python-list
has been called with value hello [call(), call().test1(), call().test2('hello')] ('', (), {}) ('().test1', (), {}) ('().test2', ('hello',), {}) -- https://mail.python.org/mailman/listinfo/python-list

Re: Mock object but also assert method calls?

2015-08-15 Thread Thomas Lehmann via Python-list
: mocked_object.test1.assert_called_with("hello") # but this does work: assert call().test1("hello") in mocked_object.mock_calls I don't wanna patch each individual method. Is there no other way? -- https://mail.python.org/mailman/listinfo/python-list

PIP does not appear to handle diacritics correctly.

2015-09-08 Thread Laszlo Lebrun via Python-list
nd up against TTIP and ISDS ! -- https://mail.python.org/mailman/listinfo/python-list

Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Laszlo Lebrun via Python-list
On Tue, 08 Sep 2015 23:35:33 +0100, Mark Lawrence wrote: > On 08/09/2015 20:14, Laszlo Lebrun via Python-list wrote: >> >> Dear group, >> I do use Windows 7 and have a user name with diacritics. >> >> Whenever I am querying an extension with pip, it will fail sinc

<    44   45   46   47   48   49   50   51   52   53   >