Re: Easy questions from a python beginner

2010-07-11 Thread Michael Torrie
On 07/11/2010 11:48 AM, wheres pythonmonks wrote: > I'm an old Perl-hacker, and am trying to Dive in Python. I have some > easy issues (Python 2.6) > which probably can be answered in two seconds: > > 1. Why is it that I cannot use print in booleans?? e.g.: True and print "It is true!" Th

Re: integer >= 1 == True and integer.0 == False is bad, bad, bad!!!

2010-07-12 Thread Michael Torrie
On 07/12/2010 06:18 PM, Steven D'Aprano wrote: > Early versions of BASIC used -1 as true and 0 as false. They did this for good reason. BASIC had no logical operators. AND, OR, and NOT were all actually bitwise operators. By making the True value -1, the bitwise operations yielded the result on

Re: integer >= 1 == True and integer.0 == False is bad, bad, bad!!!

2010-07-12 Thread Michael Torrie
On 07/12/2010 06:36 PM, Paul Rubin wrote: > I'd personally prefer > > if not bool(myValue): > > which would call the myValue's __bool__ method if it chose to implement > one. Explicit is better than implicit. That's just ugly. Probably a more explicit way would be to have an is_true() and

Re: python ldap recursive

2010-07-15 Thread Michael Ströder
ou're using http://www.python-ldap.org you're probably looking for the asynchronous search methods: http://www.python-ldap.org/doc/html/ldap.html#ldap.LDAPObject.search See general note: http://www.python-ldap.org/doc/html/ldap.html#sending-ldap-requests Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: detect endianness of a binary with python

2010-07-21 Thread Michael Torrie
On 07/21/2010 08:02 AM, Grant Edwards wrote: > On 2010-07-21, Holger brunck wrote: > >> I use python 2.5 and I am looking for a possibility to determine a >> file type. Especially the endianness of a file is needed for me. Is >> there a way to detect this easily in python? > > Only if you alread

Updating path.py

2010-07-26 Thread Michael Hoffman
all change. The question is what is the best way to do that and ensure continuity with the previous versions. Can I (or someone else) take over the PyPI entry in question? Other suggestions? Many thanks, Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Updating path.py

2010-07-27 Thread Michael Hoffman
Robert Kern wrote: On 7/26/10 5:16 PM, Michael Hoffman wrote: I have been using Jason Orendorff's path.py module for a long time. It is very useful. The only problem is that Python 2.6 deprecates the md5 module it imports, so I (and others using my software) now get this warning whenever

Re: Why is python not written in C++ ?

2010-08-01 Thread Michael Torrie
On 08/01/2010 07:09 PM, John Bokma wrote: >> One thing that comes to mind is that it's much easier to distribute C >> libraries than C++ libraries. > > In the beginning of C++ there were programs that just converted C++ to C > (frontends). At least that is how the C++ compiler Acorn sold worked.

Re: constructing and using large lexicon in a program

2010-08-02 Thread Michael Torrie
On 08/02/2010 11:46 AM, Majdi Sawalha wrote: > I am developing a morphological analyzer that depends on a large lexicon. i > construct a Lexicon class that reades a text file and construct a dictionary > of > the lexicon entries. > the other class will use the lexicon class to chech if the word

Re: Why is python not written in C++ ?

2010-08-02 Thread Michael Torrie
On 08/02/2010 03:42 PM, Mark Lawrence wrote: > I can't understand why any serious programmer mentions C++. As soon as I > read it, I have to rush either to the kitchen to find a bowl to throw up > in, or head for the toilet so I can talk to the great white telephone. Sometimes, C++ is just the r

Re: Is there any way to minimize str()/unicode() objects memory usage [Python 2.6.4] ?

2010-08-06 Thread Michael Torrie
On 08/06/2010 07:56 PM, dmtr wrote: > Ultimately a dict that can store ~20,000,000 entries: (u'short > string' : (int, int, int, int, int, int, int)). I think you really need a real database engine. With the proper indexes, MySQL could be very fast storing and retrieving this information for you.

Re: new to python - trouble calling a function from another function

2010-08-06 Thread Michael Torrie
On 08/05/2010 01:25 AM, Brandon McCombs wrote: > How can that be? I don't get any errors when the script > executes. Surely this isn't some limitation I'm encountering? > > > yield (p.destination - self.currenteFloor) * TRAVELTIME, self ^ To be succinct, goUp(

