notify when a process exits

2011-07-28 Thread Ryan
already tried. /proc/pid is not a real directory (in the strictest sense of the word). So, pyinotify can not watch it. Ryan -- http://mail.python.org/mailman/listinfo/python-list

__set__ method is not called for class attribute access

2011-08-05 Thread Ryan
val class MyClass(object): x = RevealAccess(10, 'var "x"') y = 5 print MyClass.x MyClass.x = 20 print MyClass.x MyClass.x = 30 print MyClass.x Retrieving var "x" 10 20 30 I am at a lost on how to intercept class attribute sets. Can anyone help :-/ Ryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Can one use Python to learn and even apply Functional Programming?

2014-02-16 Thread Ryan
Python*can* do functional programming, but, for learning, Haskell will work better. Sam wrote: >I would like to learn and try out functional programming (FP). I love >Python and would like to use it to try FP. Some have advised me to use >Haskell instead because Python is not a good language for

Extending Python with C or C++

2009-01-05 Thread Ryan
it besides the standard sparse ones (http://www.python.org/ doc/2.5.2/ext/intro.html) that may give me more insight? Is there a class available? How can I learn more about the guts of python? How would one go about following an interest in contributing to the development of python. Thanks

Re: Extending Python with C or C++

2009-01-05 Thread Ryan
On Jan 5, 2:37 pm, Terry Reedy wrote: > Ryan wrote: > > I've been using Python for many years now. It's a wonderful language > > that I enjoy using everyday. I'm now interested in getting to know > > more about the guts > > The 'guts' of Pyth

socket programming (client-server)

2008-10-22 Thread ryan
i have implemented a small client server model to do file transfer over a LAN network. It work with some machines on the network and on others it doesnt. when i run the server.py file in some machine then it pops up a windows security alert. The message is as follows: Do you want to keep b

Re: socket programming (client-server) error

2008-10-22 Thread ryan
On Oct 22, 6:18 pm, Python <[EMAIL PROTECTED]> wrote: > On 22 okt 2008, at 13:50, ryan fox wrote: > > > > > i have implemented a small client server model to do file transfer > > over a LAN network. > > > It work with some machines on the network and

running pyhton IDLE on windows vista

2009-03-30 Thread ryan
Hi guys , I am facing problems running python25 on vista . i was able to successfully install it but when i try to run it then, its throws errors saying Firewall issues .. I tried disabling the firewall but no go.. Thanks in advance!! -- http://mail.python.org/mailman/listinfo/python-list

del an imported Class at EOF... why?

2009-10-06 Thread Ryan
ch a thing? Ryan -- http://mail.python.org/mailman/listinfo/python-list

Re: del an imported Class at EOF... why?

2009-10-07 Thread Ryan
e. In this situation, the use of __all__ is better. Plus, by using __all__ instead of del you do not have to worry about forgetting to del a class. Ryan -- http://mail.python.org/mailman/listinfo/python-list

Migrating from R to Python

2009-11-02 Thread Ryan
I am a long time user of "R" for statistical analysis and find it an extremely useful environment for data exploration. That said I may be adding and/or moving to Python for more of my work and wanted to know if people had any recommendations. My work is primarily financial time series analysis. I

Catching a SIGSEGV signal on an import

2010-09-09 Thread Ryan
mport? If so, is there a way to use that with pkgutil.walk_packages to get all the modules on sys.path? Thanks, Ryan -- http://mail.python.org/mailman/listinfo/python-list

Re: python sys.stdout and C++ iostreams::cout

2013-01-17 Thread Lie Ryan
On 18/01/13 02:02, Utpal Sarkar wrote: Hi, I was assuming that sys.stdout would be referencing the same physical stream as iostreams::cout running in the same process, but this doesn't seem to be the case. The following code, which makes a call to a C++ function with a python wrapper called "

Re: To make a method or attribute private

2013-01-17 Thread Lie Ryan
On 17/01/13 11:34, iMath wrote: To make a method or attribute private (inaccessible from the outside), simply start its name with two underscores 《Beginning Python From Novice to Professional》 but there is another saying goes: Beginning a variable name with a single underscore indicates tha

Re: Vote tallying...

2013-01-18 Thread Lie Ryan
On 18/01/13 10:59, Andrew Robinson wrote: Hi, I have a problem which may fit in a mysql database, but which I only have python as an alternate tool to solve... so I'd like to hear some opinions... Since you have a large dataset, you might want to use sqlite3 (http://docs.python.org/2.5/lib/mo

Re: Safely add a key to a dict only if it does not already exist?

2013-01-18 Thread Lie Ryan
On 19/01/13 15:15, Chris Rebert wrote: On Friday, January 18, 2013, Steven D'Aprano wrote: I wish to add a key to a dict only if it doesn't already exist, but do it in a thread-safe manner. The naive code is: if key not in dict: dict[key] = value but of cours

Re: Any algorithm to preserve whitespaces?

2013-01-19 Thread Lie Ryan
On 19/01/13 21:13, Santosh Kumar wrote: I have a working script which takes argv[1] as an input, deassembles each line, and then each word. Then after it capitalizes all its word (upcases the first letter) and then prints it out on the stdout. That script does the capitalization work fine, but,

Re: Vote tallying...

2013-01-19 Thread Lie Ryan
On 19/01/13 00:43, Andrew Robinson wrote: On 01/18/2013 08:47 AM, Stefan Behnel wrote: Andrew Robinson, 18.01.2013 00:59: I have a problem which may fit in a mysql database Everything fits in a MySQL database - not a reason to use it, though. Py2.5 and later ship with sqlite3 and if you go for

Re: Vote tallying...

2013-01-19 Thread Lie Ryan
On 20/01/13 08:22, Dennis Lee Bieber wrote: On Sat, 19 Jan 2013 22:58:17 +1100, Lie Ryan Which is the same restriction as when using XML/JSON. What it means by locking the entire database is that an sqlite database can only be read/written by a single program at any moment in time. For batch

Re: why not?

2013-01-21 Thread Lie Ryan
On 22/01/13 04:02, kwakukwat...@gmail.com wrote: f = open(r'c:\text\somefile.txt') for i in range(3): print str(i) + ': ' + f.readline(), please with the print str(i) + ‘: ‘ + f.readline(), why not print str(i) + f.readline(), Try running both code. What do you see? What's the differenc

Re: Is a with on open always necessary?

2012-01-25 Thread Lie Ryan
On 01/26/2012 04:17 AM, K Richard Pixley wrote: On 1/21/12 03:38 , Lie Ryan wrote: It is only strictly necessary for programs that opens thousands of files in a short while, since the operating system may limit of the number of active file handlers you can have. The number you're lookin

Re: [OT]: Smartphones and Python?

2012-02-18 Thread Lie Ryan
On 02/18/2012 12:51 PM, Michael Torrie wrote: On 02/16/2012 10:25 PM, 8 Dihedral wrote: Android is a customized linux OS used in mobile phones. I don't think any linux systm has to be locked by JAVA or any JVM to run applications. Getting waaa off topic here, but... I guess you aren't

Re: Tools for refactoring/obfuscation

2012-03-30 Thread Lie Ryan
On 03/29/2012 03:04 AM, Javier wrote: Yes, in general I follow clear guidelines for writing code. I just use modules with functions in the same directory and clear use of name spaces. I almost never use classes. I wonder if you use some tool for refactoring. I am mainly intersted in scripting

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/18/2012 12:36 PM, Steven D'Aprano wrote: On Sat, 17 Mar 2012 20:59:34 +0100, Kiuhnm wrote: In the second example, most English speakers would intuit that "print(i)" prints i, whatever i is. There are two points where the code may be misunderstood, a beginner may think that "print i" prin

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/21/2012 03:55 AM, Nathan Rice wrote: In mathematics, when you perform global optimization you must be willing to make moves in the solution space that may result in a temporary reduction of your optimality condition. If you just perform naive gradient decent, only looking to the change tha

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/21/2012 01:44 PM, Steve Howell wrote: Also, don't they call those thingies "object" for a reason? ;) A subject is (almost?) always a noun, and so a subject is also an object. -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-08 Thread Lie Ryan
On 03/30/2012 06:25 AM, Steve Howell wrote: On Mar 29, 11:53 am, Devin Jeanpierre wrote: Well, what sort of language differences make for English vs Mandarin? Relational algebraic-style programming is useful, but definitely a large language barrier to people that don't know any SQL. I think th

mbox parsing, specifically message body

2012-06-14 Thread Ryan Clough
esn't seem reliable to me. I am using the built in mailbox module and am able to do something like: import mailbox for message in mbox: print message['subject'] It would be great if you could do something like the following: print messages['body'] Any thoughts are ap

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improvethe Dvorak Layout?

2011-06-18 Thread Lie Ryan
On 06/18/11 03:53, Xah Lee wrote: > On Jun 15, 5:43 am, rusi wrote: >> On Jun 15, 5:32 pm, Dotan Cohen wrote: >> >>> Thanks. From testing small movements with my fingers I see that the >>> fourth finger is in fact a bit weaker than the last finger, but more >>> importantly, it is much less dexter

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile toImprovethe Dvorak Layout?

2011-06-18 Thread Lie Ryan
On 06/19/11 15:14, rusi wrote: > On Jun 19, 9:21 am, Lie Ryan wrote: >> On 06/18/11 03:53, Xah Lee wrote: >> >> >> >>> On Jun 15, 5:43 am, rusi wrote: >>>> On Jun 15, 5:32 pm, Dotan Cohen wrote: >> >>>>> Thanks. From testing

Re: Python and Lisp : car and cdr

2011-06-18 Thread Lie Ryan
On 06/18/11 00:45, Franck Ditter wrote: > Hi, I'm just wondering about the complexity of some Python operations > to mimic Lisp car and cdr in Python... > > def length(L) : > if not L : return 0 > return 1 + length(L[1:]) > > Should I think of the slice L[1:] as (cdr L) ? I mean, is the slic

Re: How to iterate on a changing dictionary

2011-06-19 Thread Lie Ryan
On 06/20/11 00:32, TheSaint wrote: > Hello > > Trying to pop some key from a dict while is iterating over it will cause an > exception. > How I can remove items when the search result is true. > > Example: > > while len(dict): >for key in dict.keys(): > if dict[key] is not my_result:

Re: threading : make stop the caller

2011-06-19 Thread Lie Ryan
On 06/20/11 02:52, Laurent Claessens wrote: > >> Popping task off the end of the list is more efficient: > >> while task_list: >> task_list.pop().start() > > That's cool. In my case it's better to do > task_list.pop(0).start > > in order to pop the first element. then you really wanted a q

Re: doing cross platform file work

2011-06-23 Thread Ryan Kelly
n a remote server, in memory, and from a variety of other sources. Even if you only ever intend to access local files, I find the API provided by PyFilesystem much nicer than using the various modules from the stdlib. Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This mes

Re: Using decorators with argument in Python

2011-06-28 Thread Lie Ryan
On 06/29/2011 02:52 AM, Jigar Tanna wrote: > coming across to certain views from people, it is not a good practice > to use > decorators with arguments (i.e. @memoize() ) and instead it is good to > just > use @memoize. Can any of you guys explain me advantages and > disadvantages of > using each

PyCon Australia 2011: Sprints

2011-06-28 Thread Ryan Kelly
WingWare <http://www.wingware.com/> Silver: Superior Recruitment <http://superiorrecruitment.com.au/> Thanks also to Linux Australia, who provide the overarching legal and organisational structure for PyCon Australia. Ryan Kelly PyCo

PyCon Australia 2011: Schedule Announced

2011-07-13 Thread Ryan Kelly
ehaviour Driven Development (Malcolm Tredinnick) Benchmarking stuff made ridiculously easy (Tennessee Leeuwenburg) Bytecode: What, Why, and How to Hack it (Ryan Kelly) Developing Scientific Software in Python (Duncan Gray) Fun with App Engine 1.5.0 (Greg Darke) Hosting Python W

Re: Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread Ryan Kelly
the PyFilesystem project: http://packages.python.org/fs/ If anyone cares enough to whip up a TarFS implementation it would be gratefully merged into trunk. (There may even be the start of one in the bugtracker somewhere, I don't recall...) Cheers, Ryan -- Ryan Kelly http://w

PyCon Australia 2011: Registration Deadlines

2011-07-23 Thread Ryan Kelly
http://www.microsoft.com/> Thanks also to Linux Australia, who provide the overarching legal and organisational structure for PyCon Australia. Ryan Kelly PyCon Australia 2011 -- http://mail.python.org/mailman/listinfo/python-list

PyCon Australia 2011: Registration Back Online

2011-07-27 Thread Ryan Kelly
/www.wingware.com/> Silver: Arclight <http://www.arclight.com.au/> Silver: Bitbucket by Atlassian<http://bitbucket.org/> Silver: Microsoft <http://www.microsoft.com/> Thanks also to Linux Australia, who provide the overarching legal

Code War at PyCon Au 2011

2011-08-01 Thread Ryan Kelly
A huge hit at PyCon-Au last year, Code War is back! Eight teams, onstage knockout rounds of short programming bouts, loud crowd...mildly impressive prizes. Any language allowed, no holds bared. Think of it like cage fighting for coders. Originally based on an idea from the book PeopleWare,

Re: import hooks (PEP 302) broken in Python >=2.5?

2011-08-07 Thread Ryan Kelly
ieve that comment is referring specifically to "ihooks" the stdlib module, not "import hooks" the general concept as defined in PEP302. The former pre-dates the later. I use custom PEP302 loaders all the time and they work fine in at least 2.6, 2.7 and 3.2. Ryan -- Ry

PyCon Australia 2011: Registration Closing Soon!

2011-08-10 Thread Ryan Kelly
> Silver: Django Software Foundation <http://www.djangoproject.com> Silver: Ninefold <http://ninefold.com/> Internet: GitHub <http://github.com/> Thanks also to Linux Australia, who provide the overarching legal and organisational stru

Re: Is this a safe use of eval?

2011-02-24 Thread Ryan Kelly
.__mro__[-1].__subclasses__()[58]("/secret/file","w")') Traceback (most recent call last): File "", line 1, in File "", line 2, in testit File "", line 1, in IOError: [Errno 2] No such file or directory: '/sec

Re: Is this a safe use of eval?

2011-02-24 Thread Ryan Kelly
On Thu, 2011-02-24 at 20:13 +1100, Ryan Kelly wrote: > On Thu, 2011-02-24 at 10:48 +0200, Frank Millman wrote: > > Hi all > > > > I know that the use of 'eval' is discouraged because of the dangers of > > executing untrusted code. > > > > Here

Re: Guido rethinking removal of cmp from sort method

2011-04-04 Thread Lie Ryan
On 04/04/11 19:34, Antoon Pardon wrote: > On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote: >> >> rewriting cmp_to_key in C is underway >> >> http://bugs.python.org/issue11707 >> > Nice to know! Any chance this wil get into 2.7.x? Python 2.7 still have list.sort(cmp=...)/sorted(cmp=...)

Re: Fun python 3.2 one-liner

2011-04-08 Thread Lie Ryan
On 04/06/11 01:07, Steven D'Aprano wrote: > On Tue, 05 Apr 2011 15:38:28 +0200, Daniel Fetchinson wrote: > Personally, I find that the discipline of keeping to 80 characters is > good for me. It reduces the temptation of writing obfuscated Python one- > liners when two lines would be better. The

Re: Guido rethinking removal of cmp from sort method

2011-04-08 Thread Lie Ryan
On 04/09/11 01:08, Aahz wrote: > Actually, my take is that removing __cmp__ was a mistake. (I already > argued about it back in python-dev before it happened, and I see little > point rehashing it. My reason is strictly efficiency grounds: when > comparisons are expensive -- such as Decimal objec

Re: Argument of the bool function

2011-04-08 Thread Lie Ryan
On 04/09/11 08:59, candide wrote: > Le 09/04/2011 00:03, Ethan Furman a écrit : > >> > bool([x]) >> > Convert a value to a Boolean, using the standard truth testing >> > procedure. >> > >> >> As you can see, the parameter name is 'x'. > > > OK, your response is clarifying my point ;) > > >

Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ryan Kelly
> limitless possibilities of IDLE to be a good primer for our budding > young programmers however like all my great brain children this one > has been cast aside like a red headed stepchild. I can only imagine the hi-jinx that ensure at your yearly great brain family reunion. Ryan -- Ryan

Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ryan Kelly
On Thu, 2011-04-14 at 11:46 +1000, Chris Angelico wrote: > On Thu, Apr 14, 2011 at 11:29 AM, Ryan Kelly wrote: > > I weep that your delightful rhetoric is limited to this neglected forum, > > where the guardians of python core deign not to tread, and hence denied > > its r

Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ryan Kelly
On Wed, 2011-04-13 at 19:10 -0700, rantingrick wrote: > On Apr 13, 8:29 pm, Ryan Kelly wrote: > > On Wed, 2011-04-13 at 17:39 -0700, rantingrick wrote: > > I would LOVE to improve the doc, however first the student THEN the > teacher. However in this forsaken land the "tea

Re: Egos, heartlessness, and limitations

2011-04-13 Thread Ryan Kelly
On Thu, 2011-04-14 at 03:12 +, Steven D'Aprano wrote: > On Thu, 14 Apr 2011 12:03:15 +1000, Ryan Kelly wrote: > > > On Thu, 2011-04-14 at 11:46 +1000, Chris Angelico wrote: > >> On Thu, Apr 14, 2011 at 11:29 AM, Ryan Kelly wrote: > >> > I weep that your

Re: Pythonic infinite for loop?

2011-04-14 Thread Ryan Kelly
st comp, but > I can't see how to do that when the input comes from a dictionary. You probably could, but I think it would hurt readability in this case: lst = [parse_kwdlist(dct[k]) for k in sorted(dct.keys()) if k.startswith("Keyword")] Cheer

Re: Pythonic infinite for loop?

2011-04-14 Thread Ryan Kelly
On Fri, 2011-04-15 at 12:34 +1000, Ryan Kelly wrote: > On Fri, 2011-04-15 at 12:10 +1000, Chris Angelico wrote: > > > > > > My first draft looks something like this. The input dictionary is > > called dct, the output list is lst. > > > > lst=[] > >

PyCon Australia 2011: registrations now open

2011-04-20 Thread Ryan Kelly
Silver: Python Software Foundation<http://www.python.org/psf/> Thanks also to Linux Australia, who provide the overarching legal and organisational structure for PyCon Australia. Ryan Kelly PyCon Australia 2011 -- http://mail.python.org/mailman/listinfo/python-list

Re: minimal python27.dll?

2011-04-27 Thread Ryan Kelly
atically linked on Windows, or that doing so causes some serious loss of functionality. Was this ever true, and is it still? Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit r...@rfk.id.au| http://www.rfk.id.au/ramblings/gp

Re: Read-write lock for Python

2011-04-28 Thread Ryan Kelly
class in threading2 which should do what you need. Don't know about "likely to work" but if it doesn't, I'd like to hear about it so I can fix it :-) `pip install threading2` Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signe

PyCon Australia 2011: cfp closing soon!

2011-04-28 Thread Ryan Kelly
: Python Software Foundation<http://www.python.org/psf/> Thanks also to Linux Australia, who provide the overarching legal and organisational structure for PyCon Australia. Ryan Kelly PyCon Australia 2011 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's super() considered super!

2011-05-27 Thread Ryan Kelly
er().hello(msg) d = Diamond() d.hello("autosuper!") And you get the expected output: here we go... gunna say it yes I am hello autosuper! There may well be some cases where this breaks down, but it seems to do the right thing in simple cases. Not that I&

PyCon Australia 2011: Early Bird Closing Soon

2011-05-28 Thread Ryan Kelly
d for the conference: Standard Talks: A Python on the Couch (Mark Rees) Behaviour Driven Development (Malcolm Tredinnick) Benchmarking stuff made ridiculously easy (Tennessee Leeuwenburg) Bytecode: What, Why, and How to Hack it (Ryan Kelly) Developing Scientific Software in

How to track usage within a desktop python application

2017-10-08 Thread Ryan Holmes
I maintain a desktop python application that is used by a decent number of folks (I would assume 10k+, though it's hard to know since it's based on number of downloads rather than number of unique users). I would like to integrate some sort of usage tracking that would enable me to determine num

FW: Printing to a file and a terminal at the same time

2017-10-12 Thread Lie Ryan
It wouldn't be too difficult to write a file object wrapper that emulates tee, for instance (untested): class tee(object): def __init__(self, file_objs, autoflush=True): self._files = file_objs self._autoflush = autoflush def write(self, buf): for f in self._files

Questions on PEP 440 - Version Identification and Dependency Specification

2018-08-18 Thread Ryan Holmes
Greetings all, I currently follow PEP 440 as it relates to my application. Right now we follow a x.y.z scheme, with y incrementing with our normal releases, z incrementing for any bug fixes for that release, and x not really incrementing unless something major happens (for example, our conversi

pip hangs after successful operation

2018-10-04 Thread Ryan Johnson
, via “pip list” and “py -m pip list” methods, there is a discrepancy. This is the culprit, but I don’t know how to fix the problem. Output: • PS C:\Users\Ryan> py -V Python 3.7.0 • PS C:\Users\Ryan> pip list Package Version --- --- Click   7.0 mysqlclient 1.3.

Solved: pip hangs after successful operation (sandboxed environment problem)

2018-10-05 Thread Ryan Johnson
. Alternately, you may try to add the folder locations to the white-list, but this didn’t work for me. Have a nice day, Ryan Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python indentation (3 spaces)

2018-10-05 Thread Ryan Johnson
replace all Tabs with Spaces by highlighting the entire code block, hitting Tab once and Shift-Tab after. Peace Ryan On Fri, Oct 5, 2018 at 4:51 PM Terry Reedy wrote: > On 10/5/2018 4:48 PM, ts9...@gmail.com wrote: > > I am new to Python programming but have significant SQL and C >

RE: Python indentation (3 spaces)

2018-10-07 Thread Ryan Johnson
, 2018 10:35 AM To: python-list@python.org Subject: Re: Python indentation (3 spaces) On 10/5/2018 11:30 PM, Ryan Johnson wrote: > The point that OP is trying to make is that a fixed standard that is > distinguishable from the even-spacing Tab-length convention in code and > text editor

Re: Python doesn't install

2018-10-10 Thread Ryan Johnson
ttps://mail.python.org/mailman/listinfo/python-list > -- If you believe in an open internet, and that you should be free to fix your own computer and program and modify it without restrictions, join the Free Software Foundation <https://my.fsf.org/associate/support_freedom/join_fsf?referrer=

Single DB connection during class's lifetime. Metaclass, singleton and __new__() examples and references.

2018-10-11 Thread Ryan Johnson
I am working on using mysql.connector in a class and have found an example of how to create a single connection that spans the lifetime of all instances of the class: https://softwareengineering.stackexchange.com/a/358061/317228 however, I do not understand a few things about the class, includ

RE: Single DB connection during class's lifetime. Metaclass,singleton and __new__() examples and references.

2018-10-12 Thread Ryan Johnson
AM To: python-list@python.org Subject: Re: Single DB connection during class's lifetime. Metaclass,singleton and __new__() examples and references. On 12/10/2018 01:19, Ryan Johnson wrote: > I am working on using mysql.connector in a class and have found an example of > how to crea

RE: Single DB connection during class's lifetime. Metaclass,singletonand __new__() examples and references.

2018-10-15 Thread Ryan Johnson
Thank you. That clears everything up. Sent from Mail for Windows 10 From: Cameron Simpson Sent: Saturday, October 13, 2018 6:06 PM To: Ryan Johnson Cc: python-list@python.org Subject: Re: Single DB connection during class's lifetime. Metaclass,singletonand __new__() examples and references

RE: Wikipedia on Python

2018-10-16 Thread Ryan Johnson
Not really having read the whole story here, just wanna say that Wikipedia articles already suffer from a tug-of-war between professionals and students. Don’t worsen the problem. Include lay explanation and go into the technical details in a natural progression. Don’t force the reader to make la

RE: ESR "Waning of Python" post

2018-10-16 Thread Ryan Johnson
Have seen this waning of python thread so many times. Hoping it would have waned by now. Lol. Sent from Mail for Windows 10 From: jfine2...@gmail.com Sent: Tuesday, October 16, 2018 12:42 PM To: python-list@python.org Subject: Re: ESR "Waning of Python" post On Tuesday, October 16, 2018 at 8:00

Advice on law firm

2018-10-17 Thread Ryan Johnson
Anyone know a good US based law firm that specializes in software licenses and class action suits? Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

RE: Advice on law firm

2018-10-17 Thread Ryan Johnson
Correction: specializing in warranty of merchantability, software licenses, and possibly class action suits. Sent from Mail for Windows 10 From: Ryan Johnson Sent: Wednesday, October 17, 2018 9:26 PM To: python-list@python.org Subject: Advice on law firm Anyone know a good US based law firm

RE: email automation

2018-10-23 Thread Ryan Johnson
Consider a web service API…Not really sure about where you want to evaluate your incoming emails, but perhaps MailChimp could help. https://mailchimp.com/features/marketing-automation/ There are a bunch of ways to automate things with web services now, using Zapier. https://mailchimp.com/feature

Re: Overwhelmed by the Simplicity of Python. Any Recommendation?

2018-11-06 Thread Lie Ryan
> I like to step through my code line by line, > it's impossible to do it with > object-oriented programming language. I suggest pudb, it's a curses based debugger, which is nicer than pdb, but doesn't require tedious IDE setup. > Also, there's no good REPL IDE. Not quite sure what you meant b

Re: [Scons-users] SCons Version 3.0.3 Released

2019-01-08 Thread Ryan Schmidt
On Jan 7, 2019, at 21:26, Bill Deegan wrote: > A new SCons release, 3.0.3, is now available on the SCons download page: > > https://scons.org/pages/download.html > > > Here is a summary of the changes since 3.0.1: It would have been good to mention the changes since 3.0.2, whi

Can't run program

2020-05-19 Thread Ryan Harrington
Hi - I'm not the least bit technical. Trying to learn through YouTube. I've gotten exit code 1, 2, 106. Tried setting up the project interpreter and can't figure it out. Tried uninstalling and reinstalling everything and still having problems. Any feedback appreciated. Than

shelve object back to dictionary

2005-10-06 Thread Ryan Krauss
user.name. I would prefer to have the scripts I write to analyze the saved data have a similar syntax to the ones I used to create it, so I would rather deal with a dictionary after I load the shelved data. Ryan -- http://mail.python.org/mailman/listinfo/python-list

passing variable arguments to a function

2005-10-13 Thread Ryan Wilcox
Hello all, I want to be able to pass a variable number of parameters into a Python function. Now, I know how to _receive_ variable arguments, but I don't know how to _send_ them. def myFunction(*args): print args myList = [1, 2, 3, 4] myFunction(myList) this function will print out ([1, 2,

Re: finding name of instances created

2005-01-24 Thread Ryan Paul
On Mon, 24 Jan 2005 13:19:45 +, Ryan Paul wrote: > > A working solution: > > class A: > pass > > a = A() > b = A() > c = A() > > [x for x,y in locals().items() if > hasattr(y,"__class__") and y.__class__ == A] > Just wanted t

Re: finding name of instances created

2005-01-24 Thread Ryan Paul
On Fri, 21 Jan 2005 16:13:19 -0800, André wrote: > Short version of what I am looking for: > > Given a class "public_class" which is instantiated a few times e.g. > > a = public_class() > b = public_class() > c = public_class() > > I would like to find out the name of the instances so that I co

Re: What is print? A function?

2005-01-24 Thread Ryan Paul
On Sun, 23 Jan 2005 18:01:50 +, Frans Englich wrote: > > Nah, I don't think it's a function, but rather a builtin "statement". But > it's possible to invoke it as an function; print( "test" ) works fine. > > So I wonder, what _is_ exactly the print statement? The untraditional > way of invo

Re: how to call python code from C#

2005-01-25 Thread Ryan Paul
On Tue, 25 Jan 2005 00:35:04 +0530, paritosh mahana wrote: > Hi all, > How can I call python code from my C# code. One thing is to make an > .exe file of the python program and then try to call it from my C# > code. But I don't like that idea. Is there any other way to do this. > Like making a .d

Re: references/addrresses in imperative languages

2005-06-20 Thread SM Ryan
ierarchy of the theory of types and reintroduce Russel's paradox. -- SM Ryan http://www.rawbw.com/~wyrmwif/ The little stoner's got a point. -- http://mail.python.org/mailman/listinfo/python-list

Re: references/addrresses in imperative languages

2005-06-20 Thread SM Ryan
"Kaz Kylheku" <[EMAIL PROTECTED]> wrote: # SM Ryan wrote: # > # easy way to see this, is to ask yourself: how come in mathematics # > # there's no such thing as "addresses/pointers/references". # > # > The whole point of Goedelisation was to add to n

Re: Python syntax high-lighting and preservation on web

2005-06-30 Thread Ryan Bowman
http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.html Ryan Bowman I get the feeling that the compiler just skips over all the comments... __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yah

Newbie question

2005-02-28 Thread Ryan White
Hi all I'm wanting to use python to display some jpeg images, maybe present them at a percentage of their actual size etc. How do I display an image in Python? - I've run over Tkinter, but obviously in all the wrong places. Any help or sample code would be much appreciated. Ryan

Re: Optional Static Typing

2004-12-27 Thread Ryan Paul
On Thu, 23 Dec 2004 01:49:35 -0800, bearophileHUGS wrote: > Adding Optional Static Typing to Python looks like a quite complex > thing, but useful too: > http://www.artima.com/weblogs/viewpost.jsp?thread=85551 I wrote a blog post this morning in which I briefly argue using DbC and predicate based

Re: [sqlite] Happy New Year

2013-12-31 Thread Ryan Finnesey
Happy New Year to you as well. Sent from my iPad > On Dec 31, 2013, at 7:46 PM, "Igor Korot" wrote: > > Hi, ALL, > I want to wish everybody who is reading and involved with the list > Happy and oyful New Year! > Let's have a great time in it and lets make a lot of good products and > new relea

[ANN] PyExt 0.6 Released!

2014-02-09 Thread Ryan Gonzalez
/pyext GitHub: https://github.com/kirbyfan64/pyext -- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." -- https://mail.python.org/mailman/listinfo/python-list

Re: how to completely uninstall python 2.7 on Windows

2016-01-28 Thread Ryan Gonzalez
Wrong mailing list! You probably want https://mail.python.org/mailman/listinfo/python-list Anyway, does uninstalling from the Control Panel not work? On January 28, 2016 7:59:00 AM CST, "Shi, Jiajun" wrote: >Hi there, > >Please help me to uninstall Python 2.7 on Windows. I want to install >Pyt

Python Calculator

2016-02-01 Thread Ryan Young
iable to a different number it still calculates the original value. I have sent you a picture to help you understand my problem. Thank you so much! Ryan Young -- https://mail.python.org/mailman/listinfo/python-list

Re: I love assert

2014-11-13 Thread Lie Ryan
On 13/11/14 10:05, Ian Kelly wrote: On Wed, Nov 12, 2014 at 3:47 PM, Marko Rauhamaa wrote: Ian Kelly : Apart from idiomatic style, there is no difference between # never reached assert False raise RuntimeError('Unreachable code reached') If the purpose is communication, the

Re: Communicating with a PHP script (and pretending I'm a browser)

2014-11-13 Thread Lie Ryan
On 13/11/14 03:57, Larry Martell wrote: We were all making this much harder than it is. I ended up doing this: wp = urllib.request.urlopen('http://php_page/?' + request.POST.urlencode()) pw = wp.read() I was about that suggest that actually, just be careful to escape things properly. Although

Re: [Python-Dev] Dinamically set __call__ method

2014-11-13 Thread Lie Ryan
On 05/11/14 06:15, Roberto Martínez wrote: The thing with this is tricky. I need the change in the instance, > not in the class, because I have multiple instances and all of > them must have different implementations of __call__. Why not just use functions with closure if that's what you need?

Re: Profiler for long-running application

2015-02-09 Thread Ryan Stuart
Hi Asad, Is there any reason why you can't just use profile/cProfile? In particular, you could use the api of that module to save out the profile stats to an external file with a unique name and then inspect them later with a tool like snakeviz . The code to

Re: TypeError: list indices must be integers, not tuple

2015-02-10 Thread Ryan Stuart
Hi, There is a lot of issues with this code. First, setting fav to a 1 tuples with a string probably isn't what you want. What you probably mean is: if restraunt == ("Pizza"): fav = 1 Second, when you are trying to lookup items in Menu, you are using the incorrect fav. Lists have int indicie

  1   2   3   4   5   6   7   8   9   10   >