Re: How to delay until a next increment of time occurs ?

2019-11-14 Thread Rob Gaddi
ls, but that's some low-level stuff to be getting into from a very high-level language. Might work? -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Resources related with web security

2019-11-26 Thread Rob Gaddi
On 11/26/19 12:41 PM, Grant Edwards wrote: On 2019-11-26, Joel Goldstick wrote: I'm thinking this is a troll or a turing machine experiment? Yea, many of the posts remind me of ELIZA. How do you feel about many of the posts remind you of ELIZA? -- Rob Gaddi, Highland Techn

Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-02 Thread Rob Gaddi
On 12/2/19 9:26 AM, Chris Clark wrote: Test case: import array array.array('L', [0]) # x.itemsize == 8 rather than 4 This works fine (returns 4) under Windows Python 3.7.3 64-bit build. Under Ubuntu; Python 2.7.15rc1, 3.6.5, 3.70b3 64-bit this returns 8. Docum

Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-03 Thread Rob Gaddi
On 12/2/19 5:50 PM, Richard Damon wrote: Perhaps array could be extended so that it took '4' for a 4 byte integer and '8' for an 8 byte integer (maybe 'U4' and 'U8' for unsigned). Might as well also allow 1 and 2 for completeness for char and short (but those are currently consistent). I wil

Re: Make warning an exception?

2019-12-06 Thread Rob Gaddi
On 12/6/19 12:58 PM, Israel Brewster wrote: I was running some code and I saw this pop up in the console: 2019-12-06 11:53:54.087 Python[85524:39651849] WARNING: nextEventMatchingMask should only be called from the Main Thread! This will throw an exception in the future. The only problem is,

Re: python 2 to 3 converter

2019-12-09 Thread Rob Gaddi
On 12/9/19 9:55 AM, songbird wrote: jf...@ms4.hinet.net wrote: ... Even string is hard to be handled by the AI:-) Quoted from https://portingguide.readthedocs.io/en/latest/strings.html " ... This means that you need to go through the entire codebase, and decide which value is what type. Unfort

Re: Hi!! im searching for a ready app of python for pdf combiner

