Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Michael Torrie
On 03/17/2012 09:12 AM, Kiuhnm wrote: > On 3/17/2012 16:01, Michael Torrie wrote: >> On 03/17/2012 08:45 AM, Kiuhnm wrote: >>> Your way is easy, but the result is poor. >> >> In what way? > > The resulting code is inefficient, difficult to comprehend and to man

Re: Python is readable

2012-03-17 Thread Michael Torrie
On 03/17/2012 03:28 PM, Kiuhnm wrote: >> They are equally readable. The first one sets EAX to 3; the second >> displays all elements of x on the console. Assembly is readable on a >> very low level, but it's by nature verbose at a high level, and thus >> less readable (you can't eyeball a function

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Michael Torrie
On 03/17/2012 11:55 AM, Kiuhnm wrote: > Why should I write a treatise on decompilation techniques on this ng? You were the one that said simply, you're doing it wrong followed by a terse statement, do it like a decompiler. I am familiar with how one might implement a decompiler, as well as a comp

Enforcing hash randomization (was: [RELEASED] Second release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3)

2012-03-20 Thread Michael Ströder
e to avoid having to rely on sys-admins doing the right thing when installing my web2ldap. I guess os.environ['PYTHONHASHSEED'] = 'random' before forking a process would be a solution. But is there another way? Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: random number