Re: Python Portability

2010-08-07 Thread Michael Torrie
On 08/07/2010 01:17 PM, W. eWatson wrote: > Presumably I have him somehow delete the numpy site-package, the numpy > 1.2.0 package? Just drill his way dow from the .../lib/site_packages? > Then install 1.2.0. He's missed the boat on that before by not following > instructions. Wait. I'm confus

Re: Win7. Why Don't Matplotlib, ... Show up in Control Panel Add-Remove?

2010-08-08 Thread Michael Torrie
On 08/08/2010 10:16 AM, W. eWatson wrote: > See Subject. I use matplotlib, scipy, numpy and possibly one other > module. If I go to the control panel, I only see numpy listed. Why? I > use a search and find only numpy and Python itself. How can matplotlib > and scipy be uninstalled? The best wa

ANN: python-ldap-2.3.12

2010-08-09 Thread Michael Ströder
stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). Project's web site: http://www.python-ldap.org/ Ciao, Michael. -- Michael Ströder E-Mail: [email protected] http://www.stroeder.com Released 2.3.12 2010-08-05 Ch

Re: Circular imports (again)

2010-08-09 Thread Michael Torrie
On Aug 9, 6:19 am, "Frank Millman" wrote: > It has just happened again. I have organised my code into three modules, > each representing a fairly cohesive functional area of the overall > application. However, there really are times when Module A wants to invoke > something from Module B, ditto fo

Re: easy question on parsing python: "is not None"

2010-08-09 Thread Michael Torrie
On 08/09/2010 06:11 AM, saeed.gnu wrote: > On Aug 9, 3:41 pm, "saeed.gnu" wrote: >> "x is y" means "id(y) == id(y)" >> "x is not y" means "id(x) != id(x)" >> "x is not None" means "id(x) != id(None)" >> >> "x is not None" is a really silly statement!! because id(None) and id

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Michael Torrie
On 08/10/2010 02:07 AM, Gregory Ewing wrote: > Tim Roberts wrote: > >> I'm not sure that's really fair. The .NET Common Language Runtime is a >> vast and very useful class library, including two complete GUI systems. The >> thought was that IronPython and IronRuby would let people who were >> com

Re: How to swallow traceback message

2010-08-11 Thread Michael Torrie
On 08/11/2010 09:32 AM, Back9 wrote: > I should have mentioned that I already use try/except > KeyboardInterrupt statement. > But it does not seem to work as I expected. If you want anyone to help further, you will need to say a) what you are expecting it to do and b) what it is actually doing. --

Re: Confused: Newbie Function Calls

2010-08-11 Thread Michael Torrie
On 08/11/2010 10:07 AM, fuglyducky wrote: > I am a complete newbie to Python (and programming in general) and I > have no idea what I'm missing. Below is a script that I am trying to > work with and I cannot get it to work. When I call the final print > function, nothing prints. However, if I print

Re: 79 chars or more?

2010-08-16 Thread Michael Torrie
On 08/16/2010 08:59 PM, AK wrote: > But.. why horizontal scrolling, isn't autowrap much better than that? Wouldn't it really make a visual mess of Python code if lines wrapped? Maybe if they wrapped smartly. In general, the only time I find my lines longer than 75 characters are strings or somet

Re: 79 chars or more?

2010-08-16 Thread Michael Torrie
On 08/16/2010 10:50 PM, AK wrote: > I stay away from ugly cramped one-liners; I mostly run over 79 when I > have a few `and` and `or` clauses or long strings. I've also noticed > something interesting: going from 79 to 99 affects a relatively large > number of lines, but going over 99 (i.e. 99 to 1

Re: Iterative vs. Recursive coding

2010-08-21 Thread Michael Torrie
On 08/21/2010 03:03 AM, Steven D'Aprano wrote: >> - there must be a condition where the recursion has to stop otherwise >> the routine will continue to call itself infinitely. >> This is called the Base Case > > I agree with this, although I've never heard the name "Base Case" before. "Base Cas

Re: Exotic Logics