2020-01-06 Thread Rob Gaddi
On 1/6/20 8:13 AM, alon.naj...@gmail.com wrote: Hi!! im searching for a ready app of python for pdf combiner what I need exactly is a pdf combiner for 20 + pdfs to combine them as one, do a merge Why does this need to be in Python? Just download a copy of pdftk (which I think is written in

Re: (no subject)

2020-01-06 Thread Rob Gaddi
On 1/4/20 2:29 PM, William Johnsson wrote: Hello! My name is William and im 14 years old and live in sweden. Im pretty new to programing in python and i need some help with code, (That’s why i’m here). But i couldn’t really find what i was searching for on the internet. I’m trying to write co

Re: Floating point overflow and underflow

2020-01-07 Thread Rob Gaddi
On 1/7/20 3:47 PM, Shashank Tiwari wrote: In Python3 an operation as follows: 10135.1941 * (10**8) gives the result: 101351941.0001 Similarly, using the pow function also gives the same overflow/underflow error. 10135.1941 * pow(10,8) 101351941.0001 Like multiplication, division of

Re: Coding technique: distinguish using type or abc?

2020-01-08 Thread Rob Gaddi
On 1/8/20 1:40 PM, DL Neil wrote: Do you prefer to use isinstance() with type() or to refer to collections.abc? This team producing bases statistical analyses for (lesser capable) user-coders to utilise with their own experimental 'control code'; faces situations where a list-parameter is oft

Re: Damping cofficient from envelope

2020-01-13 Thread Rob Gaddi
On 1/13/20 9:45 AM, Shiba Subedi wrote: Dear all, I'm new for python. I'm trying to compute damping coefficient ( for the waveform trace data) but I didn't get how can I do. I can plot the envelope but my interest is to find out the damping coefficient of the trace. How is it possible? If

Re: Idiom for partial failures

2020-02-20 Thread Rob Gaddi
On 2/20/20 9:30 AM, David Wihl wrote:  (first post) I'm working on the Python client library [0]for the Google Ads API [1]. In some cases, we can start a request with a partial failure [2] flag = True. This means that the request may contain say 1000 operations. If any of the operations fail

Re: Idiom for partial failures

2020-02-21 Thread Rob Gaddi
Rob Gaddi wrote: On 2/20/20 9:30 AM, David Wihl wrote:  (first post) I'm working on the Python client library [0]for the Google Ads API [1]. In some cases, we can start a request with a partial failure [2] flag = True. This means that the request may contain say 1000 operations. If a

Python concurrent.futures.ProcessPoolExecutor

2020-12-16 Thread Rob Rosengard
Warning: I am new to this group Warning: I am not an expert at Python, I've written a few small programs, and spend 20 hours of online classes, and maybe a book or two. Warning: I am new to trying to use concurrent.futures.ProcessPoolExecutor - Prior to writing this question I updated to Pytho

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-03 Thread Rob Cowie
Perhaps with the time saved by using Python instead of C# or some such, you could help to improve adodbapi.py, ensuring support for the next version of MS SQLServer, although that might be of little help in the short term. Just a thought. Also, have a gander at http://www.object-craft.com.au/proje

dictionaries/pointers

2005-10-07 Thread Rob Conner
I dont know how to do this and can't think of a simple way to. All I want is a dictionary where two keys point to the same object. (to steal the ascii art from http://starship.python.net/crew/mwh/hacks/objectthink.html) I want sometihng like this: ,--. +---+ | dict |-->|+-+|

Re: noob question Letters in words?

2005-10-07 Thread Rob Cowie
A string can be thought of as a tuple of characters. Tuples support membership testing thus... choice1 = raw_input("> ") if '1' or 's' or 'S' in choice1: #do something elif '2' or 'e' or E' in choice1: #do something It doesn't seem to me to be a good idea; If the input is 'Start', option1 is

Re: GUI on Macintosh

2005-10-07 Thread Rob Cowie
FYI... the preinstalled python distributed with OS X 10.4 includes the Tk and wxPython GUI frameworks. I am unaware of how to get either of these installed on OS 9. -- http://mail.python.org/mailman/listinfo/python-list

Re: noob question Letters in words?

2005-10-08 Thread Rob Cowie
Well.. that put me in my place! Fredrik Lundh - I hadn't realised that 'is' does not test for equivalence. Thanks for the advice. -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a Python mentor

2005-10-13 Thread Rob Cowie
I'll gladly give you a hand. I should point out - I'm no expert. I think I've reached a point a bit beyond yours; I learnt OO programming principles with java and have spent this last Summer learning python. I have a good grasp of it. If you want to get in touch, email rob_cowie AT mac DOT com -

Launching a curses script with screen -dm

2005-11-04 Thread Rob Thomas
this error: _curses.error: start_color() returned ERR Is it because a TERM variable isn't set properly? I'm running screen with -T xterm, which should take care of that... Any insight would be appreciated :) -Rob Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie write to file question

2005-12-04 Thread Rob E
. * if your parsing XML and maybe SGML the python library has some special tools for this. You might want to look at the lib or search the net. Take care, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient lookup in list of dictionaries

2005-12-04 Thread Rob E
x of the list. This is pretty much how databases work. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-01 Thread Rob Emmons
tion. It's a rational decision to avoid personal risk when you don't get much reward for choosing something different. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I make Windows Application with Python ?

