[JOB] - Python Architect - Singapore

2011-06-06 Thread Rob
t for you, please don't hesitate to submit your CV to be considered immediately Python, Python, Python, Python, Python +61 2 9439 4643 Rob Stevens rob.stev...@higherrecruitment.com.au -- http://mail.python.org/mailman/listinfo/python-list

Not defined

2005-10-01 Thread Rob
When trying the basic tutorial for cgkit I always seem to get a not defined error as follows. Pythonwin GUI >>> from cgkit import * >>> Sphere() Traceback (most recent call last): File "", line 1, in ? NameError: name 'Sphere' is not defined >>> b=Box(name="Cube", pos=(1.5,2,0)) Traceback (mos

Re: Not defined

2005-10-01 Thread Rob
Thanks for the replies gives me something to chew on. Regards Gramps -- http://mail.python.org/mailman/listinfo/python-list

Imaplib gmail move email from inbox to another folder then delete from inbox not working

2013-08-25 Thread rob
I am using imaplib to copy a message from inbox to another folder. I then use /Deleted on the message. When I use expunge it does not remove the message from the inbox. I still have the 'Inbox' and 'newfolder' labels on the message. I want to only have the 'newfolder' label on the message. -

Imaplib & Gmail - cannot move from inbox to custom folder (message remains in both)

2013-08-26 Thread rob
I am using Imaplib and connecting to a Gmail account. I am issuing commands to copy the email to a custom folder then issuing delete. After expunge message still remains in inbox and customer folder. # COPY EMAIL TO FOLDER copyStatus = m.copy(emailid, 'CIRIMPORTED') pri

Re: Imaplib & Gmail - cannot move from inbox to custom folder (message remains in both)

2013-08-26 Thread rob
On Monday, August 26, 2013 5:56:09 PM UTC-6, MRAB wrote: > On 27/08/2013 00:34, r...@attoenterprises.com wrote: > > > I am using Imaplib and connecting to a Gmail account. I am issuing > > commands to copy the email to a custom folder then issuing delete. After > > expunge message still remain

IDLE won't run

2006-10-12 Thread Rob
I have Python 2.4.3 installed on Windows XP on both a real computer and a virtual machine under VMware. Just recently, IDLE stopped working. I would select IDLE from the start menu or right click on a .PY file and open it in IDLE, but nothing happens. I just uninstalled Python on the virtual mac

Re: IDLE won't run

2006-10-12 Thread Rob
hg <[EMAIL PROTECTED]> banged out in news:[EMAIL PROTECTED]: > > What kind of error do you see by calling idle from the command line > (ex: > "c:\\python.exe c:\\idle.py" > When I ran it that way, I got a raft of warnings about a "problem retrieving theme element 'builtin-forground'"

Serial port failure

2006-12-15 Thread Rob
your connections and try again" sys.exit(1) # list the lanes we have in our dictionary for n in Lanes: print "Lane - %s" % n Now, here is the error message that I get [EMAIL PROTECTED]:~/py$ ./Thex.py Looking for connected units True Request #1 True Request #2 Serial port failure. Power cycle units [EMAIL PROTECTED]:~/py$ ./Thex.py The serial port is unavailable. Disconnect your USB to Serial adapter, Then reconnect it and try again. [EMAIL PROTECTED]:~/py$ Does anyone have any ideas? Thanks, rob < [EMAIL PROTECTED] > -- http://mail.python.org/mailman/listinfo/python-list

Re: Serial port failure

2006-12-15 Thread Rob
p.setTimeout(3) #set timeout to 1.5 seconds # finish opening the port and assign a file handle p.open() return p On Dec 15, 1:07 pm, hg <[EMAIL PROTECTED]> wrote: > Rob wrote: > > Hi all, > > > I am fairly new to python, but not programming and embedded. I am

Re: Serial port failure

2006-12-15 Thread Rob
acks or naks back to the upstream box. The slave is connected to the master of the next downstream box. Does that clear up the picture a little bit? Rob On Dec 15, 11:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Rob <[EMAIL PROTECTED]> wrote: > > I am fairly n

Re: Serial port failure

2006-12-15 Thread Rob
closing and opening the port is the same reason I posted. I thought that by opening and closing the port each time (I don't do it in the 'real' code, I could determine whether the bug lay with hardware or software, or in the USB to Serial adapter. Rob On Dec 15, 3:02 pm, hg <[EMAIL

Re: Serial port failure

2006-12-15 Thread Rob
Leo, I like your tuple idea. I will implement it. The ack and nak both have the same format, namely: "Id Ack" or "Id Nak" rob On Dec 15, 4:34 pm, "Leo Kislov" <[EMAIL PROTECTED]> wrote: > Rob wrote: > > Hi all, > > > I am fairly

Re: searching for IDE

2005-06-12 Thread Rob
Try ActiveState Komodo. It costs $30 for a personal license, and is well worth it. If you like visual studio you will like it. Like many other people, I have looked far and wide for a Python IDE and this is what I've found. The free solutions don't cut it, at least without spending many many

Calling a function with unknown arguments?

2007-03-07 Thread Rob
I can get a list of a function's arguments. >>> def bob(a, b): ... return a+b ... >>> bob.func_code.co_varnames ('a', 'b') Let's say that I also have a dictionary of possible arguments for this function. >>> possible = {'a':10, 'b':5, 'c':-3} How do I proceed to call bob(a=10, b=5) with this

Re: Calling a function with unknown arguments?

2007-03-07 Thread Rob
> You can do this with a list comprehension: > bob(*[possible[k] for k in bob2.func_code.co_varnames]) > > The LC creates a list of arg values in the same order as the var names > for the function. Putting a * before the list when you call bob() > turns that list into it's arguments. Thanks Tom! T

Re: Local python web server problem

2009-02-09 Thread Rob
r hosts. I don't use cherrypy so don't know how you set this up. Are you using apache to host cherrypy or does it have it's own web server? If your using apache the IP address is selected with the Listen directive normally in the /etc/apache2/ports.conf file. > Thanks and sorry

Re: global name 'sqrt' is not defined

2009-02-09 Thread Rob
your source file. I don't know why math would not be defined, it's built in -- probably a scoping logic problem in your code. Put the form/import statement at the top of your module file (as is usually done), not inside a function or other block. Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I intentionally crash my lappy?

2010-12-20 Thread rob
On 12/20/2010 4:22 AM, Steven D'Aprano wrote: On Mon, 20 Dec 2010 02:45:18 -0600, mechtheist wrote: I am no programmer, but know the rudiments [the rudi'est of rudiments] of working with Python. I have a simple need, to have a simple script/app I can run that will crash my PC. On my desktops

Re: How can I intentionally crash my lappy?

2010-12-20 Thread rob
Thanks, that is exactly what I was looking for. Unfortunately, it is only for /non/-USB keyboards, I may be able to figure something out from there with hotkey or something. On 12/20/2010 3:31 AM, Stefan Sonnenberg-Carstens wrote: http://pcsupport.about.com/od/tipstricks/ht/makebsodxp.htm Am

os x compile, install?

2010-04-27 Thread Rob
directory? [...] running build_scripts running install_lib creating /Users/rob/Library/Python creating /Users/rob/Library/Python/2.6 creating /Users/rob/Library/Python/2.6/site-packages copying build/lib.macosx-10.4-x86_64-2.6/_AE.so -> /Users/rob/Library/ Python/2.6/site-packages copying bu

Re: os x compile, install?

2010-04-28 Thread Rob
On Apr 28, 2:09 pm, Rob wrote: > Hi, > > Python on my system is behaving badly, so I want to create a new > install from source code.  I have OS X 10.6.2, I downloaded the source > code (Python-2.6.5.tar.bz2) and did the usual, ./configure, make, sudo > make install.  Build

Back-end Python Developer Seeking Telecommute Work

2013-05-17 Thread Rob Sutton
, data interchange, hardware interfacing, etc. Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Conditional decoration

2012-06-18 Thread Rob Williscroft
equired()(f) def decorated( request ): if condition == "use-login": return _login_required( request ) else: return f( request ) return decorated @conditional_login_required def my_view(request): pass Replace (condition == "use-login") with whatever y

Re: Sharing code between different projects?

2012-08-13 Thread Rob Day
I'd just create a module - called shared_utils.py or similar - and import that in both projects. It might be a bit messy if there's no 'unifying theme' to the module - but surely it'd be a lot less messy than your TempDirectory class, and anyone else who knows Python will understand 'import shared_

Re: A difficulty with lists

2012-08-15 Thread Rob Day
> The list nlist inside of function xx is not the same as the variable u > outside of the function: nlist and u refer to two separate list objects. > When you modify nlist, you are not modifying u. > Well - that's not quite true. Before call

Re: how to call perl script from html using python

2012-08-16 Thread Rob Day
On 16 August 2012 08:23, Pervez Mulla wrote: > > > In HTml when user submit POST method, it calling Python code Instead > of this I wanna call perl script for sign up .. > > Can you not just change the action= attribute in your HTML attribute to point to your Perl CGI script? -- Robert

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Rob Day
On 17 August 2012 14:27, Gilles wrote: > > print "Content-Type: text/plain;charset=utf-8" > print > Here's the problem - you're telling the browser to display in plain text. Try 'text/html' instead. -- Robert K. Day robert@merton.oxon.org -- http://mail.python.org/mailman/listinfo/python

Re: help with simple print statement!

2012-08-24 Thread Rob Day
entally - you can copy from the Windows console by right-clicking and selecting "Mark". It's a little easier than taking a screenshot!) Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Unittest - testing for filenames and filesize

2012-08-26 Thread Rob Day
On Sun, 2012-08-26 at 10:36 -0700, Tigerstyle wrote: > self.assertEqual(statinfo.st_size, filesize) > > I'm still getting AssertionError and the error says: 100 !=b' > > filesize is the character 'b' repeated one million times (the contents of the file, in other words). statinfo

log4py confusion

2012-12-13 Thread Rob Richardson
Greetings! I have finally gotten fed up with all of the Python scripts used in my company that have every parameter hard-coded. I am rewriting one of them to read all of its parameters from an XML file. Then, we can change the XML file to control which database it is using, whether its runn

RE: log4py confusion

2012-12-13 Thread Rob Richardson
st-bounces+rob.richardson=rad-con@python.org] On Behalf Of Rob Richardson Sent: Thursday, December 13, 2012 1:58 PM To: python-list@python.org Subject: log4py confusion Greetings! I have finally gotten fed up with all of the Python scripts used in my company that have every parameter hard-co

RE: log4py confusion

2012-12-13 Thread Rob Richardson
t. Thanks again! RobR -Original Message- From: Python-list [mailto:python-list-bounces+rob.richardson=rad-con@python.org] On Behalf Of MRAB Sent: Thursday, December 13, 2012 2:35 PM To: python-list@python.org Subject: Re: log4py confusion On 2012-12-13 18:58, Rob Richardson wro

RE: log4py confusion

2012-12-13 Thread Rob Richardson
=rad-con@python.org] On Behalf Of Rob Richardson Sent: Thursday, December 13, 2012 2:52 PM To: python-list@python.org Subject: RE: log4py confusion Thanks for the suggestion, but I don't think that can be it. At least, it's not it on the line you specified. That form, with the t

