Re: for -- else: what was the motivation?

2022-10-10 Thread Calvin Spealman
ot;: > break > else: >print("Yes we got no bananas") > I wonder if for/else could have been less confusing if it was referred to as for-break-else and if the else clause was only valid syntax if the for loop actually contained a break statement in the first place.

Re: venv and packages with entry points

2022-09-06 Thread Calvin Spealman
pens when I install such a package with an entry point via "pip > install ." when an virtual environment is activated? > > Kind > Christian > > [1] -- > <https://codeberg.org/buhtz/hyperorg/src/branch/develop/setup.cfg> > -- > https://mail.python.org/mailma

Re: WHAT THE ERROR ON MY CODE???

2022-06-29 Thread Calvin Spealman
t; > Without followers, evil cannot spread. > > > > [Spock, "And The Children Shall Lead", stardate 5029.5] > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > > > -- > <https://netanel.ml> > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: Why There Is No Python Compressed Archive or Binaries ?

2022-01-17 Thread Calvin Spealman
ssed archive of cpython that we can simply > unzipped and starting developing an app, not running an app that already > developed... 😀 > ------ > *From:* Calvin Spealman > *Sent:* Monday, January 17, 2022 10:19:13 PM > *To:* Sina Mobasheri > *Cc:* p

Re: Why There Is No Python Compressed Archive or Binaries ?

2022-01-17 Thread Calvin Spealman
is Embedded Zip is not something that user wants to work with that > directly it's for embedding in a C++ application, so it's not the same as > options that Java and NodeJS offers > > My question is why Python hasn't option for downloading as Compressed > Archive ? > --

Re: NOT ABLE TO SEE PICTURES

2021-12-01 Thread Calvin Spealman
ND and if I open same folder without python ITEAMS ARE THERE > so >kindly help me > > > > > >Sent from [1]Mail for Windows > > > > References > >Visible links >1. https://go.microsoft.com/fwlink/?LinkId=550986 > -- > https://mail.pytho

Re: Failure to Display Top menu

2021-11-29 Thread Calvin Spealman
-- > > https://mail.python.org/mailman/listinfo/python-list > > > -- > https://mail.python.org/mailman/listinfo/python-list > > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller: icon not visable on desktop?

2021-11-24 Thread Calvin Spealman
70569 Stuttgart (Germany) WWW:http://www.tik.uni-stuttgart.de/ > -- > https://mail.python.org/mailman/listinfo/python-list > > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. T

Re: Why so fast a web framework?

2021-10-28 Thread Calvin Spealman
to where the difference comes for two comparatively similar langs. > > Kind Regards, > > Abdur-Rahmaan Janhangeer > about <https://compileralchemy.github.io/> | blog > <https://www.pythonkitchen.com> > github <https://github.com/Abdur-RahmaanJ> > Maurit

Re: Why so fast a web framework?

2021-10-28 Thread Calvin Spealman
higher up than py > -- > https://mail.python.org/mailman/listinfo/python-list > > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: Request for argmax(list) and argmin(list)

2021-09-01 Thread Calvin Spealman
0 > > On Tue, 2021-08-31 at 21:25 -0700, ABCCDE921 wrote: > > > I dont want to import numpy > > > > > > argmax(list) > > > returns index of (left most) max element > > > > > > argmin(list) > > > returns index of (left most) min element >

Re: PEP Idea: Real private attribute

2021-09-01 Thread Calvin Spealman
e class of the object itself. If we *did* have them in Python, you couldn't use private members of an object from a decorator on it because the decorator is external to the target class. > On Tue, 31 Aug 2021 at 17:31, Calvin Spealman wrote: > >> The right way for those decor

Re: PEP Idea: Real private attribute

2021-08-31 Thread Calvin Spealman
> Personally, I do not see any disadvantage of using __privs__ over name > mangling/double-underscores. While name mangling does not truly guarantee > conflict resolution, __privs__ does. > > Please discuss the idea, let me know what you think about it, whether there >