2005-01-03 Thread Rob Emmons
me compilers too - pyrex, pysco starkiller, and pypy. Again, I've not used any of these and this is just from some cryptic notes I've taken. So ask others for input. Probabably you want one of the installers rather than the compilers because python compilers are kind of new, but that's just a guess. Hope that helps. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-03 Thread Rob Emmons
e are not rational in the long run, but this is the direction of the company as far as I know. This will change -- and someone will get a big promotion for doing it -- but it will take a lot of time. And of course someone already got a big promotion for outsourcing and developing the single source stratagy -- bone headed as it is. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-04 Thread Rob Emmons
numbers look good only because hidden costs are transfered to other parts of the organization. Often the outsourcing company even participates in this sort of thing -- gives upper management the servicies they have always had, gives the rest of the company poor service. I've seen this in the company I work for. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-05 Thread Rob Emmons
the Open Source community. In any case -- regardless of liscence -- I think Python is the greatest and I have great respect for all those that have made it possible. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I make Windows Application with Python ?

2005-01-06 Thread Rob Emmons
ime -- but have not had time to look into it more than keep a list of interesting projects I wanted to research in the future. I'll add your comments to my list. Again, thanks. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: The best way to do web apps with Python?

2005-01-08 Thread Rob Emmons
ue. It's also more of a security risk to read it -- because there is more potential for exploitation. Anyway, just thought I'd mention it if you didn't know. Take care, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: module structure and import question

2005-01-13 Thread Rob Emmons
any functions and classes in each py file. Modules are high level and should be used to create libraries essentailly -- this means many fucntions and classes per module. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: module structure and import question

2005-01-16 Thread Rob Emmons
I personally think one should look at modules as being collections of functions, classes, and other constructs that form librararies rather than putting each class and function in a separate module. Thanks, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with sha.new

2005-07-09 Thread Rob Williscroft
g. > > > this generates a traceback when sha.new() is called for the second > time: > > sha = sha.new(f.read()) > AttributeError: new > Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-11 Thread Rob Williscroft
>> pass >> >> def show( self ): >> for i in self.__slots__: >> print 'self.%s = %d' %(i,eval('self.%s' % (i,))) >> >> MyClass( 1, 2, 3 ).show() >> >> MyClass( z = 1, x = 2, _y = 3 ).show() >

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-11 Thread Rob Williscroft
print 'self.%s = %d' %(i,eval('self.%s' % (i,))) MyClass( 1, 2, 3 ).show() MyClass( z = 1, x = 2, y = 3 ).show() MyClass( z = 1, x = 2, _y = 3 ).show() Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What does "::" mean?

2005-07-20 Thread Rob Williscroft
: -1 ] print live[ len(live)-1 : -len(live)-1 : -1 ] print live[ len(live)-1 : -sys.maxint : -1 ] print live[ sys.maxint : -sys.maxint : -1 ] print live[ -1 : -len(live)-1 : -1 ] Of course there is only one obvious way to do it, but alas as I'm not Dutch I can't tell which it is. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Web frame systems vs. pure Python

2005-07-22 Thread Rob Cowie
I don't know what your project is, but a web framework might make your system more scalable and maintainable if it gets larger. They often provide useful mechanisms for maintaining state and persistance. Template systems IMHO should be considered separately from App frameworks (although they may b

Separation of Code in CGI App

2005-07-22 Thread Rob Cowie
Hi, I need to create a planner/calendar system using python cgi scripts. It is my first CGI app (beyond a few tutorial examples). I wish to separate the code according to function. For instance, the code to handle the DB connection, SQL querying, HTML form variable retrieval, rendering of HTML vi

Re: is this possible?

2005-07-22 Thread Rob Cowie
Yeah, Acrobat Reader is for viewing PDF's, not creating them. See http://www.reportlab.org/ for a couple of mature PDF libraries. -- http://mail.python.org/mailman/listinfo/python-list

Re: Separation of Code in CGI App

2005-07-22 Thread Rob Cowie
So, do I separate out whatever code I want to into .py modules, then have the cgi script import them, and utilise them as required? If so, do I need to put these modules somewhere described in the System Path? Can I modify the PATH at runtime to point to my modules? How? Cheers for being patient!

Re: Separation of Code in CGI App