2012-03-25 Thread Michael Poeltl
* Nikhil Verma [2012-03-26 08:09]: > Hi All > > How can we generate a 6 digit random number from a given number ? what about this? >>> given_number=123456 >>> def rand_given_number(x): ... s = list(str(x)) ... random.shuffle(s) ... return int(''.join(s)) ... >>> print (rand_given_nu

Re: random number

2012-03-26 Thread Michael Poeltl
s = list(string.ascii_lowercase + ... string.ascii_uppercase + ... string.digits) ... coll_rand = [] ... for i in range(6): ... random.shuffle(characters) ... coll_rand.append(characters[0]) ... return ''.join(coll_r

python segfault

2012-03-27 Thread Michael Poeltl
ntation fault ?> funny, isn't it? I was able to reproduce this segfault on various machines (32bit 64bit), ubuntu, slackware, debian python.X segfaults on all of them thx Michael -- Michael Poeltl Computational Materials Physics voice: +43-1-4277-51409 Univ. Wien, Sensengasse 8/

Re: python segfault

2012-03-27 Thread Michael Poeltl
hi, * Dave Angel [2012-03-28 04:38]: > On 03/27/2012 06:27 PM, Michael Poeltl wrote: > >hi, > > > >can anybody tell why this 'little stupid *thing* of code' let's > >python-3.2.2, 2.6.X or python 2.7.2 segfault? > > > >>

Re: "convert" string to bytes without changing data (encoding)

2012-03-30 Thread Michael Ströder
I to include bytes 128-255. Unfortunately they all extend ASCII in a > different way (hence they are different encodings). Yupp. Looking at RFC 1345 some years ago (while having to deal with EBCDIC) made this all pretty clear to me. I appreciate that someone did this heavy work of collecting historical encodings. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] getaddrinfo NXDOMAIN exploit - please test on CentOS 6 64-bit

2012-04-01 Thread Michael Torrie
On 03/31/2012 04:58 PM, John Nagle wrote: > If you can make this happen, report back the CentOS version and > the library version, please. CentOS release 6.2 (Final) glibc-2.12-1.47.el6_2.9.x86_64 example does not ping example.com does not resolve to example.com.com Removed all "search" and "dom

Re: why can't I pickle a class containing this dispatch dictionary?

2012-04-02 Thread Michael Hrivnak
n.com/1zqE52mD Michael On Mon, Apr 2, 2012 at 7:17 AM, jkn wrote: > Hi All >    I'm clearly not understanding the 'can't pickle instancemethod > objects' error; can someone help me to understand, & maybe suggest a > workaround, (apart from the obvious if ... elif...).

Re: Problem connecting to SMTP/IMAP server using SSL

2012-04-02 Thread Michael Hrivnak
That method uses the default port 993. Can you connect to that port at all from your computer? For example, try using a telnet client. Michael On Sat, Mar 31, 2012 at 1:39 AM, Julien wrote: > Hi, > > I'm able to connect to an Exchange server via SMTP and IMAP from my > iPh

Re: Problem connecting to SMTP/IMAP server using SSL

2012-04-02 Thread Michael Hrivnak
Your phone may be using TLS on the normal IMAP port (143). Or, are you sure your phone is using IMAP and not active sync? Michael On Mon, Apr 2, 2012 at 6:25 PM, Julien wrote: > Hi Michael, > > Thanks for your reply. I did try port 993. I know that port generally > works for

Re: Re: Python Gotcha's?

2012-04-05 Thread Michael Hrivnak
that happens to be in a tuple if the item itself is mutable, but you cannot add, remove, or replace items in a tuple. Michael On Thu, Apr 5, 2012 at 10:15 AM, John Posner wrote: > On 4/4/2012 7:32 PM, Chris Angelico wrote: >> Don't know if it's what's meant on that page by t

Re: Python Gotcha's?

2012-04-05 Thread Michael Hrivnak
I'm surprised nobody beat me to posting this: >>> def foo(stuff=[]): ... stuff.append('bar') ... print stuff ... >>> foo() ['bar'] >>> foo() ['bar', 'bar'] >>> foo() ['bar', 'bar', 'bar'] On Wed, Apr 4, 2012 at 6:34 PM, Miki Tebeka wrote: > Greetings, > > I'm going to give a "Python Gotcha's"

Re: Best way to disconnect from ldap?

2012-04-05 Thread Michael Ströder
the modern with-statement to make sure LDAPObject.unbind_s() is really called. Being old-fashioned I used try-finally-blocks until now. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Naming future objects and their methods

2012-04-15 Thread Michael Torrie
On 04/14/2012 04:22 PM, Stefan Schwarzer wrote: > However, I'm not comfortable with the combination of the > names of the future and its method. After all, not the > `put_result` was sent, but the data that was the argument in > the `put_bytes` call. Maybe `data_was_sent` is better than > `was_sent

Re: Newbie, homework help, please.

2012-04-21 Thread Michael Torrie
On 04/21/2012 02:14 PM, someone wrote: > Thanks for your reply Mr. Roy Smith. Also, thanks for the tip. Maybe > I did not make myself as clear or maybe you did not understand my > post. It states homework help, and I am doing this post to get help > before I pay somebody to show me how to do it,

Re: Some posts do not show up in Google Groups

2012-05-02 Thread Michael Torrie
On 05/01/2012 12:12 AM, Frank Millman wrote: > I have had a look at this before, but there is one thing that Google > Groups does that no other reader seems to do, and that is that > messages are sorted according to thread-activity, not original posting > date. This makes it easy to see what has ch

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Michael Torrie
On 05/02/2012 09:31 AM, Tomasz Rola wrote: > On Wed, 2 May 2012, jaialai.technol...@gmail.com wrote: >> OP lives out of his car and his main source of income seems to be ad >> revenue from his website. I'm always curious about this sort of thing. Do you know this for a fact, jaialai.technology?

Re: syntax for code blocks

2012-05-02 Thread Michael Torrie
On 05/02/2012 04:52 AM, Kiuhnm wrote: > The problem is always the same. Those functions are defined at the > module level so name clashing and many other problems are possible. Only functions defined at the module level are in fact in the module's namespace. For example, this works fine, and the

Re: syntax for code blocks

2012-05-02 Thread Michael Torrie
On 05/02/2012 10:26 PM, Michael Torrie wrote: > If you are experiencing name clashes you need to start dividing your > code up logically instead of keeping everything in the global namespace > of your module. I shouldn't have used the word "global" here as it's n

Re: syntax for code blocks

2012-05-04 Thread Michael Torrie
On 05/04/2012 05:12 AM, Kiuhnm wrote: >> Hand-wavy, no real example, doesn't make sense. > > Really? Then I don't know what would make sense to you. Speaking as as an observer here, I've read your blog post, and looked at your examples. They don't make sense to me either. They aren't real examp

Re: parallel programming in Python

2012-05-10 Thread Michael Torrie
On 05/10/2012 06:46 AM, Devin Jeanpierre wrote: > On Thu, May 10, 2012 at 8:14 AM, Jabba Laci wrote: >> What's the best way? > >>From what I've heard, http://scrapy.org/ . It is a single-thread > single-process web crawler that nonetheless can download things > concurrently. Yes, for i/o bound t

Re: How to call and execute C code in Python?

2012-05-14 Thread Michael Torrie
On 05/13/2012 11:27 AM, Mark Lawrence wrote: > Stefan, you appear to have a lot to do with Cython. It would be polite > to mention this when replying. > Why? Do you think this is some sort of weird conflict of interest? As anyone who follows this list for several years would know, Cython is a

Re: bash/shell to python

2012-05-19 Thread Michael Torrie
On 05/16/2012 08:16 PM, Rita wrote: > I currently build a lot of interfaces/wrappers to other applications > using bash/shell. One short coming for it is it lacks a good method > to handle arguments so I switched to python a while ago to use > 'argparse' module. Actually there is a great way of pa

Re: Python Book for a C Programmer?

2012-05-23 Thread Michael Poeltl
hi, take 'Pro Python' (by Marty Alchin) regards Michael * hsa...@gmail.com [2012-05-24 07:54]: > I am trying to join an online class that uses python. I need to brush up on > the language quickly. Is there a good book or resource that covers it well > but does not have to

Re: Maintaining Multiple Copies of Python (Linux)

2012-05-30 Thread Michael Hrivnak
http://www.virtualenv.org/ You can install multiple versions of the python interpreter in ubuntu without issue. You can use virtualenv to maintain different site packages for whatever purposes you need. Michael On Wed, May 30, 2012 at 4:38 PM, wrote: > Hi all, > > For various r

Re: why i can't read sda1 with python?

2012-06-04 Thread Michael Hrivnak
Which makes total sense. If any user could directly read the entire contents of the disk, filesystem permissions would be useless. Michael On Mon, Jun 4, 2012 at 4:14 AM, Xia wrote: > so only root or accounts in group disk can access /dev/sda1, -- http://mail.python.org/mailman/listi

Re: Finding all loggers?

2012-06-14 Thread Michael Hrivnak
>>> import logging >>> logging.Logger.manager.loggerDict {} >>> logging.getLogger('foo') >>> logging.getLogger('bar') >>> logging.Logger.manager.loggerDict {'foo': , 'bar': } Enjoy, Michael On Thu, Jun 14, 2

Re: python's future?

2012-06-15 Thread Michael Torrie
On 06/15/2012 01:04 AM, Yesterday Paid wrote: > I'm very new to programing though I learn very little of java,C > I love python and have fun to do something with it > but some people said python's future perhaps not that bright. > I know this question maybe looks like an idiot:( > I really hope the

Re: Python script for device automatic update.

2012-06-15 Thread Michael Hrivnak
Let udev run your script when the appropriate device is connected. http://www.reactivated.net/writing_udev_rules.html Then you just need to run an ssh command against the correct mount point. Honestly, python might be overkill for this. Consider writing a very small bash script. Michael On

Re: Comparison operators in Python

2011-06-02 Thread Michael Sparks
which is eminently doable) > (do Brits say tongue-in-cheek?) Yes. Michael. -- http://mail.python.org/mailman/listinfo/python-list

ANN: python-ldap 2.4.0

2011-06-03 Thread Michael Ströder
stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). Project's web site: http://www.python-ldap.org/ Ciao, Michael. Released 2.4.0 2011-06-02 Changes since 2.3.13: * OpenLDAP 2.4.11+ required to build * Suppor