2009-06-18 Thread Michael Torrie
William Clifford wrote: > I've read one can do all of the 16 binary operations with clever uses > of NAND or NOR. That is correct. In fact semiconductor logic is done using these two principle gates. See http://en.wikipedia.org/wiki/NAND_logic . Quite interesting really. -- http://mail.python

Re: Open source python projects

2009-06-23 Thread Michael Ströder
d. But instead of pointing you to a specific project I'd rather recommend that you contribute to projects you're using for your own daily work. Why? Because you simply know what's really needed if you deploy a software yourself. Ciao, Michael. -- Michael Ströder E-Mail: mic

Re: [Mac] file copy

2009-06-23 Thread Michael Torrie
Tobias Weber wrote: >> Apple's version of cp is aware of extended attributes. > > Yes, but the manual doesn't say to what extent, nor anything about ACLs mv, cp, etc (but not rsync) are completely aware of resource forks from Tiger on. This is well documented and known on the Mac forums. So shu

Re: C-extension 2 times slower than exe

2009-06-23 Thread Michael Torrie
Rolf Wester wrote: > The runtime is about 2.5 sec and 5.0 sec respectively. I not only use > the time command to measure the time consumed but I also measure the > time within the C-code using clock() and get similar result. So the > Python startup time is not the reason for the runtime difference

Re: [Mac] file copy

2009-06-23 Thread Michael Torrie
Tobias Weber wrote: > Why "so"? shutil does not use bin/cp! That's good to know. I had always thought that that was what shutils did, but you're right; it does not. That said, since cp indeed *can* copy resource forks on Tiger and up, you could use subprocess to call it. Just as an aside, your

Re: A superclass using a child classes' methods

2009-06-24 Thread Michael Torrie
Kurt Schwehr wrote: > I'm trying to build an OO system for encoding and decoding > datapackets. I'd like the parent class to have an encode function > that uses each of the child classes' packing methods. It appears that > this works for attributes of children accessed by the parent, but not > fo

extending method descriptors