2005-07-22 Thread Rob Cowie
Thanks, I have run through the tutorial - very good. One day, I'd like to try and organise a similar tutorial involving CGI programming. There are several very basic examples, but they leave plenty of unanswered questions such as how to best structure a cgi app, apache permissions, etc So to be c

Re: namespaces

2005-07-31 Thread Rob Williscroft
e to this: def translate( text ) import string all=string.maketrans('','') badcars=all.translate(all,string.letters+string.digits) TABLE = string.maketrans(badcars,'_'*len(badcars)) global translate def translate( text ): return text.tr

Re: namespaces

2005-07-31 Thread Rob Williscroft
Paolino wrote in news:mailman.2453.1122812091.10512.python- [EMAIL PROTECTED] in comp.lang.python: > Rob Williscroft wrote: > > > After 3 or 4 iterations I refactored you code to this: > > > > def translate( text ) > > import string > > all=str

Re: namespaces

2005-07-31 Thread Rob Williscroft
Steven D'Aprano wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Quoting Rob Williscroft: > >> > def translate( text ) >> > import string all=string.maketrans('','') >> > badcars=all.translate(all,string.letters+

inheriting from datetime

2005-08-01 Thread Rob Conner
So this is simple, why can't I run the following code? I've tried many variances of this, but simply cannot inherit from datetime or datetime.datetime. I get this on line 3. TypeError: function takes at most 2 arguments (3 given) import datetime _datetime = datetim

Re: inheriting from datetime

2005-08-01 Thread Rob Conner
gah, yeah that was strange. but i got it now. thanks. > side question: what is the point of accepting invalid dates? thats a long story. but it would be nice to have invalid dates at least just stored. so i want to try to put a class together that does it. -- http://mail.python.org/mailman/listi

Why does __init__ not get called?

2005-08-08 Thread Rob Conner
I'm still working on my DateTime class from last week... Why does __init__ not get called? The docs at http://www.python.org/dev/doc/devel/ref/customization.html read "If __new__() returns an instance of cls, then the new instance's __init__() method will be invoked" and as far as I can tell cls i

Re: Why does __init__ not get called?

2005-08-09 Thread Rob Conner
Ah ok, thats interesting I hadn't even tried a valid date yet. Now how do I get this thing to call __init__ when I pass in an invalid date and the ValueError is thrown and caught within __new__. dt = DateTime(2005, 02, 30) -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does __init__ not get called?

2005-08-09 Thread Rob Conner
Not takers? This is my attempt to get some attention by bumping my own post. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does __init__ not get called?

2005-08-10 Thread Rob Conner
I'm out of my league too. I don't know enough about __new__ and __init__. I just went another route and did a wrapper for datetime, and didn't extend it. Thanks for the effort. By chance... does anyone know, if I wrote a class, and just wanted to override __new__ just for the fun of it. What would

Re: providing arguments to base.__init__

2005-08-10 Thread Rob Conner
seems like you are not running the correct wavePlayer. make sure you don't have 2 wavePlayer vars. -- http://mail.python.org/mailman/listinfo/python-list

Retrieving Filename from Path

2005-08-31 Thread Rob Cowie
happy with that method is that it is platform specific. I would prefer to use a built in method if possible. Cheers, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

Re: Retrieving Filename from Path

2005-08-31 Thread Rob Cowie
Thanks, os.path.basename(filePath) it is then. BTW, the help(module) function is new to me! Must have missed it when reading the tutorial. Cheers! -- http://mail.python.org/mailman/listinfo/python-list

Re: Managing events

2005-09-03 Thread Rob Williscroft
With the above you could also do: main = MainClass() b = Button( "A Label", main.OnClick ) Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Redundant code in multiple methods

2005-09-09 Thread Rob Conner
No you don't need to know Zope to help me. The whole reason I'd even want to do this is because of Zope though. I made a Zope product, and now want to perfect it. some simple example code... class User: def View(self): # play with data here myHtmlDoc = "pretend this is a upe

Creating BibTex files with XdkBibTeX