Re: Website

2021-04-15 Thread Calvin Spealman
lish apps, scripts.. made by python. I will like to put python in > the domain. The domain will be like all-about-python.com but in Spanish( > todosobrepython.com). Can I use it? > > Thanks in advance, > Sergio > -- > https://mail.python.org/mailman/listinfo/python-list > >

Re: Output showing "None" in Terminal

2020-08-24 Thread Calvin Spealman
quot;: > n = int(input(print("Please enter distance in miles: "))) > answer = (1.6*n) > print("%.2f" % answer, "miles") > > else: > n = float(input(print("Please enter distance in kilometers: "))) > answer = (n/1.

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Calvin Spealman
rementioned cause crusaders think, they are not > unassailable, nor are they the only- or dominant voice in these matters. > Open this door and you get an absolute sewer of commentary > (from many sides of these issues). Social media is full of many trenchant > such examples. Best to leav

Re: i don't understand this python class

2020-06-29 Thread Calvin Spealman
,*self > *.*insurance*)* > > *def* claim*(*self*,* discount*):* > > X *=* self*.*insurance *+* discount > > *return* X > > > And hence I am not sure about the behavior of the first code in this email. > -- > Regards, > Joseph Pareti - Ar

Re: pyinstaller

2020-06-10 Thread Calvin Spealman
plication as a single .py (or .pyw) file. Problem > solved. > This is in no way a solution or a reasonable way to distribute software to end-users. Please don't give non-answers. ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > > -- CALVIN SPEALMAN S

Re: about to resolve problem in installation

2020-03-31 Thread Calvin Spealman
How > to resolve that issue. please help me >Thanking You > -- > https://mail.python.org/mailman/listinfo/python-list > > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/si

Re: Not Running from Kindle

2020-03-31 Thread Calvin Spealman
- > https://mail.python.org/mailman/listinfo/python-list > > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: problem occurring in operating python , after typing only 5-6 programs only is causing problem it has stoped working

2019-09-03 Thread Calvin Spealman
: > > > Sent from Mail for Windows 10 > > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https:/

Re: Help needed to run some code!!!!

2019-09-03 Thread Calvin Spealman
except: > print("No devices added yet") > readFile("list_of_devices.txt") > > mqtt.py > > import logging > from datetime import timedelta > import time > from thespian.actors import * > from transitions import Machine > import paho.mqtt

Re: An "Object" class?

2019-08-27 Thread Calvin Spealman
Cristian Cocos wrote: > Thank you! What would be the names of the *class *class, and of the > *function > *class please? > > On Tue, Aug 27, 2019 at 1:39 PM Calvin Spealman > wrote: > > > Yes, it is called `object` and `object` is the base class of ALL other > &g

Re: An "Object" class?

2019-08-27 Thread Calvin Spealman
lass (which would obviously be an object as well as > a class)? > > Christian > > -- > "People think that I must be a very strange person. This is not correct. I > have the heart of a small boy. It is in a glass jar on my desk." -- Stephen > King > -- > https:/

Re: itertools cycle() docs question

2019-08-21 Thread Calvin Spealman
ks? Why make > the copy of the elements? This seems > to be equivalent: > > > def cycle(iterable): > while iterable: > for thing in iterable: > yield thing > -- > https://mail.python.org/mailman/listinfo/python-list > --

Re: About the #python irc channel on freenode.

2019-08-13 Thread Calvin Spealman
l.com ] Free as in Freedom :. > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP: add a `no` keyword as an alias for `not`

2019-08-01 Thread Calvin Spealman
``` > opposite = not regular > ``` > > 2. as a sort of ".is_falsy()" checker; when used with an if statement. > > like the first example. > > > This PEP would make the difference between the two usecases explicit. > > Thoughts? > > Best Intentions, >

Re: newbie question

2019-08-01 Thread Calvin Spealman
t; Sid > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: List comprehension strangeness

2019-07-22 Thread Calvin Spealman
ishes, > > Nicholas > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: issue