Re: Strategy to Verify Python Program is POST'ing to a web server.

2011-06-18 Thread Michael Hrivnak
Authentication by client SSL certificate is best. You should also look into restricting access on the server side by IP address. Michael On Sat, Jun 18, 2011 at 7:34 AM, mzagu...@gmail.com wrote: > Hello Folks, > > I am wondering what your strategies are for ensuring that data > tr

Re: How do you copy files from one location to another?

2011-06-18 Thread Michael Hrivnak
Python is great for automating sysadmin tasks, but perhaps you should just use rsync for this. It comes with the benefit of only copying the changes instead of every file every time. "rsync -a C:\source E:\destination" and you're done. Michael On Fri, Jun 17, 2011 at 1:06 A

Re: Question regarding DNS resolution in urllib2

2011-06-18 Thread Michael Hrivnak
version 7.21.3. Michael On Tue, Jun 14, 2011 at 2:34 PM, saurabh verma wrote: > hi , > > I trying to use urllib2 in my script , but the problem is lets say a domains > resolves to multiple IPs , If the URL is served by plain http , I can add > “Host: domain” header and check whet

Re: Strategy to Verify Python Program is POST'ing to a web server.

2011-06-18 Thread Michael Hrivnak
in the SSL/TLS handshake. If you cannot uniquely authenticate each client (either through a signed cert or by having the user supply credentials interactively), then you'll have to accept that you cannot trust the submitted data 100%, and just take measures to mitigate abuse. Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Emails backup in python 3.2