2005-09-11 Thread Rob Cowie
fr/Membres/Xavier.Decoret/resources/xdkbibtex/). It is a python wrapper around a C library. Has anyone used this? More interestingly to me... has anyone successfully installed it on Mac OS X? Also, can anyone suggest an alternative? Cheers, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

Re: Redundant code in multiple methods

2005-09-13 Thread Rob Conner
Genius! Thanks guys that was exactly the help I was looking for. I'll be implementing this later today. I don't forsee any problems, so if I don't post anything else, thank you so much for the help. -- http://mail.python.org/mailman/listinfo/python-list

Property and "fset" in Python 2.4

2005-09-14 Thread Rob Pawsner
he Object class, not an old-style class as in "python-Bugs-1207379", http://www.mail-archive.com/python-bugs-list@python.org/msg03434.html. Before I clog up the digest with details and code snippets, does this sound familiar to anyone? -- Rob Pawsner, Los Angeles -- http://mail.py

Barcode Recognition

2005-09-19 Thread Rob Cowie
lt an undertaking this is for someone with no image processing experience? Cheers, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

RotatingFileHandler and logging config file

2005-03-14 Thread Rob Cranfill
If the config file specifies a RotatingFileHandler, # we need to force a doRollover now, but there's no way! # handler = logging.getLogger().getHandler() # THIS DOESN'T EXIST! handler.doRollover() # force the next file to be used Ideas, suggestions, etc? It's too bad - with the code method, I can do exactly what I want, but not with the config file. - rob -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler and logging config file

2005-03-15 Thread Rob Cranfill
Or is that not "the latest docs"? - rob -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Rob Cranfill
nothing on RotatingFileHandler. That's OK, I've given up on the idea of being able to configure a RotatingFileHandler from a config file; I'll do it in my code as a default, and if users want any *other* behavior, they can config *that*. - rob -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Rob Cranfill
7;s how to get it to do a doRollover() that's in question. No sign of support for it in the docs (which your link to doesn't elucidate RotatingFileHandler any better than my original) but that's OK, see my following message to <[EMAIL PROTECTED]> (what a funny name!)

Re: RotatingFileHandler and logging config file

2005-03-19 Thread Rob Cranfill
nt to. - rob -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler and logging config file

2005-03-19 Thread Rob Cranfill
m too much a Python noob to know - can I subclass RFH and then invoke that new class from a config file (the crux of my original question) ? I may play around with it today Thanks, - rob -- http://mail.python.org/mailman/listinfo/python-list

Re: comment out more than 1 line at once?

2004-11-30 Thread Rob Williscroft
f code here is commented out /* with embeded comments ! */ #endif Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: comment out more than 1 line at once?

2004-11-30 Thread Rob Williscroft
o execution stage, because they're dropped > by the compiler. :-) > >>> False = True >>> if False: print "It Seems you are right" It Seems you are right >>> :-) How about: if 0: print "unreachable ??" Rob. --

Re: installing wxPython on Linux and Windows

2004-12-03 Thread Rob Williscroft
olkit2003/ Its a 33 MB download, a bit less than $100. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Twisted Non-Admin Installation

2004-12-26 Thread Rob Williscroft
sted. Then remove yourself from the Administrators group. This should let you install, but wether it leaves twisted in a usable (by a non administrator) state, I don't know. Also AIUI twisted have a mailing list of there own, the link http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted

Re: Simple thread-safe counter?

2005-04-02 Thread Rob Williscroft
will this work with Jython, IornPython etc ? (*) > import itertools > f = itertools.count().next > *) I'm either being rhetorical or stupid, not sure which :). Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble using \ to escape %

2005-04-15 Thread Rob Williscroft
ot;[%s%s]\n\tpath = /mnt/samba/%s%s/%%U" % (list[0], list[1],list[0], list[1]) Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Find relative url in mixed text/html

2015-11-27 Thread Rob Hills
Soup" but my reading and limited testing lead me to believe that it is designed for well-formed HTML/XML and therefore was unsuitable for the text/html soup I have. If that belief is incorrect, I'd be grateful for general tips about using Beautiful Soup in this scenario... TIA,