2019-07-10 Thread Calvin Spealman
installer about the support team, please tell me a solution for > my issue > > thank you, > Joshua kay > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig

Re: Tkinter Button Command Taking Only Newest Reference In Callback Parameter

2019-07-08 Thread Calvin Spealman
t; buttons > > I know just a reference issue but it's been **bugging** me. > > Thanks All > > -- > Abdur-Rahmaan Janhangeer > Mauritius > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: How do you insert an item into a dictionary (in python 3.7.2)?

2019-06-28 Thread Calvin Spealman
ed "dictionary". > > dictionary = {1: 'value1', 2: 'value3'} > > What if I wanted to add a value2 in the middle of value1 and value3? > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea

Re: No option available for saving files

2019-06-07 Thread Calvin Spealman
10 > > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: save files

2019-04-22 Thread Calvin Spealman
m_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail > > > <#m_-8209034248381601832_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER csp

Re: Why inspect.isclass says iter() a class?

2019-04-10 Thread Calvin Spealman
> https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: python os.chdir() Windows Error 2

2019-04-01 Thread Calvin Spealman
ers//Ayla//Documents//Uni/vMaster_Umweltingenieurwesen//Study_Project//kerschbaum_input') > > and each of these with [r'C:..'], " instead of ', and \\?\c instead of C. > I also added the path (in advanced system settings) of the folder. > > Best regards >

Re: Question regarding the local function object

2019-03-15 Thread Calvin Spealman
x27;, 'abc']) > .last_letter at 0x1051e0730> > ['abc', 'def', 'ghi'] > >>> sort_by_last_letter(['ghi', 'def', 'abc']) > .last_letter at 0x1051e0730> > ['abc', 'def', 'ghi'] > >>> sort_by_last_letter(['ghi', 'def', 'abckl']) > .last_letter at 0x1051e0730> > ['def', 'ghi', 'abckl'] > >>> > > > Thanks, > > Arup Rakshit > a...@zeit.io > > > > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
/14/19 10:39 AM, Calvin Spealman wrote: > > A few notes, Jack: > > On Thu, Mar 14, 2019 at 10:32 AM Jack Dangler wrote: > >> >> On 3/14/19 10:11 AM, Calvin Spealman wrote: >> >> Where are you seeing something like this? The two lines under `class >> weapo

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
A few notes, Jack: On Thu, Mar 14, 2019 at 10:32 AM Jack Dangler wrote: > > On 3/14/19 10:11 AM, Calvin Spealman wrote: > > Where are you seeing something like this? The two lines under `class > weapon:` are not correct because they are variable names that you've never >

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
why this > isn't running at all. Is it simply because it isn't all in one file? > Thanks for any guidance. Really appreciate the help. > > > Thanks. > > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: Class Issue`

2019-03-06 Thread Calvin Spealman
pes of > object can be bound to any given name. This is occasionally a surprise > when you're being careless, but it really shouldn't break your > expectations. > > -- > Rhodri James *-* Kynesim Ltd > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: missing 1 required positional argument error

2019-02-26 Thread Calvin Spealman
#x27; as > a parameter. > > BUT from inside my script i do NOT call listall at all, so how can it miss > an argument? > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: Unable to Install Python 3.7.2 64 bit version on my Windows 8.1

2019-02-20 Thread Calvin Spealman
around for the same or any > documentation would be greatly appreciated. > > Hoping to hear from you soon. > > Thanks, > Subash > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.21

Re: pip not working

2019-02-20 Thread Calvin Spealman
Can you give any more information than that? On Wed, Feb 20, 2019 at 8:30 AM prasis poudel wrote: > > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIE

Re: not installing properly

2019-02-20 Thread Calvin Spealman
ing to instaal python but not working properly. > > i have downloaded on exe file ..but it is not starting > > please help me.. > > > > > > -- > Regards: > > Vandna mahendroo > -- > https://mail.python.org/mailman/listinfo/python-list > -- CA