2011-06-21 Thread Michael Hrivnak
all. http://fetchmail.berlios.de/ Michael On Tue, Jun 21, 2011 at 9:03 AM, TheSaint wrote: > Hello, > I'm looking for an idea how to backup emails retrieved by poplib and save > them into mailbox.mbox file. > The problem is the received message which is a list of bytes streams, > ma

Re: User Authentication

2011-06-24 Thread Michael Ströder
om/search?q=django+ldap+authentication Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: LDAP: How get all users belongs to a group.

2011-06-24 Thread Michael Ströder
the user entries. Most times it's called 'memberOf' or 'isMemberOf'. But this depends on the server's implemented features and configuration. Which LDAP server are you using? Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: LDAP: How get all users belongs to a group.

2011-06-24 Thread Michael Ströder
x27;groupMembership'. > * But i want to get members belogs to a particular group Eg:'My- > Group-1' If this is the server's data the LDAP server seems to be Novell eDirectory not OpenLDAP. I'd try member search with this filter: (groupMembership=cn=My-Group-1,ou=Groups,o=CUST) Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: LDAP: How get all users belongs to a group.

2011-06-25 Thread Michael Ströder
erNisNetgroup','uid'), # Samba 3.0 'sambaGroupMapping': ('sambaSIDList','sambaSID'), # Active Directory 'group': ('member',None), # draft-findlay-ldap-groupofentries 'groupOfEntries': ('member',None), # Apple MAC OS X 'apple-group':('apple-group-memberguid','apple-generateduid'), }, - snip - Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Online payment

2011-06-25 Thread Michael Hrivnak
I have experience with this in the US, but if you operate outside the US, you may be subject to different levels of regulation. Michael On Fri, Jun 24, 2011 at 9:10 PM, wrote: > Hello i want to create a shopping cart for my web-site, to receive payments > from credit cards, how can i do

Re: Question regarding DNS resolution in urllib2

2011-06-25 Thread Michael Hrivnak
That would be a help to you, and a way to give back to the open source community. Best of luck, Michael On Fri, Jun 24, 2011 at 6:17 AM, saurabh verma wrote: > Michael Hrivnak wrote: >> >> The latest libcurl includes the CURLOPTS_RESOLVE option >> (http://curl.haxx.se/libcur

ANN: python-ldap 2.4.1

2011-07-05 Thread Michael Ströder
stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). Project's web site: http://www.python-ldap.org/ Ciao, Michael. Released 2.4.1 2011-07-05 Changes since 2.4.0: Modules: * New LDAP option OPT_X_TLS_PACKAGE availab

Re: parsing packets

2011-07-10 Thread Michael Hrivnak
a.org/wiki/Transmission_Control_Protocol#TCP_segment_structure Of course in both cases they are specifying the header length, not including a data payload. However, it sounds like you might not have a payload, so your entire packet might consist of header-like data. Michael On Sun, Jul 10, 2011 at 4:59 PM, Littlefield, Ty

Re: Virtual functions are virtually invisible!

2011-07-10 Thread Michael Hrivnak
thonista" who isn't willing to adhere to the style guide and document their code wouldn't work on my team for very long, if at all. There is just no excuse for that. Michael On Sun, Jul 10, 2011 at 1:15 PM, rantingrick wrote: > On Jul 4, 3:43 am, Gregory Ewing wrote: >>

Re: Virtual functions are virtually invisible!