Re: Find relative url in mixed text/html

2015-11-28 Thread Rob Hills
Hi Paul, On 28/11/15 13:11, Paul Rubin wrote: > Rob Hills writes: >> Note, in the beginning of this project, I looked at using "Beautiful >> Soup" but my reading and limited testing lead me to believe that it is >> designed for well-formed HTML/XML and therefore

Re: Find relative url in mixed text/html

2015-11-28 Thread Rob Hills
Hi Laura, On 29/11/15 01:04, Laura Creighton wrote: > In a message of Sun, 29 Nov 2015 00:25:07 +0800, Rob Hills writes: >> All that said, I'd be interested to see specific (and hopefully >> unbiased) info about phpBB's failings... > People I know of who run differ

Re: Find relative url in mixed text/html

2015-11-28 Thread Rob Hills
what a piece of regex is doing and I don't like having bits in my code that hurt my brain. BTW, that's not meant to be an invitation to someone to produce some regex for me, if I can't find any other way of doing it, I'll try and create my own regex and come back here if I c

Re: Generate config file from template using Python search and replace.

2015-11-29 Thread Rob Hills
ata.replace('STRING_3', 'New String 3') > print(data) > > So now the challenge is to use the read().replace magic for multiple values. It's crude, but it works well for me! -- Rob Hills Waikiki, Western Australia -- https://mail.python.org/mailman/listinfo/python-list

Re: Is secretly downloading to your computer ?!

2015-12-02 Thread Rob Hills
g to this thread. I suspect part of the OP's intent is to have his assertion generate lots of traffic, all repeating the assertion via their subject heading... Unless of course you actually agree with his assertion! Cheers, -- Rob Hills Waikiki, Western Australia -- https://mail.pyth

Re: Accessing container's methods

2015-12-07 Thread Rob Gaddi
s nothing about a Monty. And that's GREAT when you can make it work. Sometimes, in non-contrived examples, you get a situation where you can't avoid blending information around in both directions. In that case, your Monty instance is already acting as a factory for Actors. Keep going wi

Python Data Analysis Recommendations

2015-12-31 Thread Rob Gaddi
ou write the code" rather than "why you write the code". Paying money for books is acceptable; this is all on the company's time/dime. Thanks, Rob -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: how to get python version ?

2016-01-28 Thread Rob Gaddi
ms excessive, but if you're actually making that check it's because you've got a bunch of 2/3 compatibility crap you're having to work out; six will help will all of that too. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of

Re: Storing a big amount of path names

2016-02-11 Thread Rob Gaddi
each dirname, it's not worth doing. Now, if you do really have a million entries, one thing that would help with memory is setting __slots__ for MyFile rather than letting it create an instance dictionary for each one. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: Storing a big amount of path names

2016-02-12 Thread Rob Gaddi
Chris Angelico wrote: > Start by coding things in the > simple and obvious way, and then fix problems only when you see them. Is that statement available in 10 foot letters etched into stone? -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is current

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

2016-02-17 Thread Rob Gaddi
tively on what you're leaving. But over the years I've probably tried to get work done in two dozen languages. None of them turn out correct code more quickly than Python; few even come close. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: Reg: Data frame conversion

2016-02-17 Thread Rob Gaddi
Sushanth wrote: > ​i need to convert r data fr​ame to pandas dataframe and vise versa > Now, now, let's at least _try_ to help. http://lmgtfy.com/?q=convert+r+data+frame+to+pandas -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently o

Re: common mistakes in this simple program

2016-02-29 Thread Rob Gaddi
%s", e) > > Ian's example code is nice and simple to illustrate "log and then reraise" > but > few things are as annoying as log files reciting "something went wrong" or > the > equivalent without any accompanying context information. > > Chee

Re: What arguments are passed to the __new__ method ?