Re: f-string not referenced in library

2019-02-20 Thread Calvin Spealman
he documentation of String Library? > Regards, > Caridad Díaz > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

Re: Convert a list with wrong encoding to utf8

2019-02-14 Thread Calvin Spealman
ust need to specific the correct encoding. On Thu, Feb 14, 2019 at 12:15 PM wrote: > Τη Πέμπτη, 14 Φεβρουαρίου 2019 - 6:45:29 μ.μ. UTC+2, ο χρήστης Calvin > Spealman έγραψε: > > You can only decode FROM the same encoding you've encoded TO. Any > decoding > > must know the i

Re: Convert a list with wrong encoding to utf8

2019-02-14 Thread Calvin Spealman
'Άκης Τσιάμης', 0, 4, 'ordinal not in > range(256)') > [/output] > > Why it cannot encode in latin nad decode in utf8 normally? > And since 'names' are being fetced from mysql database, which they were > stored as utf8 strings WHY/HOW the 'names&#x

Re: System printer object

2019-01-07 Thread Calvin Spealman
on.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list

RE: pickle and module versioning

2018-12-17 Thread Calvin Spealman
This can definitely be a problem, but there are tried and true strategies to deal with it and the best course of action depends a lot on what works for you. Pickle deserialization is just an API instantiating your class instances. That means all the same rules and approaches to API changes apply

Re: question on the 'calendar' function

2018-11-21 Thread Calvin Spealman
Sorry, but, that is largely what programming is. On Wed, Nov 21, 2018 at 4:09 PM o1bigtenor wrote: > On Wed, Nov 21, 2018 at 2:47 PM Calvin Spealman > wrote: > > > > Python and the standard library are all tools, but you still need to use > those tools to accomplish somet

Re: question on the 'calendar' function

2018-11-21 Thread Calvin Spealman
Python and the standard library are all tools, but you still need to *use* those tools to accomplish something. On Wed, Nov 21, 2018 at 12:01 PM o1bigtenor wrote: > On Wed, Nov 21, 2018 at 8:09 AM Calvin Spealman > wrote: > > > > You really have the pieces you need here. You

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

Re: Question about implementing immutability

2018-11-21 Thread Calvin Spealman
If you want to create your own immutable class, maybe inherit from a namedtuple? On Wed, Nov 21, 2018 at 11:45 AM Iwo Herka wrote: > Hello, > > Let's say I want to implement immutability for user-defined class. > More precisely, a class that can be modified only in its (or its > super-class') __

Re: question on the 'calendar' function

2018-11-21 Thread Calvin Spealman
You really have the pieces you need here. You can print a whole year's calendar with calendar.formatyear() or a single month with calendar.monthcalendar(). If you need multiple years, call the first more than once with each year you need to print. If you need partial years, print the individual mon

Re: recommends of redesign OO feature of python !!!

2018-10-25 Thread Calvin Spealman
It does not appear that you actually want to use Python. On Thu, Oct 25, 2018 at 1:15 AM iamybj--- via Python-list < python-list@python.org> wrote: > I am an engineer of java and c#, I want to some personal projects in free > time, and I choose python. > > After try python, I hava some suggestion

Re: I am not able to run Python in Powershell

2018-09-29 Thread Calvin Spealman
Did you actually confirm the PATH variable contains the right path? echo $env:Path And look for a path entry that mentions Python. Then, make sure you can actually find python.exe in that location. As long as you keep the PATH option checked with the Python installer it absolutely should wor

Re: [OT] master/slave debate in Python

2018-09-25 Thread Calvin Spealman
This entire conversation is inappropriate for this mailing list. Please leave this free for people who need to ask and give help with Python, regardless of which side of this argument you are on. On Tue, Sep 25, 2018 at 4:44 AM Robin Becker wrote: > On 24/09/2018 21:40, Kirill Balunov wrote: > .

Re: Hi I'm trying to get live data from stock using python , is it poss