2011-07-10 Thread Michael Hrivnak
the language to accommodate your refusal to follow the most basic best practices. Best of luck, Michael On Sun, Jul 10, 2011 at 10:35 PM, rantingrick wrote: > On Jul 10, 7:31 pm, Michael Hrivnak wrote: >> It sounds to me like you need a better IDE, better documentation, >> and/or

Re: Proposal to extend PEP 257 (New Documentation String Spec)

2011-07-14 Thread Michael Hrivnak
Was tried at least once before: http://www.python.org/dev/peps/pep-0287/ Check in here with your ideas: http://www.python.org/community/sigs/current/doc-sig/ Have any other languages mandated the use of a specific documentation markup? Michael On Thu, Jul 14, 2011 at 7:02 PM, rantingrick

Re: Proposal to extend PEP 257 (New Documentation String Spec)

2011-07-16 Thread Michael Hrivnak
share little snippets where an instant-message type medium is tempting, perhaps try pastebin.com. Michael On Fri, Jul 15, 2011 at 7:16 PM, Chris Angelico wrote: > tries his best to avoid Python if the code is going to be shared over any > "dodgy medium" where indentation might be d

Re: Looking for general advice on complex program

2011-07-16 Thread Michael Hrivnak
his approach is also likely to involve MUCH less network traffic and consume far less resources on the clients. Michael On Sat, Jul 16, 2011 at 2:14 PM, Chris Angelico wrote: > On Sun, Jul 17, 2011 at 3:41 AM, Josh English > wrote: >> Chris, >> >> Thank you for spell

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

2011-07-18 Thread Michael Hrivnak
What is the output of: >>> os.path.exists("C:\Users\조창준\Desktop\logs\2011-07-03") ? One possible issue here is that for some reason os.path.isdir() can't even access the directory either because of permissions, misinterpretation of the path, or some other reason. M

Re: (Maybe off topic) Can someone explain what a finite state machine is?

2011-07-19 Thread Michael Brown
On 2011-07-19, Matty Sarro wrote: > Hey everyone. I am currently reading through an RFC, and it mentions > that a client and server half of a transaction are embodied by finite > state machines. I am reading through the wikipedia article for finite > state machines, and sadly it's going a bit abov

Re: What Programing Language are the Largest Website Written In?

2011-07-20 Thread Michael Steinfeld
2011/7/20 igotmumps : > On Jul 13, 1:04 pm, ccc31807 wrote: >> On Jul 12, 7:54 am, Xah Lee wrote: >> >> > maybe this will be of interest. >> >> > 〈What Programing Language Are the Largest Website Written >> > In?〉http://xahlee.org/comp/website_lang_popularity.html >> >> About five years ago, I d

ANN: python-ldap 2.4.3

2011-07-23 Thread Michael Ströder
stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). Project's web site: http://www.python-ldap.org/ Ciao, Michael. Released 2.4.3 2011-07-23 Changes since 2.4.2: Lib/ * Mostly corrected/updated __doc__ strings

Re: PEP 8 and extraneous whitespace

2011-07-24 Thread Michael Brown
On 2011-07-22, John Gordon wrote: > In <98u00kfnf...@mid.individual.net> Neil Cerutti writes: > >> You can fit much more code per unit of horizontal space with a >> proportionally spaced font. As a result, that issue, while valid, >> is significantly reduced. > > Is it? I assume one major reason

Re: I am fed up with Python GUI toolkits...

2011-07-24 Thread Michael Torrie
On 07/20/2011 07:17 PM, rantingrick wrote: > Please everyone, do not change the subject of someone's thread > because it's considered rude. Thank you. Too funny. Says who? Changing the subject line to reflect the direction this part of the thread (a branch if you will) is going is definitely ap

Re: list comprehension to do os.path.split_all ?

2011-07-29 Thread Michael Poeltl
>>> ' '.join('/home//h1122/bin///ghi/'.split('/')).split() ['home', 'h1122', 'bin', 'ghi'] >>> ;-) regards

Re: PyWart: os.path needs immediate attention!

2011-07-29 Thread Michael Poeltl
gt; * sys > * warnings > > > Note: i did not check the Unix version of os.path for this. > > ~ > 4. Duplicated functionality. > ~ > > >>> os.path.lexists.__doc__ > 'Test whether a path exists. Returns F