Re: sqlite3 puzzle

2013-01-15 Thread Rob Day
On 15 January 2013 07:09, llanitedave wrote: > So I put the following test code in my initialization method: > > # open database file > self.geologger_db = sqlite3.connect('geologger.mgc') > self.db_cursor = self.geologger_db.cursor() > self.foreign_key_status = self.db_cursor.exe

Re: sqlite3 puzzle

2013-01-15 Thread Rob Day
On 15 January 2013 15:51, llanitedave wrote: > Thanks for the suggestion, Rob, but that didn't make any difference. I've > never had an issue with putting the execute object into a variable and > calling "fetch" on that variable. > > I can accept realit

Re: sqlite3 puzzle

2013-01-15 Thread Rob Day
sion` and see exactly what the changes were. On 15 January 2013 20:29, llanitedave wrote: > On Tuesday, January 15, 2013 9:13:13 AM UTC-8, Rob Day wrote: >> On 15 January 2013 15:51, llanitedave wrote: >> >> > Thanks for the suggestion, Rob, but that didn't make any

Re: Sending a broadcast message using raw sockets

2013-01-21 Thread Rob Williscroft
;\xff' * 6 + addr * 16 s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM ) s.setsockopt( socket.SOL_SOCKET, socket.SO_BROADCAST, 1 ) s.sendto( msg, ( ip, port ) ) s.close() The mac address is 6 pairs of hex digits seperated by '-' or ':'. http://en.wikipedia.org/wiki/Wake-on-LAN Rob. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending a broadcast message using raw sockets

2013-01-22 Thread Rob Williscroft
Peter Steele wrote in news:0c2b3482-df46-4324-8bf9-2c45d3f6b...@googlegroups.com in comp.lang.python: > On Monday, January 21, 2013 1:10:06 AM UTC-8, Rob Williscroft wrote: >> Peter Steele wrote in >> >> news:f37ccb35-8439-42cd-a063-962249b44...@googlegroups.com in &g

Re: Sending a broadcast message using raw sockets

2013-01-22 Thread Rob Williscroft
socket.SOCK_RAW ) I tried this on windows and it needed admin privaleges to run. Rob. -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Dict comp help

2013-01-24 Thread Rob Day
On 24 January 2013 21:11, Oscar Benjamin wrote: l = [{'a': 'xx', 'b': 'yy', 'c': 'zz'}, {'a': 'dd', 'b': 'ee', 'c': 'ff'}] dict(d.values()[:2] for d in l) > {'xx': 'zz', 'dd': 'ff'} Python doesn't guarantee any ordering of items in a dictionary; {'a': 'xx', 'b': 'yy', 'c': 'zz'}.values(

Re: WLAN tester

2013-01-28 Thread Rob Day
On 28 January 2013 17:07, Wanderer wrote: > Yes. I noticed this variability. I've been using the Totusoft > Lan_Speedtest.exe to test some modules. I've tested through the wifi to our > intranet and saw variations I believe do to network traffic. I also tried > peer to peer and the write time a

Re: pyrudp

2013-01-30 Thread Rob Day
Have you seen http://pyraknet.slowchop.com/? It appears to do a similar thing. On 30 January 2013 17:02, Jorge Alberto Diaz Orozco wrote: > I´ve tried it but it´s not reliable. Datagrams can arive disorganised or just > not arive. > Some programmers said I most use TCP, but I need to use UDP. >

RE: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Rob Richardson
"In America, they haven't spoken it for years!" -- Professor Henry Higgins, "My Fair Lady" -Original Message- On 24/01/2012 05:57, Rick Johnson wrote: I would wish that pedantic citizens of the British colony in America stopped calling whatever misinterpreted waffle they produce, Englis

PythonWin debugger holds onto global logging objects too long

2012-01-24 Thread Rob Richardson
? Thank you very much! Rob Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot connect to IMAP server in Python 3.2

2012-04-04 Thread Rob Williscroft
Steven D'Aprano wrote in news:4f7d2475$0$3$c3e8...@news.astraweb.com in gmane.comp.python.general: > I can connect to an IMAP server using Python 2.6: > > steve@runes:~$ python2.6 > Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) server = imaplib.IMAP4_SSL('x') > But when I tr

Re: ordering with duck typing in 3.1

2012-04-07 Thread Rob Williscroft
hon.org/release/3.1.3/library/constants.html? highlight=__lt__#NotImplemented http://code.activestate.com/recipes/576685/ http://docs.python.org/py3k/library/functools.html#functools.total_ordering Rob. -- http://mail.python.org/mailman/listinfo/python-list

RE: How to stop the program as soon as one of the condition is met

2012-04-16 Thread Rob Richardson
Please show us your code. RobR -- http://mail.python.org/mailman/listinfo/python-list

How do I find out what file an import is using?

2012-05-09 Thread Rob Richardson
I am trying to work with a Python script someone else wrote. The script includes the line from Level3Utils import * I need to look at the functions that are included in that import. In an effort to identify exactly which file is being used, I renamed the Level3Utils.py and Level3Utils

Re: None versus MISSING sentinel -- request for design feedback

2011-07-15 Thread Rob Williscroft
ues. Missing values should be just ignored. E.g.: > > mean([1, 2, MISSING, 3]) => 6/3 = 2 rather than 6/4 or raising an error. If you can't make your mind up then maybe you shouldn't: MISSING = MissingObject() def mean( sequence, missing = MISSING ): ... Rob. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.isdir do not work for Foder named '2011-07-03'

2011-07-18 Thread Rob Williscroft
2011-07-03.lnk will exist. Also have you left "Hide extensions for known file types" switched on, in which case it may really be "2011-07-03.zip" for example, a file not a directory even though Windows explorer shows it as a directory. -- Rob. -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning a value from exec or a better solution

2011-08-29 Thread Rob Williscroft
obals ) return globals[ "double" ] print( test() ) The a bove works on 2.7 (I tested it) on earlier versions you may need to use: exec src in globals Rob. -- http://mail.python.org/mailman/listinfo/python-list

Re: Button Label change on EVT_BUTTON in wxpython!!!

2011-08-29 Thread Rob Williscroft
): def after(): self.run_button.SetLabel('Install') def task(): installation_task() wx.Callafter( after ) self.run_button.SetLabel('Installing..') import threading threading.Thread( target = task ).start() Rob. -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning a value from exec or a better solution

2011-08-30 Thread Rob Williscroft
ion may populate globals or locals with > whatever they want so that also rules out doing a simple "for item in > globals", as there may be more than just the one function in there > (though I suppose I may be able to work around that). > > Why not just get the nam

Re: Returning a value from exec or a better solution

2011-08-30 Thread Rob Williscroft
>> Arnaud >> > > That's brilliant and works flawlessly. Thank you very much! If an impementation (as you say up thread) can populate globals or locals with whatever they want, then how do you know that last item added was the function definition the user supplied ? Rob. -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning a value from exec or a better solution

2011-08-30 Thread Rob Williscroft
Ethan Furman wrote in news:4e5d29c8.8010...@stoneleaf.us in gmane.comp.python.general: > Jack Trades wrote: >> On Tue, Aug 30, 2011 at 2:37 AM, Rob Williscroft wrote: >>> If an impementation (as you say up thread) can populate globals >>> or locals with whatever they

Re: Returning a value from exec or a better solution

2011-08-30 Thread Rob Williscroft
Arnaud Delobelle wrote in news:CAJ6cK1YVi3NQgdZOUdhAESf133pUkdazM1PkSP=p6xfayvo...@mail.gmail.com in gmane.comp.python.general: > On 30 August 2011 13:31, Jack Trades wrote: >> >> >> On Tue, Aug 30, 2011 at 2:37 AM, Rob Williscroft wrote: >> >>> >>

Re: Addition problems

2011-04-01 Thread Rob Williscroft
func_fit_quality_hist_lk) is different the second time you call it. So it either depends on and modifies a global or a value referenced or contained in one of the arguments. Rob. -- http://mail.python.org/mailman/listinfo/python-list

Noob Question

2011-04-19 Thread Rob McGillivray
st_tk test_ttk_guionly test_ttk_textonly test_zlib sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='a' encoding='UTF-8'> make: *** [test] Error 1 Any help would be appreciated. Apologies if this post is to the wrong group. If

RE: 3.2 test failures on Centos 5.6 (was Re: Noob Question)

2011-04-19 Thread Rob McGillivray
d tests in verbose mode as you recommended and then re-post my findings. Again, appreciate the friendly welcome. :-) Regards, Rob -Original Message- From: python-list-bounces+rob=mymcgillivray@python.org [mailto:python-list-bounces+rob=mymcgillivray@python.org] On Behalf Of Terry

Python 3.2 on CentOS 5.6 & compatibility concerns

2011-04-21 Thread Rob McGillivray
but at the same time I'm looking to use CentOS as the server platform for deployment, and so want to understand what's involved in managing Python installations/upgrades on this platform. Thanks in advance, Rob-- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 dict question

2011-05-06 Thread Rob Wolfe
on 3 myDict.items() return iterator. > Of course, I could use > for key, val in myDict.items(): >do_something >break > but maybe there is any better way? key, val = next(iter(myDict.items())) http://docs.python.org/py3k/library/stdtypes.html#dictionary-view-objects HTH, Rob --

Re: How do I check all variables returned buy the functions exists

2017-09-15 Thread Rob Gaddi
ser with Python 2.7 Regards, Ganesh Don't unpack them yet, you still want them to be aggregated. vals = return_x_values() if all(vals): v1, v2, v3 = vals print "all values true" else: print "at least one false value" -- Rob Gaddi, Highland Technology -- www

Re: Boolean Expressions

2017-09-26 Thread Rob Gaddi
would actually be an xnor (not xor) operation, a fairly rare usage case. Python doesn't even provide an operator for that, the closest thing would be (bool(x) == bool(y)). "And" means "and". This is true AND that is true. -- Rob Gaddi, Highland Technology -- www.highla

Real Programmers Write Docs

2017-09-27 Thread Rob Gaddi
Anyone have any good references on using Sphinx to generate a mix of autogenerated API docs and hand-written "Yeah, but this is what you DO with it" docs? Free is good but I'm happy to drop money on books if they're worthwhile. -- Rob Gaddi, Highland Technology -- www.hi

Re: Real Programmers Write Docs

2017-09-28 Thread Rob Gaddi
On 09/27/2017 04:15 PM, Ned Batchelder wrote: On 9/27/17 6:55 PM, Rob Gaddi wrote: Anyone have any good references on using Sphinx to generate a mix of autogenerated API docs and hand-written "Yeah, but this is what you DO with it" docs?  Free is good but I'm happy to drop mo

Re: Line terminators in Python?

2017-09-29 Thread Rob Gaddi
he only time I've ever needed to explicitly worry about '\r' is communicating over sockets or serial ports to devices. And in those cases you need to stuff them with bytes rather than str anyhow, so you're already down in the gory bits. -- Rob Gaddi, Highland Technology --

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Rob Gaddi
built in module so there are less dependencies. Any ideas? You mean, other than .split('/')? -- 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: I used list, def. why li += [100,200] , and li = li + [100,200] is different

2017-10-23 Thread Rob Gaddi
The second time, however, you take the existing value that "li" refers to [1,2,3,4,5], create a new object that is ([1,2,3,4,5] + [100,200]), and reassign the local reference "li" to point to that new object. Then your function ends, "li" goes out of scope, nothing

Re: h5py.File() gives error message

2017-10-24 Thread Rob Gaddi
older with file is there. Why error message? Is it h5py.File() or is it my file? Everything seems pretty simple, what's going on? Thank you! Be 100% sure your directory is correct. Try it again with an absolute path to the file. Windows makes it far too easy for the working director

Re: Easiest way to access C module in Python

2017-11-07 Thread Rob Gaddi
ightforward and I've made it do some very heavy lifting over the years. Cython is definitely more work. SWIG makes sense if you've got a huge number of interfaces you're trying to map and need to automate the process, but if you've got south of 20 I'd just do it n

Re: Python Learning

2017-12-18 Thread Rob Gaddi
e some kind of portfolio, just as a bar of "This is what I consider my good work to be." The idea that someone is going to have years of experience, but not a single page of code that they can let me look over always strikes me as odd. -- Rob Gaddi, Highland Technology -- www.highlandtec

Re: Python Learning

2017-12-18 Thread Rob Gaddi
On 12/18/2017 01:52 PM, Gene Heskett wrote: On Monday 18 December 2017 16:05:10 Rob Gaddi wrote: On 12/18/2017 08:45 AM, Larry Martell wrote: On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa wrote: However, one great way to stand out is a portfolio of GitHub projects. Several people have

Re: property decorator?

2017-12-20 Thread Rob Gaddi
ance stored in variable name foobar. That method assigns the new method to the "_setter" of that property instance and returns the updated property, which is assigned redundantly to the variable name foobar. -- 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 goto

2018-01-02 Thread Rob Gaddi
etc. Though it appears some wag has used function decorators to implement goto statements: https://pypi.python.org/pypi/goto-statement/1.1 Rather clever, it seems. Skip If only all that power had been used for good instead of evil... -- Rob Gaddi, Highland Technology -- www.highlandtechnolo

Native object exposing buffer protocol

2018-01-05 Thread Rob Gaddi
something that should be doable easily without having to throw around a lot of extraneous copies. -- 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: Native object exposing buffer protocol

2018-01-08 Thread Rob Gaddi
On 01/05/2018 04:27 PM, Ben Finney wrote: Rob Gaddi writes: I'd like to create a native Python object that exposes the buffer protocol. Basically, something with a ._data member which is a bytearray that I can still readinto, make directly into a numpy array, etc. The “etc.” seems p

Re: pip --user by default

2018-01-15 Thread Rob Gaddi
#x27;s the difference between a --user install and a system 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

3.6.4 IDLE

2018-02-04 Thread Rob Alspach
Hi Everybody! I just installed python 3.6.4 it was a fresh install (no former versions). I have never used python but have some IS background. The videos I am seeing online all show the IDE / IDLE; however, it does not install for me. I am installing from the download python-3.6.4-embed-amd64.zip.

Re: How to work on a package

2018-02-07 Thread Rob Gaddi
I write a single line of code, I've got a setup.py and the directory framework. Then you install the package using pip -e (or in practice --user -e). That's the missing piece. That way you can import your module from the interpreter, because it's now on the path, but its physical loca

Re: How to work on a package

2018-02-07 Thread Rob Gaddi
On 02/07/2018 03:17 PM, Grant Edwards wrote: On 2018-02-07, Rob Gaddi wrote: When I'm working on a module, the trick is to write a setup.py (using setuptools) from the very get-go. Before I write a single line of code, I've got a setup.py and the directory framework. Then you i

Re: Is there are good DRY fix for this painful design pattern?

2018-02-26 Thread Rob Gaddi
uto-default behavior" from the rest of them. Yeah, **kwargs is clumsy, but it gets the job done. -- 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: RFC: Proposal: Deterministic Object Destruction (Posting On Python-List Prohibited)

2018-03-01 Thread Rob Gaddi
tion with intelligent cyclical reference breaking. -- 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: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Rob Gaddi
def add2list(lst, elem): lst.extend([elem, elem]) return lst I did all the type checking I needed to there; none whatsoever. If passed a list, or something that behaves like one, that does the expected thing. If passed an ExtensionLadder, it probably does the wrong thing, but that is n

Re: Invalid Syntax

2016-08-09 Thread Rob Gaddi
; > Hal A missing colon, the appropriate location of which is left as an exercise to the reader. -- 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: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Rob Gaddi
Juan Pablo Romero Méndez wrote: > 2016-08-09 13:18 GMT-07:00 Rob Gaddi : > >> Juan Pablo Romero Méndez wrote: >> >> > 2016-08-09 12:06 GMT-07:00 Paul Rubin : >> > >> >> Juan Pablo Romero Méndez writes: >> >> > In online forums so

Re: Python 3: Launch multiple commands(subprocesses) in parallel (but upto 4 any time at same time) AND store each of their outputs into a variable

2016-08-24 Thread Rob Gaddi
ults. For older Python, create a subprocess.Popen (again with stdout and stderr=subprocess.PIPE) and call the communicate() method. There's probably a dozen other ways. That one there, that's your easiest. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is curr

Re: degrees and radians.

2016-08-24 Thread Rob Gaddi
ctangular or vice versa in > polar. > I have never seen it done. > While I fully admit to thinking in degrees, any time I'm actually doing any mathematical work my units are either radians or cycles. The representation of angle in fixed point cycles actually comes o

Re: Alternatives to XML?

2016-08-24 Thread Rob Gaddi
t; > This seems even worse from a readability point of view. The arguments to > 'compare' are a long way away from the block to be executed. > > Can anyone offer an alternative which is closer to my original intention? > > Thanks > > Frank Millman > You&#

Re: Multimeter USB output

2016-08-29 Thread Rob Gaddi
that weeks manage to fall into with nothing to show for them. If this is an exercise in learning to work with libusb then have at. But if what you actually need from this is to talk to the meter? You're talking to it already. Take the win and walk. -- Rob Gaddi, Highland Technology -- ww

Re: Linear Time Tree Traversal Generator

2016-09-20 Thread Rob Gaddi
yield node._value yield from iter(node._right) I think there's a little bit of optimization that goes on using yield from. That said, all this has a serious stink of premature optimization. -- 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: Counting words in a string??

2016-09-30 Thread Rob Gaddi
e. > > It would help if you could comment the code. > Thankyou in advance!! I'm sure it would help; your professor will probably take points off otherwise. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order.

Re: Python and ssh for remote login

2016-10-05 Thread Rob Gaddi
Noah wrote: > Hello folk, > > I would like to use a python script to ssh into a server using a username > and password and perhaps ass port. > > Any ideas on how to script that. > > Thanks > > Noah paramiko -- Rob Gaddi, Highland Technology -- www.highlandtechnolo

Re: How to process syntax errors

2016-10-12 Thread Rob Gaddi
I want to >> grab that error and process. >> >> Regards, Puneet > > Steve, You are absolutely right. I am trying to eliminate the method of using > parenthesis while calling in my file. Especially when I call it from a > instance. There's a simple solution the

Re: need help for an assignment plz noob here

2016-10-17 Thread Rob Gaddi
ers in the shell and seeing what you can do with it. The word you're looking for is 'slices'. Figure out interactively what you need to do, then write it up. -- 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

System-wide module path

2016-10-24 Thread Rob Gaddi
s to /usr/highland/python3.4/site-packages, and put all the executable stubs that pip creates into /usr/highland/bin, then I can just rsync all of /usr/highland. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https

Re: Why keys method does not work with MutableMapping?

2016-11-11 Thread Rob Gaddi
) > md.keys() > ==> KeysView() Nope, that's exactly right. That's the python3 behavior. >>> d = {'a': 1, 'b':2} >>> d.keys() dict_keys(['b', 'a']) Keys returns a dedicated keys object now, not just a list. That thin

Re: Access to the caller's globals, not your own

2016-11-14 Thread Rob Gaddi
#x27;] > ... > > > but what magic do I need? globals() is no good, because it returns the > library's global namespace, not the caller's. > > > Any solution ought to work for CPython, IronPython and Jython, at a minimum. > class Library: SPAMIFY = False def make_spam(m): ... import library Library = library.Library() result = Library.make_spam(99) -- 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: Why does this list swap fail?

2016-11-14 Thread Rob Gaddi
s that's one thing, but I certainly hope that's not actually going to be production code. Even if it were right it's unreadable. -- 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: PyQt pass data from class

2016-11-15 Thread Rob Gaddi
at is in the class Form > > in wich way i can have access to the lineedit of class Form without event > from class Cornice > > Many Thanks Traditionally you'd have Cornice emit a Signal, which when you __init__the Form you'd connect to the appropriate slot. I don'

  1   2   3   4   5   6   7   8   9   10   >