2018-09-05 Thread Calvin Spealman
Please don't keep spamming this list with the same question, while you have not responded to any of the advice you've already been given. If you have specific trouble with any of that advice and need further help, please give details and ask new questions! Good luck. On Wed, Sep 5, 2018 at 4:02

Re: how to make super() work with externally defined methods in inheritance???

2018-08-15 Thread Calvin Spealman
You really can't, and shouldn't. The super() helper relies on information that exists inside the class definition and which is not available simply at runtime by virtue of being attached to the class. Besides, modifying classes externally is generally considered a bad idea. Maybe you could accompl

Re: Python shuts down when I try to run a module

2018-07-23 Thread Calvin Spealman
This is an unfortunate property of running command line programs on Windows. If you run the script directly (like by double clicking on it?) the console window will close when the program is done, so you can't see the final output. To get around this you could run them in the IDLE editor, which co

Re: Cookies not showing up in environ

2018-07-20 Thread Calvin Spealman
You can read cookies from the request via the request.COOKIES dictionary. See the documentation here: https://docs.djangoproject.com/en/2.0/ref/request-response/#django.http.HttpRequest.COOKIES You won't find them in an environment variable, which is shared process-wide and across all requests, be

Re: about main()

2018-07-05 Thread Calvin Spealman
On Thu, Jul 5, 2018 at 1:41 PM, Jim Lee wrote: > > > On 07/05/18 10:15, Calvin Spealman wrote: > > On Thu, Jul 5, 2018 at 12:59 PM, Jim Lee wrote: > >> >> >> On 07/05/18 05:14, Marko Rauhamaa wrote: >> >>> Abdur-Rahmaan Janhange

Re: about main()

2018-07-05 Thread Calvin Spealman
On Thu, Jul 5, 2018 at 12:59 PM, Jim Lee wrote: > > > On 07/05/18 05:14, Marko Rauhamaa wrote: > >> Abdur-Rahmaan Janhangeer : >> >>> * Create as many functions as you can >>> performance? >>> >> Python? >> >> Seriously, though. The principle of expressive encapsulation is one of >> the basi

ANN: Tracerlib 0.1 Released

2012-06-06 Thread Calvin Spealman
Tracerlib is a set of utilities to make tracing Python code easier. It provides TracerManager, which can allow multiple trace functions to coexist. It can easily be enabled and disabled, either manually or as a context manager in a with statement. Tracer classes make handling the different trace

Re: PyCarolinas 2012 Call For Proposals

2012-05-21 Thread Calvin Spealman
CORRECTION The proposal deadline is July 20, 2012 Not 2011, obviously. On Mon, May 21, 2012 at 10:51 AM, Calvin Spealman wrote: > PyCarolinas 2012 Call For Proposals > > PyCarolinas 2012, the first Python conference held in the carolinas, > is now accepting proposals! We’re

PyCarolinas 2012 Call For Proposals

2012-05-21 Thread Calvin Spealman
PyCarolinas 2012 Call For Proposals PyCarolinas 2012, the first Python conference held in the carolinas, is now accepting proposals! We’re looking for proposals for talks you can present to this great and growing Python community. PyCarolinas will be held in October in Chapel Hill, NC. The exact

ANN: straight.command 0.1a1 - A command framework with a plugin architecture

2012-05-17 Thread Calvin Spealman
I'd like to announce a new project, based on straight.plugin, a command framework that provides a declarative way to define command-line options, sub-commands, and allows plugins from third-parties to expand commands. This is all very early, I'm calling this version 0.1a1 and lots of things are mi

Re: suppressing argparse arguments in the help

2012-02-28 Thread Calvin Spealman
On Tue, Feb 28, 2012 at 1:07 PM, Peter Otten <__pete...@web.de> wrote: > Andrea Crotti wrote: > >> On 02/28/2012 04:02 PM, Peter Otten wrote: >>> Andrea Crotti wrote: >>> I have a script that might be used interactively but also has some arguments that should not be used by "normal"