Re: list comprehension to do os.path.split_all ?

2011-07-30 Thread Michael Torrie
On Jul 29, 2011 6:33 PM, "Michael Poeltl" wrote: > > what about this? > >>> ' '.join('/home//h1122/bin///ghi/'.split('/')).split() > ['home', 'h1122', 'bin', 'ghi'] > >>> Doesn't work on filenames with spaces in them. -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension to do os.path.split_all ?

2011-07-30 Thread Michael Poeltl
* Michael Torrie [2011-07-31 03:44]: > On Jul 29, 2011 6:33 PM, "Michael Poeltl" > wrote: > > > > what about this? > > >>> ' '.join('/home//h1122/bin///ghi/'.split('/')).split() > > ['home', 'h1122&#x

Re: how to solve it?

2011-08-01 Thread Michael Poeltl
//matplotlib.sourceforge.net/index.html choose the graph (click it) you need, and there you can browse the source-code (python-code) this is maybe the best starting-point, I guess. cheers Michael -- Michael Poeltl Computational Materials Physics voice: +43-1-4277-51409 Univ. Wien, Sensengas

Re: how to solve it?

2011-08-01 Thread Michael Poeltl
* 守株待兔 <1248283...@qq.com> [2011-08-01 06:22]: > from matplotlib.matlab import * > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named matlab is this what you were looking for? >>> from matplotlib.pylab import

Re: allow line break at operators

2011-08-10 Thread Michael Trausch
Perhaps it could be made an optional thing to enable; for example, some languages by default do dynamic typing, but with an option contained as the first statement of the file can enforce static typing. On Aug 10, 2011 10:57 PM, "Yingjie Lan" wrote: > :And if we require {} then truly free indentat

Re: allow line break at operators

2011-08-10 Thread Michael Trausch
more. >>> >>> Of course, but not the case with ';'. Currently ';' is optional in Python, >>> But '{' is used for dicts. Clearly, ';' and '{' are different in >>> magnitude. >>> >>> So the decisio

Re: Commands for changing ownership of a file

2011-08-14 Thread Michael Poeltl
(where you ned the uid and gid), you could also use subprocess.call() or subprocess.Popen() regards Michael * Jason Hsu [2011-08-15 01:15]: > I have a script that I execute as root, but I need to change the > ownership of the files created in the script to that of my usernam

Re: Word Perfect integration

2011-08-22 Thread Michael Torrie
On 08/18/2011 01:24 PM, Ethan Furman wrote: > Alec Taylor wrote: >> wow, people still use WordPerfect? > > Them's fightin' words right there! :) > > Yes, we still use Word Perfect, and will as long as it is available. > The ability to see the codes in use (bold, margins, columns, etc) has so >

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Michael Hunter
e do announce the feed at regular intervals. Michael > > -- > Terry Jan Reedy > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Michael Hunter
ow either of you was thinking but I do think the podcast author should use RSS. Michael > > ~Ethan~ > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning python reading software source code

2011-08-25 Thread Michael Hunter
main specifics). Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm happy with Python 2.5

2011-03-06 Thread Michael Torrie
On 02/27/2011 06:57 AM, n00m wrote: > Steve, see a list of accepted langs there, in bottom dropdown: > http://www.spoj.pl/submit/ There *was* Python 2.6. > Then admins shifted back to 2.5. People vote by their legs. rr, is that you? -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamic assigments

2011-03-25 Thread Michael Torrie
On 03/25/2011 06:29 AM, Seldon wrote: > Because I'm in this situation. My current code is of the form: > > var1 = func(arg=value1, *args) > .. > varn = func(arg=valuen, *args) > > where var1,..varn are variable names I know in advance and > value1,..valuen are objects known in advance, too; fun

Re: Embedding Python: estimate size of dict/list

2011-03-28 Thread Michael Hunter
s approximate memory usage. Is there one? [...] Check out David Malcom's video on memory usage from PyCon 2011 at http://blip.tv/file/4878749 There isn't a direct answer to your question but you might check out the tools he has built as a step in that direction. Michael --