2009-06-25 Thread Michael Sliczniak
Suppose I have this: Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class A(object): ... __slots__ = ('x', 'y') ... >>> a = A() >>> b = A() So I am using descriptors (and

Re: 3.2*2 is 9.6 ... or maybe it isn't?

2009-06-25 Thread Michael Torrie
Bojan Sudarevic wrote: > The first thing I typed into it was 3.2*3 (don't ask why I typed *that*, > I don*t know, I just did). And the answer wasn't 9.6. > > Here it is: > 3.2*3 > 9.6014 I'm surprised how often people encounter this and wonder about it. As I began programming

Re: extending method descriptors

2009-06-26 Thread Michael Sliczniak
On Jun 25, 2:30 pm, Carl Banks wrote: Thank you for the very good reply. In fact delegating is the approach that works. The main thing to notice is that for an uninstantiated class the first arg to __get__ is None: class desc(object): __slots__ = ('x') def __init__(self, desc):

Re: 3.2*2 is 9.6 ... or maybe it isn't?

2009-06-26 Thread Michael Torrie
Robert Kern wrote: > In the former case, you can claim that decimal floating point is more > accurate > *for those problems*. But as soon as you have a division operation, decimal > floating point has the same accuracy problems as binary floating point. True. Poor choice of words on my part.

Re: Advantages of Python (for web/desktop apps)?

2009-06-29 Thread Michael Torrie
iceangel89 wrote: > i am mainly a PHP (mainly using Zend Framework MVC now) Web Developer. used > .NET (VB & C#) for Desktop apps. i nv used Python and am looking at Python > now (for desktop apps since its open source and just want to try what it > offers, but will like to know what good it has fo

Re: Wrapping comments

2009-07-05 Thread Michael Torrie
Lawrence D'Oliveiro wrote: > I tried using Emacs via SSH from a Mac once. Made me run screaming for the > nearest Windows box > . Interesting rant, but the problem is with the key bindings they chose to use in Terminal.

Catching control-C

2009-07-06 Thread Michael Mossey
What is required in a python program to make sure it catches a control- c on the command-line? Do some i/o? The OS here is Linux. Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Catching control-C

2009-07-06 Thread Michael Mossey
On Jul 6, 2:47 pm, Philip Semanchuk wrote: > On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote: > > > What is required in a python program to make sure it catches a   > > control- > > c on the command-line? Do some i/o? The OS here is Linux. > > You c

Re: python-ldap

2009-07-09 Thread Michael Ströder
the .egg files recently (also link on the download page above). Ciao, Michael. -- Michael Ströder E-Mail: [email protected] http://www.stroeder.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Examples of Python driven Microsoft UI Automation wanted

2009-07-09 Thread Michael Torrie
DuaneKaufman wrote: > With MS utilities like UISpy and the like, I can 'see' the controls in > the application, but I > do not seem to be able to manipulate them programatically, and I > believe it us simply due > to my not understanding of the UI Automation API. You're probably better off using a

Re: Examples of Python driven Microsoft UI Automation wanted

2009-07-09 Thread Michael Torrie
TheSeeker wrote: > Alternatives to Microsoft's UI Automation are welcome too, but I have > tried using winguiauto and watsup (along with AutoIt), and there seems > to be severe limitations when using these tools with WinForm > applications. http://www.autoitscript.com/forum/index.php?showtopic=967

Re: getopt code NameError exception on logTail.py

2009-07-17 Thread Michael Torrie
LoD MoD wrote: > In this instance the trackback was somewhat unhelpful.There problem was > here: > >file = open(filename, 'r') > > should be > >file = open(a, 'r') > > args should be passed within the getopt riff Well given the code you posted, this little "problem" you

Re: Question regarding style/design..

2009-07-17 Thread Michael Torrie
Wells Oliver wrote: > Sometimes I see relatively small application, generally task scripts, > written as essentially a list of statements. Other times, I see them neatly > divided into functions and then the "if __name__ == '__main__':" convention. > Is there a preference? Is there an... applicatio

Re: GTK+ ques

2009-07-22 Thread Michael Torrie
nipun batra wrote: > I need to develop a GUI preferably in GTK using c or PYGTK.I have little > idea about Python. > Following are requiremnts of the application: > should be GUI > Sould be real time > Should interface serial port > should display moving maps,like google earth > It is basically for

SEC doc parsing

2009-07-27 Thread Michael Boldin
I am looking for any parsing routines (written in python), for Security Exchange Commision (SEC) documents. These documents are on the SEC's EDGAR system (at ftp://ftp.sec.gov ) and I am especially interested in insider trading files known as Forms 3,4 and 5. _

Re: RSA cryptography between Python and Java

2009-07-27 Thread Michael Ströder
h the session key using a symmetric > algorithms like AES. I'd use CMS (AKA PKCS#7) for encrypted/signed data with X.509 certs. One should not invent another message format. Ciao, Michael. -- Michael Ströder E-Mail: [email protected] http://www.stroeder.com -- http://mail.python.org/mailman/listinfo/python-list

ANN: python-ldap-2.3.9

2009-07-27 Thread Michael Ströder
. processing LDIF, LDAPURLs and LDAPv3 schema). Ciao, Michael. -- Michael Ströder E-Mail: [email protected] http://www.stroeder.com Released 2.3.9 2009-07-26 Changes since 2.3.8: Lib/ * All modules (ldap, ldif, dsml and ldapurl) have

64-bit issues with dictionaries in Python 2.6

2009-07-29 Thread Michael Ströder
of web2ldap are not working. Yes, the next test would be to compile Python 2.6.2 from source... Any hint is appreciated. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Does python have the capability for driver development ?

2009-07-30 Thread Michael Torrie
MalC0de wrote: > please introduce me some resource for system programming, I know that > python is very well at system programming level. > thanks Although it is possible (as others have said) to embed Python the interpreter into a driver, no one has done that that I know of. You'd have to write

iterate lines with regex

2009-08-01 Thread Michael Savarese
I'm a python newbie and I'm trying to test several regular expressions on the same line before moving on to next line. it seems to move on to next line before trying all regular expressions which is my goal. it only returns true for first regular expression does the curser have to be rest to beginn

Re: Queryable Daemon

2009-08-03 Thread Michael Torrie
Justin DeCell wrote: > I was hoping for a little help with a project I'm working on. I'm > writing a daemon in python that I want to be queryable (i.e. I should > be able to run foo -s and it will report some internal information > about the foo daemon if it's running) but I can't figure out

os.walk()

2009-08-04 Thread Michael Savarese
Greetings Python newbie here, and thanks to all who have helped me previously. Is there a way of grabbing file attributes while traversing with os.walk()? It would be advantageous to have date modified and file size along with the file name. If anyone can point me in the right direction, I'd apprec

unicode() vs. s.decode()

2009-08-05 Thread Michael Ströder
HI! These both expressions are equivalent but which is faster or should be used for any reason? u = unicode(s,'utf-8') u = s.decode('utf-8') # looks nicer Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode() vs. s.decode()

2009-08-06 Thread Michael Ströder
Thorsten Kampe wrote: > * Michael Ströder (Wed, 05 Aug 2009 16:43:09 +0200) >> These both expressions are equivalent but which is faster or should be >> used for any reason? >> >> u = unicode(s,'utf-8') >> >> u = s.decode('utf-8') # looks

Re: unicode() vs. s.decode()

2009-08-06 Thread Michael Ströder
Thorsten Kampe wrote: > * Michael Ströder (Thu, 06 Aug 2009 18:26:09 +0200) >>>>> timeit.Timer("unicode('äöüÄÖÜß','utf-8')").timeit(1000) >> 17.23644495010376 >>>>> timeit.Timer("'äöüÄÖÜß'.decode('ut

help with threads

2009-08-06 Thread Michael Mossey
Hello, I have a simple application that needs one thread to manage networking in addition to the main "thread" that does the main job. It's not working right. I know hardly anything about threads, so I was hoping someone could point me in the right direction to research this. Basically, I have a

Re: help with threads

2009-08-06 Thread Michael Mossey
Ah yes, that explains it. Some of these long computations are done in pure C, so I'm sure the GIL is not being released. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode() vs. s.decode()

2009-08-08 Thread Michael Ströder
> 3. if you benchmark then the whole application and not single commands You don't know anything about what I'm doing and what my aim is. So your general rules don't apply. > It's really easy: Michael has working code. With that he can easily > write two versions - one

Re: unicode() vs. s.decode()

2009-08-08 Thread Michael Fötsch
Michael Ströder wrote: > >>> timeit.Timer("unicode('äöüÄÖÜß','utf-8')").timeit(1000) > 17.23644495010376 > >>> timeit.Timer("'äöüÄÖÜß'.decode('utf8')").timeit(1000) > 72.087096929550171 > > Th

Re: unicode() vs. s.decode()

2009-08-08 Thread Michael Ströder
Michael Fötsch wrote: > If speed is your primary concern, this will give you even better > performance than unicode(): > > decoder = codecs.lookup("utf-8").decode > for i in xrange(100): > decoder("äöüÄÖÜß")[0] Hmm, that could be interes

Re: help with threads

2009-08-08 Thread Michael Mossey
On Aug 7, 5:03 pm, Piet van Oostrum wrote: > >>>>> Michael Mossey (MM) wrote: > >MM> Ah yes, that explains it. Some of these long computations are done in > >MM> pure C, so I'm sure the GIL is not being released. > > Is that C code under your own c

Extending embedded python-can extensions be local to a dictionary?

2009-08-12 Thread Michael Kohout
Hello all- I've got a multithreaded server-based application that I'd like to use python to provide plugin support for. At execution time I would like each call to the plugin/plugins to have their own implementation of these extension methods. Looking at http://docs.python.org/extending/embeddi

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-15 Thread Michael Ströder
he PC hardware was a normal serial port with the usual UART hardware device but the transmission protocols were limited to half-duplex. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: flatten a list of list

2009-08-16 Thread Michael Fötsch
Terry wrote: Is there a simple way (the pythonic way) to flatten a list of list? This is probably the shortest it can get: sum(list_of_lists, []) Kind Regards, M.F. -- http://mail.python.org/mailman/listinfo/python-list

Q: multiprocessing.Queue size limitations or bug...

2009-08-26 Thread Michael Riedel
Sorry for being not more specific but I'm not absolutely certain whether I encountered a bug or did anything wrong: The (stupid) code below results in a stall forever or not at 'p0.join()' depending on the value of TROUBLE_MAKER. Any help, thoughts, comments? Thank you for your

Re: What python can NOT do?

2009-08-29 Thread Michael Torrie
qwe rty wrote: > On Aug 29, 5:11 am, Nobody wrote: >> On Fri, 28 Aug 2009 17:26:06 -0700, qwe rty wrote: >>> if you don't know the answer please don't reply >> If you don't understand the question, don't post it in the first place. > > don't be so angry ,not good for your health You forgot your

Speed-up for loops

2010-09-02 Thread Michael Kreim
ur answers. With best regards, Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Speed-up for loops

2010-09-02 Thread Michael Kreim
Peter Otten wrote: Move it into a function; this turns a and i into local variables. def f(): imax = 10 a = 0 for i in xrange(imax): a = a + 10 print a f() Wow. It is still slower than Matlab, but your suggestion speeds up the code by ca 50%. But I do not under

Re: Speed-up for loops

2010-09-03 Thread Michael Kreim
return 0; } => Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.32 addition.m imax = 1e9; a = 0; for i=0:imax-1 a = a + 10; end disp(a); exit; => Elapsed (wall clock) time (h:mm:ss or m:ss): 0:08.39 With best regards, Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: python datetime

2010-09-14 Thread Michael Ricordeau
# Determine diff days between two dates import datetime now = datetime.date(2010, 9, 28) next = datetime.date(2010, 10, 5) delta = next - now #delta is datetime.timedelta type. #(You can extract days diff) # Determine date in 7 days import datetime now = datetime.date(2010, 9, 28) delta = dateti

Re: 3>0 is True

2010-09-15 Thread Michael Ricordeau
Because "is" operator take precedence on ">" operator . Le Wed, 15 Sep 2010 05:34:06 -0700 (PDT), Yingjie Lan a écrit : > Hi, > > I am not sure how to interprete this, in the interactive mode: > > >>> 3>0 is True > False > >>> (3>0) is True > True > >>> 3> (0 is True) > True > > Why did I ge

Re: 3>0 is True

2010-09-15 Thread Michael Ricordeau
ressions.html#comparisons So for : >>> 3 > 0 is True #first evaluation is : >>> 3 > 0 ---> True #second evaluation is : >>> 0 is True ---> False (and second evaluation is not result of first one !) Le Wed, 15 Sep 2010 14:47:11 +0200, Michael Ricor

Re: Deferring a function call

2010-10-19 Thread Michael Ricordeau
For scheduling, I use eventlet package and spawn_after_local . http://eventlet.net But you must be aware of the constraints like using "monkey patched" modules . Le Mon, 18 Oct 2010 21:21:41 -0700, TomF a écrit : > I'm writing a simple simulator, and I want to schedule an action to > occ

Re: Compare source code

2010-11-03 Thread Michael Torrie
On 11/03/2010 02:39 PM, Seebs wrote: > Furthermore, I don't WANT to skip closing braces. EXPLICIT IS BETTER > THAN IMPLICIT. I *WANT* to have the beginnings and ends marked. I suggest, then that Pascal or Ruby would suit your needs better than Python. > I want end braces or "end" or something a

Re: Compare source code

2010-11-08 Thread Michael Torrie
On 11/06/2010 02:27 AM, Seebs wrote: > On 2010-11-06, Steve Holden wrote: >> If someone were to use a text editor which had always historically >> mangled whitespace I would find myself wondering why they found it >> necessary to restrict themselves to such stone-age tools. > > I have yet to find

Re: search for a data in my browser via script

2017-02-06 Thread Michael Torrie
On 02/06/2017 07:43 AM, Meeran Rizvi wrote: > Hello guys, > Here i am writing a script which will open my chrome browser and opens the > URL www.google.com. > But how to search for a data via script. > for example i need to search for 'Rose' in google.com via script. > how to do that? > > > impo

What's with all the messages from @f38.n261.z1

2017-02-07 Thread Michael Torrie
Seems like we're getting a bunch of messages on the mailing list that appear to be copies of real member posts that are saying they are from @f38.n261.z1? They don't appear to be deliberate impersonations. Some misconfigured server reflecting messages back to the list perhaps? -- https://mail.py

Re: How to store properties

2017-02-08 Thread Michael Torrie
On 02/08/2017 04:26 AM, Cecil Westerhof wrote: > In Java you (can) use a properties file store configuration. What is > the best way to do something like that in Python? > I saw ConfigParser, but have the feeling that it is not really used. > Would a JSON file be a good idea? I've used ConfigParse

Re: Problems with scp script in Python

2017-02-13 Thread Michael Torrie
On 2017-02-13 05:17 AM, [email protected] wrote: I have an SCP script that auto completes just fine from the terminal window in Pi. When I use either subprocess or os to try and have it run under Python it does not do the file transfer from Pi to my Ubuntu machine. What am I doing wrong? He

Re: Python application launcher (for Python code)

2017-02-23 Thread Michael Torrie
On 2017-02-22 09:49 PM, Deborah Swanson wrote: Didn't even look. Visual Studio has always been pricey, and it never occurred to me that they might have a free or cheap version now. You can get the full edition of Visual Studio, called Visual Studio Community Edition for free. They still offer

Re: Using re to perform grep functionality in Python

2017-03-01 Thread Michael Torrie
On 03/01/2017 02:55 PM, [email protected] wrote: > Obviously, not what I want. Can anyone feed some input? You've already got some good answers, but I just wanted to point you at this good resource: http://www.dabeaz.com/generators/ Pretty much anything you do in a shell script that involv

Re: What's the neatest way of getting dictionary entries in a specified order?

2017-03-08 Thread Michael Torrie
On 03/08/2017 12:27 PM, Chris Green wrote: > I have a fairly simple application that populates a GUI window with > fields from a database table. The fields are defined/configured by a > dictionary as follows:- Instead of ordering the data in Python, why not rely on the GUI to do the sort? Most G

Re: Where to find python GTK+ 3 reference documentation?

2017-03-10 Thread Michael Torrie
On 03/10/2017 01:26 PM, Chris Green wrote: > Wildman wrote: >> On Fri, 10 Mar 2017 18:51:35 +, Chris Green wrote: >> >>> I'm using the excellent tutorial at >>> https://python-gtk-3-tutorial.readthedocs.io >>> and occasionally want reference documentation, is there reference >>> documentation

Re: What's the neatest way of getting dictionary entries in a specified order?

2017-03-11 Thread Michael Torrie
On 03/11/2017 03:07 AM, Chris Green wrote: > The order I was asking about was the order of the *fields* of the > heading (i.e. the column names) *not* the data. It won't get updated > when new data is added. What I was after (and got) was a way that > would allow me to extract the data for one en

Re: Does one create an event to notify parent window/GUI of something?

2017-03-12 Thread Michael Torrie
On 03/12/2017 06:14 AM, Chris Green wrote: > There are (of course) event handlers for the 'Save' and 'Cancel' > button click events in abookeditgui, what I need is hooks from these > to run some code in abookgui after the abookeditgui has completed. How > should one do this, is there a way for a cl

Re: Compiling new Pythons on old Windows compilers

2017-03-12 Thread Michael Torrie
On 03/12/2017 02:45 PM, eryk sun wrote: > On Sun, Mar 12, 2017 at 5:02 PM, Eric Frederich > wrote: >> Any idea why compatibility was dropped recently? There used to be a PC >> directory with different VS directories in the source tree, now it isn't >> there any more. > > CPython 3.5+ uses the Un

Re: Compiling new Pythons on old Windows compilers

2017-03-12 Thread Michael Torrie
On 03/12/2017 09:26 PM, Michael Torrie wrote: > On 03/12/2017 02:45 PM, eryk sun wrote: >> On Sun, Mar 12, 2017 at 5:02 PM, Eric Frederich >> wrote: >>> Any idea why compatibility was dropped recently? There used to be a PC >>> directory with different VS direc

Re: Does one create an event to notify parent window/GUI of something?

2017-03-13 Thread Michael Torrie
On 03/13/2017 02:37 AM, Chris Green wrote: > Michael Torrie wrote: >> On 03/12/2017 06:14 AM, Chris Green wrote: >>> There are (of course) event handlers for the 'Save' and 'Cancel' >>> button click events in abookeditgui, what I need is hooks from t

Re: When will os.remove fail?

2017-03-14 Thread Michael Felt
On 13/03/2017 02:51, Steve D'Aprano wrote: On Mon, 13 Mar 2017 05:45 am, Alain Ketterlin wrote: Steve D'Aprano writes: [...] It seems that os.remove on Linux will force the delete even if the file is read-only or unreadable, provided you own the file. Your permissions on the file do not rea

Re: python and databases

2017-03-14 Thread Michael Torrie
On 03/14/2017 01:59 PM, Xristos Xristoou wrote: > I have a database in microsoft ACCESS with about 150 records.. if I > want to get some data from this database using a query in python and > i want to store in some variables in python that will do this ? to > avoid the 150 if ...: Using the stand

Re: python and databases

2017-03-15 Thread Michael Torrie
On 03/15/2017 08:45 AM, Xristos Xristoou wrote: > first thx for response second i cant use additional packate because i > build tool for other python program and that use standar python > only, I don't see how you can retrieve data from MS Access without a tool that is not part of the standard Pyt

Re: Who are the "spacists"?

2017-03-18 Thread Michael Torrie
On 03/18/2017 09:18 AM, Mikhail V wrote: > Slight note of aggression in you words makes me think you > are a ... spacist? Please stop trolling. You obviously have an opinion and you are pursuing it aggressively, apparently attempting to bait people into an argument. Please stop. Your argument is

Re: relative paths connect using python

2017-03-20 Thread Michael Torrie
On 03/20/2017 11:49 AM, Xristos Xristoou wrote: > and the path i need full absolute path like this : > var1='C:/my/store/path/myimage_1010_im.png' > > in my first code i dont have error but i take wrong for me path not full Since you have not provided any sample output from your program, there'

Re: Who are the "spacists"?

2017-03-21 Thread Michael Torrie
On 03/21/2017 08:15 AM, Mikhail V wrote: > Didn't want to say this, but you know it was quite predictable from > the beginning that > the arguments will end up somewhere in "linux console is the center of the > universe, e-macs is mother of all apps and monospaced text is peak of > human evolution"

Re: Recompilation of Python3.6.x

2017-03-23 Thread Michael Torrie
On 03/23/2017 01:45 AM, Klaus Jantzen wrote: > The information must be somewhere because Python must have been compiled > frequently and correctly for the various (important) OSs before making > it available to the public. And I do not think that it is left up to > "your luck" that the required

Re: PEOPLE! PLEASE! [ WAS: Re: Who are the "spacists"? ]

2017-03-25 Thread Michael Torrie
On 03/25/2017 01:40 PM, Gilmeh Serda wrote: > >>> So Python supports both spaces and tabs for indentation. > > People! > > This is as far from normal conversation about Python as it gets! > > Keep this shit to yourselves, PLEASE! > > Using an editor worth the name, makes it a non issue (since

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Michael Torrie
On 03/27/2017 05:40 AM, filtered wrote: > I am running CentOS 7.1 with LibreOffice 5.0.6.2. > > I have installed the official pyuno package from CentOS. > > I installed Python 3.6.1 from the sources and now I am trying to import > pyuno which fails with > > [email protected]:~/src/docx> bin/py

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Michael Torrie
On 03/27/2017 09:13 PM, Jim wrote: > I don't know if this is of any help but I am running Mint 18 with Python > 3.5 and I have a package installed called python3-uno which is described > as "Python-UNO bridge". Maybe CentOS has a similarly name package. You're right. In fact it looks like LibreO

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Michael Torrie
On 03/27/2017 10:09 PM, filtered wrote: > Sorry but all your answers are pointless. Possibly. > I clearly asked about compiling PyUno MYSELF with a self-compiled > Python 3.6.1 installation. Is this so hard to understand? Why do you give > unrelated comments to a clear questions? Sometimes clea

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Michael Torrie
On 03/27/2017 10:09 PM, filtered wrote: > Sorry but all your answers are pointless. Possibly. > I clearly asked about compiling PyUno MYSELF with a self-compiled > Python 3.6.1 installation. Is this so hard to understand? Why do you give > unrelated comments to a clear questions? Sometimes clea

Re: K&L graph partitioning code offer

2017-03-29 Thread Michael Torrie
On 03/29/2017 11:17 AM, [email protected] wrote: > On Wednesday, March 29, 2017 at 1:23:48 AM UTC-7, [email protected] wrote: >> Hi >> I am planning to tweak the Kernighan Lin algorithm a bit use coercing of >> certain vertices .I was wondering if u would be kind enough to share the >> python

<    40   41   42   43   44   45   46   47   48   49   >