Stand-Alone Python Executable Skeletons

2012-02-15 Thread Calvin Spealman
I've recently been looking into different options to package python code into stand-alone executables, with tools like Py2EXE and PyInstaller, but I'm left feeling a little lost. Documentation seems sparse on all of them, the setups a little unusual to me. It feels like they could be a lot simpler,

Re: Please explain this for me

2011-12-20 Thread Calvin Spealman
On Dec 20, 2011 11:41 PM, "Emeka" wrote: > > > Hello All, > > v = [] > > def add_to_list(plist): > u = plist.append(90) > return u > > add_to_list(v) # This function call returns nothing > Could someone explain why this function call will return nothing? > > v = [90] # Object values are p

Re: How to get path to Python standard library directory?

2011-11-25 Thread Calvin Spealman
On Fri, Nov 25, 2011 at 6:24 AM, user wrote: > In a Makefile (or sometimes inside python) I need the path to the root of > the Python standard lib folder used by "env python". > > e.g.  /usr/lib/python2.6/   or    C:\Python27\Lib\ > > what is the best/canonical way to get that? This should get yo

Re: non-standard module location (again)

2011-10-21 Thread Calvin Spealman
I am biased, but you could use a plugin loader like straight.plugin at https://github.com/ironfroggy/straight.plugin On Fri, Oct 21, 2011 at 10:05 AM, Shane wrote: > Need to refine a question I asked earlier. If I have a module, > > |--  foo > |---| > |---|---bar > |---|---| > |--

Re: syntax enhancement

2011-10-04 Thread Calvin Spealman
On Tue, Oct 4, 2011 at 9:50 AM, Valiev Sergey wrote: > Hi, > you may found this idea stupid, but nevertheless... > - `[]` - used for list comprehension, > - `()` - used for generators, > - `[start:stop]` / `[start:stop:step]` - used for slices. > The idea is to use `(start:stop)` / `(start:stop:s

Re: Project-wide variable...

2011-06-23 Thread Calvin Spealman
No, but you can define a name in one module and import that into others. On Thu, Jun 23, 2011 at 9:41 AM, Gnarlodious wrote: > Is there a way to declare a project-wide variable and use that in all > downstream modules? > > -- Gnarlir > -- > http://mail.python.org/mailman/listinfo/python-list >

Re: Function declarations ?

2011-06-08 Thread Calvin Spealman
Just write the function, at the top of the source. Easy peasy. On Wed, Jun 8, 2011 at 9:58 AM, Andre Majorel wrote: > Is there a way to keep the definitions of the high-level > functions at the top of the source ? I don't see a way to > declare a function in Python. > > Thanks in advance. > > --

Re: Non Programming in python

2011-05-11 Thread Calvin Spealman
If this is the "non-programming side of python" then maybe some of us have a lacking definition of what "programming" is. My mechanic stilll has to check the tire pressure and I need to update the version number in PyPI. On May 10, 2011 12:46 PM, "rusi" wrote: Sorry for a silly subject change:

Re: who moved reload?

2011-04-19 Thread Calvin Spealman
I have a great solution : stop using reload. It often dangerous and more often silly. On Apr 7, 2011 5:44 AM, "harrismh777" wrote: All right... somebody is sacked (er, fired) ! Who moved reload()? This kinda stuff is driving me bonkers... there was no need to move reload() anyplace... ... so

Re: Alias for an attribute defined in a superclass

2011-03-31 Thread Calvin Spealman
Sounds like you're just going to end up with more confusing code having multiple ways to refer to the exact same thing. Why? On Thu, Mar 31, 2011 at 6:14 PM, Ben Finney wrote: > Howdy all, > > I want to inherit from a class, and define aliases for many of its > attributes. How can I refer to “the

Re: Dump interpreter history?

2011-03-25 Thread Calvin Spealman
Tell your coworker that what he should be doing is writing good tests, which he can rerun repeatedly while working towards a solution. Instead of writing a new function in an interpreter, he can add tests to confirm how he wants it to behave and then keep working on it unitl those tests pass. On F

pth files and virtualenv

2011-03-23 Thread Calvin Spealman
I am not understanding why paths I'm adding to a virtualenv via add2virtualenv are not working. I use this in plenty of other situations, but in this one project (which is on 3.2) I am getting strange behavior. ~/projects/fooproject/# add2virtualenv src/ ~/projects/fooproject/# python3 -c "impor

Re: [Python-Dev] To 3.0.2 or not to 3.0.2?

2009-02-16 Thread Calvin Spealman
FWIW; I think a 3.0.2 would be useful socially (even volunteer projects have marketting issues to consider). It says "we are committed to making 3.x work", while the quick jump to 3.1 with only a limited minor fix release to 3.0 says "we stumbled into this and have to just brush this under the rug.

Re: What do you call a class not intended to be instantiated

2008-09-21 Thread Calvin Spealman
I call it an obvious misuse and misunderstanding of why you'd use a class in the first place. Either create an instance and not make these things classmethods or just share the stuff in a module-level set of variables. But the instantiating is the best options. Your class attributes might not be gl

Re: Dynamically defined functions via exec in imported module

2008-08-15 Thread Calvin Spealman
On Fri, Aug 15, 2008 at 10:48 PM, Nadeem <[EMAIL PROTECTED]> wrote: > I understand the 99% rule... the example I gave was to simplify the > issue. The full thing I'm working on is a library for an introductory > CS class I'm teaching. I'm trying, essentially, to build a library of > macros for stud

Re: precedence of [] vs .

2008-08-14 Thread Calvin Spealman
On Thu, Aug 14, 2008 at 6:46 PM, Michael Tobis <[EMAIL PROTECTED]> wrote: > I wrote some code to test the precedence of getitem vs getattr; it > shows that getitem binds tighter. > > I have been handed some code that relies on the observed behavior. > However, the Nutshell precedence list claims th

Re: Why nested scope rules do not apply to inner Class?

2008-08-13 Thread Calvin Spealman
On Wed, Aug 13, 2008 at 10:49 PM, Carl Banks <[EMAIL PROTECTED]> wrote: >> There is no point of nested classes because nested classes _are not_ >> supported by python. They are simply an artifact of not actively >> denying the syntax non-globally. I would fully support a change to the >> language t

Re: Why nested scope rules do not apply to inner Class?

2008-08-13 Thread Calvin Spealman
On Wed, Aug 13, 2008 at 7:41 PM, Maric Michaud <[EMAIL PROTECTED]> wrote: > I was not aware of any "nested classes are unsupported" before and didn't > consider nested classes as bad practice till now, even with the pickle > limitation (not every class are intended to be pickled), more you didn't g

Re: You advice please

2008-08-13 Thread Calvin Spealman
God forbid I try to make a joke. On Wed, Aug 13, 2008 at 11:20 AM, Nigel Rantor <[EMAIL PROTECTED]> wrote: > Calvin Spealman wrote: >> >> Ruby (on Rails) people love to talk about Ruby (on Rails). >> >> Python people are too busy getting things done to talk as lo

Re: Why nested scope rules do not apply to inner Class?

2008-08-13 Thread Calvin Spealman
On Wed, Aug 13, 2008 at 11:32 AM, Cousson, Benoit <[EMAIL PROTECTED]> wrote: >> Defining it as a nested class saves you one line >> of code, but IMHO makes the result just a bit more cluttered, while >> reducing the elegance of reusing the metaclass. > > The whole point of nested class is to avoid

Re: You advice please

2008-08-13 Thread Calvin Spealman
Ruby (on Rails) people love to talk about Ruby (on Rails). Python people are too busy getting things done to talk as loudly. On Wed, Aug 13, 2008 at 11:04 AM, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: > On Wed, 13 Aug 2008 13:47:58 +0200 > "Álvaro G. Vicario" <[EMAIL PROTECTED]> wrote: >> But I

Re: Why nested scope rules do not apply to inner Class?

2008-08-12 Thread Calvin Spealman
tp://mail.python.org/pipermail/python-dev/2002-November/029872.html On Tue, Aug 12, 2008 at 4:40 PM, Maric Michaud <[EMAIL PROTECTED]> wrote: > Le Tuesday 12 August 2008 15:51:30 Calvin Spealman, vous avez écrit : >> The simple answer is "Dont nest classes. It is not supported."

Re: super, object and type?

2008-08-12 Thread Calvin Spealman
object and type both are instances of type. Yes, type is an instance of itself. type inherits object. On Tue, Aug 12, 2008 at 1:14 PM, ssecorp <[EMAIL PROTECTED]> wrote: super(object, type) > , > super(type, object) > , > > > how can both work? > > they can't both be the superclass

Re: Why nested scope rules do not apply to inner Class?

2008-08-12 Thread Calvin Spealman
Please re-evaluate your "need" for nesting classes in the first place. On Tue, Aug 12, 2008 at 1:06 PM, Cousson, Benoit <[EMAIL PROTECTED]> wrote: >> This is a language limitation. >> This is because nested scope is implemented for python function only since >> 2.3 >> allow late binding of free va

Re: python interpreter

2008-08-12 Thread Calvin Spealman
The best answer is: Don't do that! That isn't how you test things. Write test scripts, probably using the unittest framework. You'll save yourself time and trouble having easily reproducible tests. Many people suggested reload(), but you should know it is dangerous. It can have results you don't e

Re: Thesaurus / ontology / taxonomy Python library

2008-08-12 Thread Calvin Spealman
Sounds like you might want to read up on RDF On Tue, Aug 12, 2008 at 10:41 AM, Benjamin Michiels <[EMAIL PROTECTED]> wrote: > Hi, > > I am curently looking for a library allowing the creation and management of > a thesaurus. Our requirements are the following: > > - creation of our own thesaurus (

Re: Why nested scope rules do not apply to inner Class?

2008-08-12 Thread Calvin Spealman
The simple answer is "Dont nest classes. It is not supported." What you are seeing is really an artifact of how classes are built. Basically, everything inside the class body has to exist before it can run, so the inner classes code objects are actually created first. However, the class object its

Re: How to iterate a sequence, with skipping the first item?

2008-08-12 Thread Calvin Spealman
i = iter(container.iterChildren()) i.next() for x in i: ... On Tue, Aug 12, 2008 at 2:51 AM, ray <[EMAIL PROTECTED]> wrote: > A container object provides a method that returns an iterator object. > I need to iterate the sequence with that iterator, but need to skip > the first item. I can only i

Re: How to execute commands in internal zones of solaris using python running from the global zone ?

2008-08-11 Thread Calvin Spealman
You might try subprocess, first of all. Use it to launch zlogin and then treat it like a shell and write 'zonename\n' to its stdin, to simulate running it as a user. This is a good bet, but I don't have either available to try it. The subprocess documentation covers invoking a process and writing t

Re: updating dictionaries from/to dictionaries

2008-08-11 Thread Calvin Spealman
for k in foo: foo[k] += bar.get(k, 0) On Mon, Aug 11, 2008 at 3:27 AM, Brandon <[EMAIL PROTECTED]> wrote: > Hi all, > > I am not altogether experienced in Python, but I haven't been able to > find a good example of the syntax that I'm looking for in any tutorial > that I've seen. Hope somebody

Re: Wouldn't it be nice if this worked?

2008-08-10 Thread Calvin Spealman
dont quote me but i do think this check is being removed. On Sun, Aug 10, 2008 at 3:42 PM, Patrick Mullen <[EMAIL PROTECTED]> wrote: > How about: > > class A: >def add(self,x,y): >return x+y > > class B(A): >pass > > print B().add(1, 2) > > > > This also works: > > class A: > def

  1   2   >