Forcing absolute package imports in 2.7?

2011-03-30 Thread Michael Parker
Hi all, I'm reading Learning Python 4th Edition by Lutz. In the section on relative package imports, he says: "In Python 3.0, the `import modname` statement is always absolute, skipping the containing package’s directory. In 2.6, this statement form still performs relative imports today (i.e., the

New mailing list for python-ldap

2011-04-01 Thread Michael Ströder
ed to python-ldap can be posted there. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Running Websites with Python

2011-04-01 Thread Michael Torrie
On 04/01/2011 04:34 PM, Westley Martínez wrote: > I discovered this yesterday, and finished watching today. Just an > interesting video. > > Thank heavens for flashblock. -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions about GIL and web services from a n00b

2011-04-16 Thread Michael Torrie
On 04/16/2011 02:53 PM, Jean-Paul Calderone wrote: > On Apr 16, 10:44 am, a...@pythoncraft.com (Aahz) wrote: >> In article >> , >> Raymond Hettinger wrote: >> >> >> >>> Threading is really only an answer if you need to share data between >>> threads, if you only have limited scaling needs, and a

Re: optparse eats $

2011-04-19 Thread Michael Kent
Try this on your *nix command line: echo ">$100" On a *nix command line, the '$1' part of ">$100" will be seen as 'give me the value of the shell variable "1"', and since it has no value, will result in an empty string. So it's not optparse, or Python, because the literal string you intend to

Re: Active Directory user creation with python-ldap

2011-04-29 Thread Michael Ströder
ntControl which lets you set values bit-wise when modifying an user entry. And setting password automagically switches to setting unicodePwd when working with MS AD. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: skipping one unittest assertion?

2011-05-01 Thread Michael Kent
I agree that each test should test only one 'thing', but it's also true that testing one 'thing' sometimes/often involves multiple assertions. But in the OP's case, it does sound like the assertion he wants to skip should be broken out into its own test. -- http://mail.python.org/mailman/listi

Re: What other languages use the same data model as Python?

2011-05-04 Thread Michael Torrie
On 05/04/2011 08:44 AM, sturlamolden wrote: > On May 3, 6:33 pm, Mel wrote: > >> def identify_call (a_list): >> a_list[0] = "If you can see this, you don't have call-by-value" >> a_list = ["If you can see this, you have call-by-reference"] > > > The first one is a mistake. If it were pass-b

Re: checking if a list is empty

2011-05-08 Thread Michael Torrie
On 05/08/2011 05:36 PM, Dan Stromberg wrote: > Just what is an inductive algorithm? >From what I can remember, it's just an implementation of a proof essentially. Any algorithm that can be inductively proven can be implemented with recursion and specific base cases. In other words you program ju

Re: portable multiprocessing code

2011-05-17 Thread Michael Kent
You could also install Python 2.7 on that RedHat machine. It can be done without interfering with the 2.5 that RedHat depends on. -- http://mail.python.org/mailman/listinfo/python-list

Re: Obtaining a full path name from file

2011-05-24 Thread Michael Kent
If a filename does not contain a path component, os.path.abspath will prepend the current directory path onto it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions.

2017-09-08 Thread Michael Torrie
On 09/08/2017 08:35 PM, V Vishwanathan wrote: > Hi, From what I see in the recent 4/5 digests, this forum seems to be for > advanced > > and professional programmers. > > So wondering if a newbie can post some questions to understand errors in his > code > > or will it look silly? Yes you may

Re: Using Python 2

2017-09-10 Thread Michael Torrie
On 09/10/2017 09:20 AM, Marko Rauhamaa wrote: > Been there. I'm afraid this is not a joke: > > https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition> Wow that's pretty amazing! Thanks for sharing that link. > Python, COBOL for the next generation. I guess we'll have to see. CO

Re: Design: method in class or general function?