2016-03-02 Thread Rob Gaddi
_init__ on about half of the classes I write. I think I've needed __new__ all of twice in the years I've been writing Python. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: A mistake which almost went me mad

2016-03-03 Thread Rob Gaddi
7;s a clear distinction of: import thingfromstdlib from . import thingfromlocal A bit of a nuisance at first, but once you get used to it everything just makes unambiguous sense. The problem is that this same distinction doesn't get made for "programs", only for "module

Re: Continuing indentation

2016-03-03 Thread Rob Gaddi
le remains. Syntactic whitespace has its ups and downs on the leading edge of the line, but at least it's visible there. On the trailing end of the line it's actively inviting trouble in for coffee and eggs. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: Pythonic love

2016-03-07 Thread Rob Gaddi
ate(pfile, start=1): will save you maintaining your own counter. But other than that, nah, that's pretty much the approach you're looking for. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: breaking out of outer loops

2016-03-07 Thread Rob Gaddi
nother means of flow control. class MalformedLineError(Exception): pass for line in file: try: for part in line.split('\t'): if thispartisbadforsomereason: raise MalformedLineError() otherwisewedothestuff except MalformedLineError:

Re: empty clause of for loops

2016-03-21 Thread Rob Gaddi
gt; When you've got a sequence in which you only care about the first hit, either because you only want one or because you know from everything else going on in the program there can only be one. for fn in self._containedfunctions: if fn.__doc__ is not None: self.__doc__ = fn.__doc__

Re: repeat items in a list

2016-03-28 Thread Rob Gaddi
mplish the task. Your goal should be to write the code such that your grandmother can understand it. That way, when you screw it up, you'll be able to easily figure out where and how you did so. Or failing that, you can get grangran to show you. -- Rob Gaddi, Highland Technology -

Re: Classes

2014-10-30 Thread Rob Gaddi
ssigned to self, rather than to age, so there is no age. This is because you are trying to call a function of the class object, rather than a function of an instance of the class. pax=pet() -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order

Re: Classes

2014-10-31 Thread Rob Gaddi
7;t copy and > paste the examples into IDLE. > > JMO No, but you can retype them. Copying and pasting teaches nothing. Figuring out how to hunt down the syntax errors your retyping has induced teaches much. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: Classes

2014-10-31 Thread Rob Gaddi
ue()) > >print(obj.get_message()) > > > > > >If you're thinking that's a lot of extra work for not much benefit, 99.99% > >of the time you're right. > > I agree it is more work. But more work means more practice. I need > more pr

Re: Classes

2014-10-31 Thread Rob Gaddi
On Fri, 31 Oct 2014 14:24:11 -0700 (PDT) sohcahto...@gmail.com wrote: > On Friday, October 31, 2014 1:51:23 PM UTC-7, Chris Angelico wrote: > > On Sat, Nov 1, 2014 at 4:43 AM, Rob Gaddi > > wrote: > > > Define a Square class, subclassed from Rectangle. Use getters/sette

Re: Advice

2014-11-11 Thread Rob Gaddi
eryday. Is this possible? > > I would appreciate any help. Thank you for your time. > > > Regards > Mary-Frances Your keyword search is 'cron'. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above

Re: I love assert

2014-11-11 Thread Rob Gaddi
asserts safely actually requires a shocking amount of self-discipline. assert obj.read_accesses < 10 -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

Re: Combining lists to dictionary

2014-11-11 Thread Rob Gaddi
ip(x, y)) If you're running Python2, and really that concerned about the extra memory used by zip returning a list rather than an iterator, you can use itertools.izip -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix

Re: How to access Qt components loaded from file?

2014-11-19 Thread Rob Gaddi
g fairly simple and > > deploy it, and then maybe refine it a bit afterward. > > > > ChrisA > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > You'd use a QTimer to do that. Once you .start(5*60*1000) the timer, it'll fire a timeout signal every 5 minutes. You connect that timeout to the slots you want to execute if you don't care about order, or to a single slot function that runs the things that you want to do in some defined order. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >