Re: Python.org, Website of Satan
"La bouche de la vérité - Déjà Vu Le Prophéte" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Your Uncle Wally just luuirvs > Monty Python -- especially John Clesse, Eric Idle > & Michael Palin -- very funny > > he he he ;-) Believe it or not, we have something in common! I love 'em, too! Jane > -- http://mail.python.org/mailman/listinfo/python-list
Re: Python.org, Website of Satan
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > python.org = 194.109.137.226 > > 194 + 109 + 137 + 226 = 666 > > What is this website with such a demonic name and IP address? What > evils are the programmers who use this language up to? > Some people have too much time on their hands... Jane -- http://mail.python.org/mailman/listinfo/python-list
Re: Python.org, Website of Satan
"Lucas Raab" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Jane wrote: > > <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>python.org = 194.109.137.226 > >> > >>194 + 109 + 137 + 226 = 666 > >> > >>What is this website with such a demonic name and IP address? What > >>evils are the programmers who use this language up to? > >> > > > > Some people have too much time on their hands... > > > > Jane > > > > > > Better get some ointment for that burn!! Huh??? Jane -- http://mail.python.org/mailman/listinfo/python-list
hello
The message cannot be represented in 7-bit ASCII encoding and has been sent as a binary attachment. -- http://mail.python.org/mailman/listinfo/python-list
Re: Here is what I came up with - hopefully I have understood the processcorrectly
You can use the 'Toolbutton' style in place of 'indicatoron' button = Checkbutton(r, text='Test', style='Toolbutton') button.pack() > On Sunday, March 13, 2011 11:08 PM Peter wrote: > Hi I am struggling to get a good understanding of styles as used in > ttk. I have read the tutorial section on using styles but have not been > able to solve this problem. > > I am attempting to create a Checkbutton with the indicatoron=3Dfalse > option. Using ttk the documentation is clear that you have to create a > custom style to achieve this behaviour. But the only "example" I have > been able to find on the Internet searches is written in Tcl i.e. here > is what I have found (quoted directly): > > Here=92s how you set it up: To achieve the effect of -indicatoron false, > create a new layout that doesn=92t have an indicator: > > style layout Toolbar.TCheckbutton { > Toolbutton.border -children { > Toolbutton.padding -children { > Toolbutton.label > } > } > } > > Then use style map and style default to control the border appearance: > > style default Toolbar.TCheckbutton \ > -relief flat > style map Toolbar.TCheckbutton -relief { > disabled flat > selected sunken > pressed sunken > active raised > > Hopefully somebody else in this group has "done" this and can post > their "solution"? > > Thanks > Peter >> On Sunday, March 20, 2011 8:12 PM Peter wrote: >> Here is what I came up with - hopefully I have understood the process >> correctly and therefore that the comments are correct :-) >> >> I am not sure I have the color of the indicator when it is (de)pressed >> correct, but to my eyes the color 'snow' looks like the same color >> used with a Tkinter Checkbutton with indicatoron=false. >> >> r = Tk() >> >> s = Style() >> >> s.layout('NoIndicator.TCheckbutton', >> [('Checkbutton.border', >> {'children': [('Checkbutton.padding', >> {'children': [('Checkbutton.label', >> {})]})]})]) >> >> checkbutton >> s.theme_settings('default', { >> 'NoIndicator.TCheckbutton': {'configure': {'relief': ''}}}) >> >> behaviour >> s.map('NoIndicator.TCheckbutton', >> relief=[('disabled', 'flat'), >> ('selected', 'sunken'), >> ('pressed', 'sunken'), >> ('active', 'raised'), >> ('!active', 'raised')], >> background=[('selected', 'snow')]) >> >> button = Checkbutton(r, >> text='Test', >> style='NoIndicator.TCheckbutton') >> button.pack() >> >> r.mainloop() -- http://mail.python.org/mailman/listinfo/python-list
FW: Troubleshoot python app launch
From: [1]Tan Jane Sent: Wednesday, 11 August 2021 7:48 PM To: [2]python-list@python.org Subject: Troubleshoot python app launch Hi, I encountered attached screenshot issue while launching the python application downloaded for windows. Please advice on the above. Thanks, Jane Sent from [3]Mail for Windows 10 References Visible links 1. mailto:chenghuita...@gmail.com 2. mailto:python-list@python.org 3. https://go.microsoft.com/fwlink/?LinkId=550986 -- https://mail.python.org/mailman/listinfo/python-list
time module precision
What is the precision (and accuracy) of time module on a Windows XP machine? threading module depends on time module so it's precision(and accuracy) is up to time module's. | for i in xrange(1000): |time.sleep(0.001) This sleeps for awhile, which means 0.001 sec is not ignored. On the other hand, | for i in xrange(1): |time.sleep(0.0001) This returns right away. 0.0001 sec is ignored and lost in the air. So can I tell the time.sleep's precision is 1ms? Any other way to increase the precision? (Using busy waiting -- spinning loop -- is not a good option, it makes over 90% cpu usage) Jane -- http://mail.python.org/mailman/listinfo/python-list
Style guide for subclassing built-in types?
Please see the following code: class rev_wrap(object): def __init__(self,l): self.l=l def __getitem__(self,i): return self.l[-i-1] class rev_subclass(list): def __getitem__(self,i): return list.__getitem__(self,-i-1) if __name__=='__main__': l=rev_wrap([1,2,3]) assert l[0]==3 assert list(l)==[3,2,1] l=rev_subclass([1,2,3]) assert l[0]==3 assert list(l)==[3,2,1] I know there is "reversed" and "reverse" but that's not the point. The code fails at the last line. Now that UserList is deprecated(not recommended) I suppose subclassing built-in types are preferable than wrapping them. How do I properly change the behaviours of built-in types? I think I have to override __iter__ and next to pass the last line. Is it a good style? If so, what is the most recommended way of implementing them? Thank you in advance. Jane -- http://mail.python.org/mailman/listinfo/python-list
Syck (yaml) for win32?
Hello. I love yaml. I've been using PyYaml and heard it's far behind Syck in its functionality and performance. I'd like to try Syck with python but I have to compile it for my windows machine -- and it seems a very difficult work :I don't use cygwin. Does anyone have the binaries for win32? Jane -- http://mail.python.org/mailman/listinfo/python-list
Efficient grep using Python?
[Fredrik Lundh] >>> bdict = dict.fromkeys(open(bfile).readlines()) >>> >>> for line in open(afile): >>>if line not in bdict: >>>print line, >>> >>> [Tim Peters] >> Note that an open file is an iterable object, yielding the lines in >> the file. The "for" loop exploited that above, but fromkeys() can >> also exploit it. That is, >> >> bdict = dict.fromkeys(open(bfile)) >> >> is good enough (there's no need for the .readlines()). [/F] > (sigh. my brain knows that, but my fingers keep forgetting) > > and yes, for this purpose, "dict.fromkeys" can be replaced > with "set". > >bdict = set(open(bfile)) > > (and then you can save a few more bytes by renaming the > variable...) [Tim Peters] > Except the latter two are just shallow spelling changes. Switching > from fromkeys(open(f).readlines()) to fromkeys(open(f)) is much more > interesting, since it can allow major reduction in memory use. Even > if all the lines in the file are pairwise distinct, not materializing > them into a giant list can be a significant win. I wouldn't have > bothered replying if the only point were that you can save a couple > bytes of typing . fromkeys(open(f).readlines()) and fromkeys(open(f)) seem to be equivalent. When I pass an iterator instance(or a generator iterator) to the dict.fromkeys, it is expanded at that moment, thus fromkeys(open(f)) is effectively same with fromkeys(list(open(f))) and fromkeys(open(f).readlines()). Am I missing something? Jane -- http://mail.python.org/mailman/listinfo/python-list
Re: Extending/Embedding Confusion
I'm going through a bit of this myself. What I've found useful is downloading the source to Python and comparing modules that I use a lot that are written in C (in my case datetime) and see how they are coded. Also, if I am thinking of using a C API function to do something, I grep or use Windows search in the code directories to see how the expert core Python coders use it and how often. This may not help much, but it might give you some ideas. Reference counting, if you're not experienced at it (I am not) is a whole topic on top of just coding something that will compile and run without crashing the interpreter. The same goes for memory leaks. Good luck. Hopefully someone with a bit more experience can give you some more guidance. Carl Trachte "jeremito" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...>I am trying to learn how to extend and/or embed Python. I have looked> at the document "Extending and Embedding the Python Interpreter" and> also "Python/C API Reference Manual. In the examples shown in> "Extending..." there are some things I ma not familiar with so I turn> to the index in the Reference Manual, but they are not listed. For> example, PyEval_CallObject and PyDict_GetAttrString. My question is> this: Is the documentation out of date or is the index not complete?> Where can I get information about these things?> > Secondly, I am really struggling with understanding how to Extend/Embed> Python. The examples given in the documentation are not as helpful as> I would hope. Does anyone know of additional examples on the web that> will shed some light on this issue? I have tried Google, but haven't> yet been successful in finding additional examples that help.> Thanks,> Jeremy> > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Python is fun and useful (was: Python is fun (useless social thread) ; -))
> I believe the applicability of Python and related techniques to > process control, engineering programming, and so on, is vastly > under-appreciated. Conventional wisdom in these domains sees > Visual Basic, Visual C++, and Fortran as suitable vehicles. > You've seen how limiting this is. > > For reasons that I can elaborate at more length later, I'd love > to diffuse awareness of Python's potential in mining and other > "real-world" industries. The Agile Control Forum http://www.engcorp.com/acf/RecentChanges > is made for just > such purposes. Although it's been rather quiet recently, that > might change soon. It'd be great to have you tell your story > in the ACF Wiki. > -- > http://mail.python.org/mailman/listinfo/python-list > Thanks! I'll have a look at the Agile Control Forum. I get some pushback sometimes for using Python instead of VBA/Excel at work. But my old department just sent two engineers for training with M. Lutz. So there's hope. All in all, I think Python is a pretty good choice for science, engineering, and process control. As you pointed out "coventional" wisdom sometimes doesn't have the last, or the correct word on things. Pythonistas of the engineering world, unite! (or something like that) -- http://mail.python.org/mailman/listinfo/python-list
psycopg2
Hello, I bigginer Python programmer. I am working on web application that access PostgreSQL on backend. After I imported PSYCOPG2 module in my program I started to get unwanded debug output into my web bowser. It is something like that: initpsycopg: initializing psycopg 2.0b6.2 (dec dt ext pq3) typecast_init: initializing NUMBER typecast_new: new type at = 00962920, refcnt = 1 typecast_new: typecast object created at 00962920 typecast_add: object at 00962920, values refcnt = 2 typecast_add: adding val: 20 typecast_add: adding val: 23 typecast_add: adding val: 21 typecast_add: adding val: 701 typecast_add: adding val: 700 typecast_add: adding val: 1700 typecast_add: base caster: typecast_init: initializing LONGINTEGER typecast_new: new type at = 00962960, refcnt = 1 typecast_new: typecast object created at 00962960 typecast_add: object at 00962960, values refcnt = 2 typecast_add: and so on ... I use Cheetah template to generate HTML code. I run Active python 2.4 in Windows XP enviroment. Any help how to stop get this garbage in my web browser would be highly appreciated. _ Powerful Parental Controls Let your child discover the best the Internet has to offer. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. -- http://mail.python.org/mailman/listinfo/python-list
How to Create pyd by C#
Hello all, I'm wondering how to create extension fill (.pyd) or anything that seem like DLL file by C# language. Please help me. Thank you. _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews-- http://mail.python.org/mailman/listinfo/python-list
What can I do with DLL?
Hello all, I'm a student. I wanna know how to do about my project. I implemented aplication using Ironpython because I have to use .NET library and c# code but I also have to use this application with another Python implemented application. My teacher want me to create DLL file of IronPython implemented application. I don't know how to begin. Please help me. Thank you. All the best. _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews-- http://mail.python.org/mailman/listinfo/python-list
Python Extension in C#?
Hello all, Please tell me how can I create .dll for Python in C#? Every advice would be great. Thank you. All the best, _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033-- http://mail.python.org/mailman/listinfo/python-list
another newbie question
Hello everyone, I have a question that google couldnt answer for me and thought that the brains on here might be able to help. I am trying to upload a file to a database using a (cgi) form and am having trouble doing this. I think that I need some way of escaping the file contents or making it so that mysql/python (not sure which) will ignore the files actual contents and store it in the db regardless of what is actually in the file. I hope that made sense. Thanks in advance for any help. Regards, MJ -- http://mail.python.org/mailman/listinfo/python-list