2017-09-10 Thread Michael Torrie
On 09/10/2017 06:16 PM, Leam Hall wrote: > The Career seems to be a "Decorator" pattern given my limited > understanding of design patterns. Concur? If so I'll go study that some > more. A career seems to be something one "has." So a classic "has a" characteristic, which means it should be an a

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-11 Thread Michael Torrie
On 09/11/2017 02:35 AM, Chris Angelico wrote: > Do a quick poll here on the list. Who sees async functions as an > alternative to Twisted? Who here has even *used* Twisted? (How many > even know what it is?) /me raises hand, slowly, cautiously looking around. I don't think of twisted so much as a

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-11 Thread Michael Torrie
On 09/11/2017 08:36 AM, Dennis Lee Bieber wrote: > On Mon, 11 Sep 2017 18:35:02 +1000, Chris Angelico > declaimed the following: > >> >> Do a quick poll here on the list. Who sees async functions as an >> alternative to Twisted? Who here has even *used* Twisted? (How many >> even know what it is?

Re: Using Python 2

2017-09-11 Thread Michael Torrie
On 09/10/2017 09:38 PM, Dennis Lee Bieber wrote: > It ain't dead yet... Fujitsu still has a COBOL compiler/IDE for Windows > and/or .NET (and maybe even other systems)... (I should see if Win10 can > install the Fujitsu COBOL 4 that came with my Y2K era text books... WinXP > could not install

Re: Fw: Problems Installing Python36

2017-09-13 Thread Michael Torrie
On 09/12/2017 03:05 AM, Thomas Jollans wrote: > Other people on this list: > This isn't the first time I've someone with this issue here. It's > probably putting off plenty of potential new users who don't make as > much effort to find a solution. I can't say I understand the ins and > outs of inst

Re: People choosing Python 3

2017-09-13 Thread Michael Torrie
On 09/10/2017 03:25 AM, Leam Hall wrote: > From a non-rpm perspective Python 3.6.2 compiles nicely on CentOS 6. > Once compiled it seems easy to use pip3 to install stuff without > trampling on the OS's Python 2 install. In the last place I worked, our servers usually did not have compilers inst

Re: People choosing Python 3

2017-09-13 Thread Michael Torrie
On 09/11/2017 01:47 AM, Stephan Houben wrote: > Op 2017-09-10, Marko Rauhamaa schreef : >> Stephan Houben : >>> >>> Why not bundle the Python interpreter with your application? >>> It seems to work for Windows developers... >> >> I've seen that done for Python and other technologies. It is an >> ex

Re: People choosing Python 3

2017-09-13 Thread Michael Torrie
On 09/11/2017 06:00 AM, Pavol Lisy wrote: >> Debian follows PEP 394, which recommends that "python" point to python2, >> and I don't see that changing any time soon (certainly not before RHEL >> includes python3 by default. > > Which part of third party ecosystem surrounding Python 3 is not (and >

Re: Change project licence?

2017-09-14 Thread Michael Torrie
On 09/14/2017 11:22 AM, Kryptxy via Python-list wrote: > Hi, > I have an opensource (python) project under GPL3 licence. I wish > switch to MIT licence so as to make it more permissive. I know how to > change the licence, but I want to know is it fine and wise to change > the licence at this point?

Re: Which database system?

2017-09-15 Thread Michael Torrie
On 09/15/2017 12:04 PM, Stefan Ram wrote: > When one is building an in-memory database that has a single > table that is built at the start of the program and then one > writes some complex queries to the table, what can be expected ^^ How do you pla

Re: Which database system?

2017-09-15 Thread Michael Torrie
On 09/15/2017 03:10 PM, Dennis Lee Bieber wrote: > "single table" so no join logic needed. And I suspect the relational > algebra "project" would be considered the same as SQL "select" by most > folks As Stefan has said, it's sometimes useful to join a table with itself, though I have neve

Re: Change project licence?

2017-09-23 Thread Michael Torrie
On 09/23/2017 03:07 AM, Kryptxy via Python-list wrote: > Thank you all! I opened a ticket about the same (on github). > I got response from most of them, and all are agreeing to the change. > However, one contributor did not respond at all. I tried e-mailing, but no > response. > Can I still proce

Re: PyQt: viewport vs window - how do you translate co-ordinates?

2017-09-23 Thread Michael Torrie
On 09/23/2017 05:38 AM, Veek M wrote: > I didn't understand any of that - could someone expand on that para? > Is there a reading resource that explains the Viewport and translations? I am > not a CS student so I did not study computer graphics. I'm sure there are lots of things that might help.

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