Re: for / while else doesn't make sense

2016-05-20 Thread Jon Ribbens
On 2016-05-20, Ethan Furman wrote: > On 05/20/2016 04:55 AM, Jon Ribbens wrote: >> Certainly. "else:" is (almost?) invariably used in the situation where >> you are iterating through something in order to find a value which >> matches a certain condition. So th

Re: for / while else doesn't make sense

2016-05-20 Thread Jon Ribbens
On 2016-05-20, Steven D'Aprano wrote: > By that logic, we ought to: > > - avoid using floats because their behaviour isn't intuitive and > can be confusing; To be fair, I'm very sympathetic to that argument. I think programming languages should never magically produce floats out of nowhere unle

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-21, Chris Angelico wrote: > On Sat, May 21, 2016 at 10:35 AM, Jon Ribbens > wrote: >> To be fair, I'm very sympathetic to that argument. I think programming >> languages should never magically produce floats out of nowhere unless >> the programmer has expl

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-22, Marko Rauhamaa wrote: > Jon Ribbens : >> That's a trap for those people though - it lulls them into thinking >> that they understand what's going on, when in fact they don't, because >> they don't understand floats, because almost no

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-22, Steven D'Aprano wrote: > On Mon, 23 May 2016 12:15 am, Jon Ribbens wrote: >> Yes, it should return an integer - and not because I think Python >> should behave like C on principle, but because: >> >> Explicit is better than implicit.

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-22, Chris Angelico wrote: > Python's int and float types are both approximations to a > non-representable type called a "real number". Sorry, I have to stop you there as the entire premise of your post is clearly wrong. "int" is not "an approximation of real numbers", it's a model of t

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-22, Random832 wrote: > On Sun, May 22, 2016, at 12:46, Jon Ribbens wrote: >> Sorry, I have to stop you there as the entire premise of your post is >> clearly wrong. "int" is not "an approximation of real numbers", it's >> a model of th

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-22, Random832 wrote: > On Sun, May 22, 2016, at 11:52, Jon Ribbens wrote: >> No, it *adheres* to the principle of least surprise. Floats appearing >> out of nowhere is surprising. Python 2's behaviour adhered to the >> principle, and Python 3's brea

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-22, Steven D'Aprano wrote: > On Mon, 23 May 2016 01:52 am, Jon Ribbens wrote: >> On 2016-05-22, Steven D'Aprano wrote: >>> How is this any better though? Complicated or not, people want to divide >>> 1 by 2 and get 0.5. That is the functional requi

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-22, Ben Bacarisse wrote: > Jon Ribbens writes: > >> No, in Python integers are closed under the standard arithmetic >> operators (+ - * / % **) - except, since Python 3, for "/", which >> is now a special case. > > 2 ** -1 is 0.5 even in Pyth

Re: for / while else doesn't make sense

2016-05-22 Thread Jon Ribbens
On 2016-05-23, Chris Angelico wrote: > On Mon, May 23, 2016 at 10:36 AM, Jon Ribbens > wrote: >> On 2016-05-22, Steven D'Aprano wrote: >>> On Mon, 23 May 2016 01:52 am, Jon Ribbens wrote: >>>> On 2016-05-22, Steven D'Aprano wrote: >>>>>

Re: for / while else doesn't make sense

2016-05-23 Thread Jon Ribbens
On 2016-05-23, breamore...@gmail.com wrote: > On Monday, May 23, 2016 at 2:04:01 AM UTC+1, Jon Ribbens wrote: >> On 2016-05-23, Chris Angelico wrote: >> > The point of arithmetic in software is to do what mathematics defines. >> > Would you expect 1+2 to return 5?

Re: for / while else doesn't make sense

2016-05-23 Thread Jon Ribbens
On 2016-05-23, Steven D'Aprano wrote: > But one thing is certain: very few people, Jon Ribbens being one of them, > expects 1/3 to return 0. And that is why Python changed the meaning of > the / operator: because using it for integer division was deeply unpopular > and a bug m

Re: for / while else doesn't make sense

2016-05-23 Thread Jon Ribbens
On 2016-05-23, Chris Angelico wrote: > On Tue, May 24, 2016 at 3:09 AM, Jon Ribbens > wrote: >> On 2016-05-23, Steven D'Aprano wrote: >>> But one thing is certain: very few people, Jon Ribbens being one of them, >>> expects 1/3 to return 0. And that is why Py

Re: for / while else doesn't make sense

2016-05-24 Thread Jon Ribbens
On 2016-05-24, Steven D'Aprano wrote: > On Tue, 24 May 2016 03:09 am, Jon Ribbens wrote: >> On 2016-05-23, Steven D'Aprano wrote: >>> But one thing is certain: very few people, Jon Ribbens being one of them, >>> expects 1/3 to return 0. And that is why

Re: for / while else doesn't make sense

2016-05-24 Thread Jon Ribbens
On 2016-05-24, Steven D'Aprano wrote: > On Tue, 24 May 2016 08:54 pm, Jon Ribbens wrote: >> On 2016-05-24, Steven D'Aprano wrote: >>> On Tue, 24 May 2016 03:09 am, Jon Ribbens wrote: >>>> On 2016-05-23, Steven D'Aprano wrote: > [...] >>>

Re: Find the max number of elements in lists as value in a dictionary

2016-05-25 Thread Jon Ribbens
On 2016-05-25, Daiyue Weng wrote: > I want to find the maximal number of elements contained in a nested > dictionary, e.g. > > data = { > 'violations': > { > 'col1': {'err': [elem1, elem2, elem3]}, > 'col2': {'err': [elem1, elem2]} > } > }

Re: Operator precedence problem

2016-06-06 Thread Jon Ribbens
On 2016-06-06, Marko Rauhamaa wrote: > Random832 : >> Sure, it's obvious to _me_ that << and >> have higher precedence than & >> and |, and that "and" has a higher precedence than "or", but can I >> assume the other people know this? > > No need to assume. Just read the spec: The spec tells you t

Re: Operator precedence problem

2016-06-06 Thread Jon Ribbens
On 2016-06-06, Marko Rauhamaa wrote: > Jon Ribbens : >> On 2016-06-06, Marko Rauhamaa wrote: >>> You *can* assume other people have read the spec. Even more >>> importantly, you can assume the Python interpreter complies with the >>> spec. >> >>

Re: Operator precedence problem

2016-06-06 Thread Jon Ribbens
On 2016-06-06, Chris Angelico wrote: > On Tue, Jun 7, 2016 at 1:27 AM, Jon Ribbens > wrote: >>>> You should put brackets around expressions when it's at all unclear >>>> what the meaning is. You could think of them a bit like "active >>>> comm

Re: Operator precedence problem

2016-06-06 Thread Jon Ribbens
On 2016-06-06, Chris Angelico wrote: > On Tue, Jun 7, 2016 at 2:05 AM, Jon Ribbens > wrote: >> On 2016-06-06, Chris Angelico wrote: >>> In that case, please never insult the intelligence of your future >>> readers by including any of these parentheses: >>>

Re: Recursive type annotations

2016-06-08 Thread Jon Ribbens
On 2016-06-08, Nagy László Zsolt wrote: > class Test: > def test(self, child : Test): > pass > > NameError: name 'Test' is not defined I think you can fix this by using a string annotation as follows: class Test: def test(self, child: "Test"): pass -- https:/

Re: (repost) Advisory: HTTP Header Injection in Python urllib

2016-06-21 Thread Jon Ribbens
On 2016-06-21, Steven D'Aprano wrote: > "In our case, if we could fool an internal Python application into fetching > a URL for us, then we could easily access memcached instances. Consider the > URL: ..." > > and then they demonstrate an attack against memcache. Except, the author of > the articl

Re: Break and Continue: While Loops

2016-06-23 Thread Jon Ribbens
On 2016-06-23, Chris Angelico wrote: > On Thu, Jun 23, 2016 at 8:15 PM, BartC wrote: >> Actually pretty much any expression can be used, because Python can >> interpret almost anything as either True or False. Don't ask for the rules >> because they can be complicated, but for example, zero is Fa

Re: Operator Precedence/Boolean Logic

2016-06-29 Thread Jon Ribbens
On 2016-06-29, Grant Edwards wrote: > On 2016-06-29, Steven D'Aprano wrote: >> To Nick, having 1+True return 2 is an accident of implementation, > > My recollection is that it was not an accident of impliementation. It > was an intentional descision to provide compatibility with many years > wor

Re: Call function via literal name

2016-07-29 Thread Jon Ribbens
On 2016-07-29, TUA wrote: > Rather than do this: > > if test['method'] == 'GET': > res = requests.get(test['endpoint'],auth=test['auth'], > verify=False) > elif test['method'] == 'POST': > res = requests.post(test['endpoint'], auth=tes

Re: Use pip to install non-python?

2016-08-04 Thread Jon Ribbens
On 2016-08-04, Tennis Smith wrote: > I have several utility scripts I want to install in /usr/local/bin. > Some are python, some are simple bash scripts. Can I use pip to > install them? If so, can anyone point me to some examples? By the looks of it*, you should be able to do this: setup

Re: Why do integers compare equal to booleans?

2018-11-16 Thread Jon Ribbens
On 2018-11-16, Steve Keller wrote: > Why do the integers 0 and 1 compare equal to the boolean values False > and True and all other integers to neither of them? Because Python used not to have a boolean type and used the integers 0 and 1 instead, so when the boolean type was introduced True and F

Re: What Python related git pre-commit hooks are you using?

2018-11-19 Thread Jon Ribbens
On 2018-11-18, Malcolm Greene wrote: > Curious to learn what Python related git pre-commit hooks people are > using? What hooks have you found useful and which hooks have you tried > and abandoned? Appreciate any suggestions for those new to this process. > Background: Window, macOS, and Linux dev

Re: Have I Been Banned?

2018-11-20 Thread Jon Ribbens
On 2018-11-20, Wildman wrote: > In the past I have participated in the group without any > problems. I access the forum through the usenet mirror > and I am still using the same newsreader and account. > Recently I made some followup posts to the group and they > never showed up. Have I been ban

Re: How to reset TCP connection on Linux?

2018-12-03 Thread Jon Ribbens
On 2018-12-03, Grant Edwards wrote: > How does one reset a TCP connection on Linux? Note that I want to > reset the connection, not close it. Something like the following should work I believe, although I have not tested it: sock.setsockopt( socket.SOL_SOCKET, socket.SO_LING

Re: Creating type evaluation annotation

2018-12-06 Thread Jon Ribbens
On 2018-12-06, Marek Mosiewicz wrote: > I'm Java developer,but had some experience with Python based > ERP software. It is quite serious application and I feel > unconfortable with not having type checking. I do not say language > should be static, but having checking method signature > is big wi

Re: Creating type evaluation annotation

2018-12-09 Thread Jon Ribbens
On 2018-12-09, Marek Mosiewicz wrote: > I'm talking about this https://docs.python.org/3/library/typing.html > > I'm not talking about new language. I think it could be nice to have > standard PEP annotations for classes to make type validation or type > hints when writing code. ... > This class

Re: chr - what's this?

2019-01-05 Thread Jon Ribbens
On 2019-01-05, Stefan Ram wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: >>print( chr( 0x231E )) # Unicode Character 'BOTTOM LEFT CORNER' (U+231E) >> File "~~~\Python\Python37\lib\encodings\cp1252.py", line 19, in encode > > I also have: > > print(chr) > > > . Don't see how the cal

Re: The slash "/" as used in the documentation

2019-02-10 Thread Jon Ribbens
On 2019-02-09, Terry Reedy wrote: > '/' is no uglier than, and directly analogous to, and as easy to produce > and comprehend, as '*'. It was selected after considerable discussion > of how to indicate that certain parameters are, at least in CPython, > positional only. The discussion of opti

Re: The slash "/" as used in the documentation

2019-02-10 Thread Jon Ribbens
On 2019-02-10, Chris Angelico wrote: > On Mon, Feb 11, 2019 at 2:21 AM Jon Ribbens wrote: >> On 2019-02-09, Terry Reedy wrote: >> > '/' is no uglier than, and directly analogous to, and as easy to produce >> > and comprehend, as '*'. It was select

Re: configparser - which one?

2019-03-26 Thread Jon Ribbens
On 2019-03-26, DL Neil wrote: > On 26/03/19 1:10 PM, Dave wrote: >> I use Python3 3, and expected learning how to use configparser would be >> no big deal.  Well!  Seems there is configparser, stdconfigparser, and >> safeconfigparser, and multiple ways to set the section and entries to >> the s

Re: Prepare accented characters for HTML

2019-03-28 Thread Jon Ribbens
On 2019-03-28, Tony van der Hoff wrote: > Thanks, Chris. The problem is not with the browser, but Jinja crashes. > Probably a bug, but I'm too wedded to that engine to change now. I'll > raise it on the Jinja bug site. It'll almost certainly be a mistake in the way you're using Jinja. I can't bel

Re: Losing words

2019-04-01 Thread Jon Ribbens
On 2019-04-01, John Doe wrote: > I'm learning SOCKETS and working with Irc. > --- > s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) > > When more than one word ( for example: This is a message) > in *message* it s

Re: Is this a "gotcha" in Python?

2019-04-20 Thread Jon Ribbens
On 2019-04-19, Stefan Ram wrote: > Now consider the same in Python: > > def f(): > # ... > l = 22 # representing a length > # ... > l = 'abc'; # representing the left half of something > # ... > > A Python implementation does not catch the "error". Obviously it is a deli

No module named 'gi'

2020-04-13 Thread Jon Danniken
e distro (Kubuntu 18.04) which was never molested with Anaconda, and it worked just fine. I do apparently have a remnant: $ which conda /home/jon/.local/bin/conda $ ll /home/jon/.local/bin/conda -rwxrwxr-x 1 jon jon 223 Jun 22 2019 /home/jon/.local/bin/conda* $ conda ERROR: The install method

Re: No module named 'gi' [SOLVED]

2020-04-13 Thread Jon Danniken
On 4/13/20 8:46 PM, Jon Danniken wrote: Hello all, I am coming up with this error when, after installing Dropbox, I try to run Dropbox on my machine (kubuntu 18.04): SNIP Well it looks like I solved this issue with $pip uninstall conda. Sometimes I just have to ask a question

NaN Vs None

2005-09-23 Thread Peck, Jon
raises an exception.   Thanks in advance for any advice.     Jon K Peck (Kim) [EMAIL PROTECTED] 312-651-3435 233 S Wacker Dr Chicago, IL 60606   -- http://mail.python.org/mailman/listinfo/python-list

Finding the Process Path

2005-10-03 Thread Peck, Jon
suggestions?   TIA.   Jon K Peck (Kim) [EMAIL PROTECTED] 312-651-3435 233 S Wacker Dr Chicago, IL 60606   -- http://mail.python.org/mailman/listinfo/python-list

RE: Finding the Process Path

2005-10-03 Thread Peck, Jon
Thanks, but this doesn't tell me what I am looking for. I am looking for the path for the current process (which will not be the Python interpreter). I see, though, that this is available as sys.executable Regards, Jon Peck -Original Message- From: [EMAIL PROTECTED] [mailto:[

RE: Finding the Process Path

2005-10-03 Thread Peck, Jon
through the interpreter, of course Python is what I get from sys.executable. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Holden Sent: Monday, October 03, 2005 9:26 AM To: python-list@python.org Subject: Re: Finding the Process Path Peck, Jon

Huge performance gain compared to perl while loading a text file in a list ...!?

2005-10-17 Thread Jon Stephens
m sure you’ll see drastic performance increases.   Jon -- http://mail.python.org/mailman/listinfo/python-list

Re: p2exe using wine/cxoffice

2005-10-26 Thread Jon Perez
James Stroud wrote: > "better". The only reason I want this functionality is to make my software > available to windoze users--despite their unfortunate ignorance, they are > people too. That's what I always say. Actually, I think it's many unix/linux users who are ignorant of just how nice, stab

Installing Tkinter on knoppix

2005-11-09 Thread Jon Monteleone
Greetings, Does anybody have a website where I can download a copy of Tkinter to install onto knoppix? Is it a pretty straightforward install? Cheers -Jon -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-06 Thread Jon Perez
Ivan Shevanski wrote: > Looking to replace my older flavor of linux with something new. . .What > are some of your favorites for python programming and anything else? Still Slackware for me. Slackware is the 'true' Linux. To paraphrase the Brooke Shields Calvin Klein ad - "Nothing comes between

Re: Most SHAMEFUL one-liner:

2005-12-06 Thread Jon Perez
Jeremy Moles wrote: > I was looking through some code of my today and noticed this little gem > I wrote a few days back that I had totally forgot about: > > fill = [("%%-%ds\n" % (columns - 1)) % " " for i in range(yoffset - 2)] > > ...and then I went on to do: > > "".join(fill) > > Talk about

Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-06 Thread Jon Perez
Sherm Pendley wrote: > Xah's a pretty well-known troll in these parts. I suppose he thinks someone > is going to take the bait and rush to "defend" the other languages or some > such nonsense. Actually, I think Xah often has a point, except he can't seem to express it without resorting to profani

Re: Bitching about the documentation...

2005-12-07 Thread Jon Perez
Tony Meyer wrote: > This makes no sense. If you want to complain about Python, try a > Perl list. Why would a list dedicated to discussion about/help with > a language need complaints about the language? Huh?!? Usually people complain because they need help or feel that things can be impro

Re: Bitching about the documentation...

2005-12-07 Thread Jon Perez
[EMAIL PROTECTED] wrote: > FWIW I find Python's docs to be OK at best, with some horrible > parts, and a lot of mediochre to poor parts. I myself have no big beef about Python's docs, but you're certainly not the first one to complain about them. Xah Lee rants very heavily against the quality ag

Re: Continuations Based Web Framework - Seaside.

2005-01-02 Thread Jon Perez
none wrote: Does Python really need yet another framework? Apart from the intellectual excersise, wouldn't it be nice if Python would get a framework "for the rest of us" (meaning: mere mortals) which would focus upon getting work done in a simple manner instead of creating yet another, new, h

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

2005-01-09 Thread Jon Perez
worzel wrote: What is the best way to web developemnt with Python? Is there anything close to PHP style in-page script placement that can create and use other Python objects? Spyce ( http://spyce.sf.net ) is what you're looking for. I was looking exactly for the same thing as you are - a PHP w

Re: a new Perl/Python a day

2005-01-11 Thread Jon Perez
Bob Smith wrote: With terms such as "blabbering Unix donkeys" and "sloppy perl monkeys" I would say that the monkey-mind is indeed one that is enamoured with obfuscation and complicated gadgetry for its own sake. Ever wonder why no one has ever considered using the phrase "Zen of Perl"? (yes, it

Re: Windows GUIs from Python

2005-01-11 Thread Jon Perez
Wow, Venster looks cool and to think I've never heard of it before. I knew following this newsgroup would pay off one day... Luke Skywalker wrote: On Tue, 11 Jan 2005 22:15:36 +0100, Thomas Heller <[EMAIL PROTECTED]> wrote: Well, venster. Although it is most certainly alpha. But with some work..

Re: Windows GUIs from Python

2005-01-12 Thread Jon Perez
Still, what I think would appeal to a lot of people (although they might not know it yet) as a GUI solution for Python is Mozilla XUL with all the RDF and XPCOM crap surgically removed from it. If you've ever tried a couple of basic XUL tutorials, I think you would be convinced that XUL is an even

Re: Python.org, Website of Satan

2005-01-12 Thread Jon Perez
This would be funny except for the fact that there are actually people out there who will take this seriously. http://rmitz.org/freebsd.daemon.html Don't forget Python == Snake == Serpent == ... ;-D [EMAIL PROTECTED] wrote: > python.org = 194.109.137.226 > > 194 + 109 + 137 + 226 = 666 > > What is

Re: Another look at language comparisons

2005-01-12 Thread Jon Perez
Max M wrote: Jan Dries wrote: [EMAIL PROTECTED] wrote: And there is hope for Python, as Guido has recently been seen with a beard :-) http://www.tbray.org/ongoing/When/200x/2004/12/08/-big/IMG_3061.jpg LOL, he is working on linux, isn't he? So it was about bloody time. Guido Van Rossum is now wor

Re: "Architecture of Python" was removed ?

2005-01-12 Thread Jon Perez
Skip Montanaro wrote: Yes, perhaps. Note that it doesn't appear that the Wayback Machine contains the meat of the essay, just the front page. It came from a wiki. Perhaps Most of the text seems to be there, but there are some critical diagrams (images) which the Wayback Machine did not archive.

Re: Another look at language comparisons

2005-01-12 Thread Jon Perez
Anyone know of a cached copy where the photos are present? The whole thing makes little sense with the photos gone. Pierre Quentel wrote: http://khason.biz/blog/2004/12/why-microsoft-can-blow-off-with-c.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Another look at language comparisons

2005-01-12 Thread Jon Perez
Terry Reedy wrote: It would hardly make more sense with the photos. The photos would be graphic evidence and would make it more entertaining to read through. "Not the law is clear? There is a beard - there is a success. There is no beard - you are guilty. " Terry J. Reedy And what about the moust

Re: Integration with java (Jpype vs. JPE)

2005-01-15 Thread Jon Perez
Can someone summarize in a nutshell what is the difference between JPype and JPE? -- http://mail.python.org/mailman/listinfo/python-list

Re: Producer/consumer Queue "trick"

2005-01-15 Thread Jon Perez
I don't get it. If the consumer and the producer are separate threads, why does the consumer thread block when the producer thread is generating a new board? Or why does it take forever for the producer thread to be pre-empted? Also, I don't understand why the solution works. How does sleeping for

Re: huygens lands on titan

2005-01-17 Thread Jon Perez
I sure as hell bet it didn't too. Fuzzyman wrote: John Thingstad wrote: -- huygens lands on titan Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ I bet it didn't... Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/p

psp & php integration

2005-07-25 Thread Jon Hewer
PSP file to create the HTML output which is sent to the browser.  Can this be done inside my PSP file?  If not, is there any other way in Python (or PHP) to achieve this?   Thanks Jon -- http://mail.python.org/mailman/listinfo/python-list

Python IDE's

2005-07-31 Thread Jon Hewer
Hi   I am yet to find a Python IDE (for both Windows and Mac) that I like.  Any suggestions?   Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE's

2005-08-01 Thread Jon Hewer
es and run it - I like the idea of developing python in an IDE and just hitting a run button. Cheers Jon On 8/1/05, Caleb Hattingh <[EMAIL PROTECTED]> wrote: > You know, for several years I was one of those people who simply ignored > posts like this about Vi/Vim because I happened to

Re: pygettext ?

2005-08-03 Thread Jon Hewer
ns of Python Network Programming book, so maybe something network related would be good? Cheers Jon -- http://mail.python.org/mailman/listinfo/python-list

Re: pygettext ?

2005-08-03 Thread Jon Hewer
That was sent with the wrong title, doh! On 8/3/05, Jon Hewer <[EMAIL PROTECTED]> wrote: > Hi > > I'm pretty new to Python, and recently been working my way through > Dive Into Python, and I'm currently writing a really simple rss reader > purely to get familiarise

Ideas for Python project?

2005-08-03 Thread Jon Hewer
ns of Python Network Programming book, so maybe something network related would be good? Cheers Jon -- http://mail.python.org/mailman/listinfo/python-list

Re: Ideas for Python project?

2005-08-04 Thread Jon Hewer
Thanks i'll check it out. I'm not very good yet tho! On 8/4/05, Stuart Turner <[EMAIL PROTECTED]> wrote: > Jon Hewer wrote: > > > Hi > > > > I'm pretty new to Python, and recently been working my way through > > Dive Into Python, and I'm

looping list problem

2005-08-16 Thread Jon Bowlas
efers to Unicode, although I could be wrong. Even more bizarrely if I test the len(hiddennavelements) it returns the correct result (2), so why wont my for-loop work? Hope someone can help, or point out my schoolboy error. Jon -- http://mail.python.org/mailman/listinfo/python-list

RE: looping list problem

2005-08-16 Thread Jon Bowlas
5: Yield statements are not allowed. Any ideas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fredrik Lundh Sent: 16 August 2005 13:44 To: python-list@python.org Subject: Re: looping list problem Jon Bowlas wrote: > attobject = context.get_

RE: looping list problem

2005-08-16 Thread Jon Bowlas
ace' treetop = '\n\n' return '%s%s' % (treetop, get_tree_html(pub, obj)[19:]) I was hoping that this would loop through the elements in the list returned by the hiddens function comparing them with the id of the current value of c (bert) and if they are the same then it sho

RE: looping list problem

2005-08-16 Thread Jon Bowlas
Many thanks for your help, worked a treat Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Otten Sent: 16 August 2005 17:25 To: python-list@python.org Subject: RE: looping list problem Jon Bowlas wrote: > Incidentally I'm doing this

Re: up to date books?

2005-08-18 Thread Jon Hewer
mark pilgrim's dive into python is a good book if you're new to python i also have python cookbook, and foundations of python network programming - i haven't really had a chance to look at these in detail yet but both of these look good On 8/18/05, Paul Dale <[EMAIL PROTECTED]> wrote: > > I high

Coin-operated kiosk written in python -- need some help...

2005-08-18 Thread Jon Monteleone
drop more coins at any time during the session to prolong the session 10) Timer resets to 0 awaiting the next customer to drop coins Any help on how to display my gui and log into an account using python would be much appreciated. Cheers -Jon -- http://mail.python.org/mailman/listinfo/python-list

Re: Coin-operated kiosk written in python -- need some help...

2005-08-18 Thread Jon Monteleone
account. So, currently my specific questions are: 1) How do I make my gui display at the login screen (we can assume I get the program spawning as a daemon) 2) How do I get a push of the start button on my gui to login the user to the Internet account Cheers -Jon - Original Message - From

Database of non standard library modules...

2005-08-19 Thread Jon Hewer
be an extremely valuable resource. Just wondering if anyone could tell me if something like this exists (probably does), and if not, I'll get to work :) Cheers Jon -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for Webscripting (like PHP)

2005-08-19 Thread Jon Hewer
I like the look of cheeryPy - snyone know if its easy to get it running on top of Apache? Thanks On 19 Aug 2005 04:10:23 -0700, paron <[EMAIL PROTECTED]> wrote: > Yes the stdlib offers all the basic functions, but why work so hard? > Get CherryPy (http://www.cherrypy.org) and relax a bit. You'll

Re: Python for Webscripting (like PHP)

2005-08-19 Thread Jon Hewer
'cherryPy' even On 8/19/05, Jon Hewer <[EMAIL PROTECTED]> wrote: > I like the look of cheeryPy - snyone know if its easy to get it > running on top of Apache? > > Thanks > > On 19 Aug 2005 04:10:23 -0700, paron <[EMAIL PROTECTED]> wrote: > > Yes

Re: Python for Webscripting (like PHP)

2005-08-19 Thread Jon Hewer
Ah cool, thanks, i hadn't spotted that page :) On 19 Aug 2005 04:51:06 -0700, paron <[EMAIL PROTECTED]> wrote: > Yes, there's a tutorial about that -- there are several options > depending on the URL structure you want to expose, and your version of > Apache. None of them are torturous, though. >

Language translation possible in python?

2005-08-26 Thread Jon Monteleone
I have a program that currently displays all of its messages and instructions in only English. My boss wants me to change it all to Korean. Is there a python module that will automatically translate my English to Korean? -Jon -- http://mail.python.org/mailman/listinfo/python-list

ideas for university project ??

2005-08-26 Thread Jon Hewer
enced in Java, but I have started learning Python, and although i haven't got very far yet, I plan on doing some more in the next few weeks. Areas of interested include AI, distributed systems. Most of all i want something that is interesting, and actually useful (thats probably stating

Re: ideas for university project ??

2005-08-26 Thread Jon Hewer
On 8/26/05, bruce <[EMAIL PROTECTED]> wrote: > 1st question, can this be part of a startup? > 2nd question, does your university expect to own the rights/IP of your > efforts > 3rd question, are you serious, or just looking for a 'project' for a grade I am pretty sure the university will hold any

command line arguments

2005-08-31 Thread Jon Hewer
gv[1:], "n:", ["name="]) or to have two command line options/flags, -n and -u, and checking that these have both been specified and then proceeding (this might be a little messier) any tips would be much appreciated thanks in advance jon -- http://mail.python.org/mailman/listinfo/python-list

Re: command line arguments

2005-09-01 Thread Jon Hewer
>What's the purpose of this utility? Is it to do something with the URL? >And the URL must always be specified? What about the name? Also >mandatory, or optional? The relationship between the two? its just a simple rss reader. i'm writing it almost purely just to get me using language (i'm le

problems with smtplib

2005-09-02 Thread Jon Hewer
n') if i don't sepcify 'localhost' i get the same error if i specify the port and local_hostname too class SMTP([host[, port[, local_hostname]]]) then my script just freezing at some point trying to connect/send and the email doesn't get sent if anyone can help that wou

Re: problems with smtplib

2005-09-02 Thread Jon Hewer
I'm running Fedora Core 3, and I assume thats useing sendmail... On 2 Sep 2005 04:25:41 -0700, Harlin Seritt <[EMAIL PROTECTED]> wrote: > What are you getting in your smtpd logs? Are you using postfix? > sendmail? or are you running this against a Windows stmp service? > > Harlin Seritt > Interne

Re: problems with smtplib

2005-09-02 Thread Jon Hewer
just got home and i've tried my script on windows with my isp's smtp server, and found that my code wasn't getting past the s.connect() changed me code to: s = smtplib.SMTP('smtp.lineone.net') s.sendmail(me, to, msg.as_string()) s.quit() and now it works fine On 9/2/05, Steve Holden

Re: Example of signaling and creating a python daemon

2005-09-18 Thread Jon Monteleone
. The latter is how linux documentation describes turning a program into a daemon. I guess I am wondering about the difference between using python to daemonize a program vs using a bash script to daemonize a program. Cheers -Jon - Original Message - From: <[EMAIL PROTECTED]> To:

Re: some pointers for a newbie

2004-12-04 Thread Jon Mercer
a bit of a newbie to Python myself and didn't even know there was a unit testing module/facility/whatever available. Where can I find more info??? Best to all, Jon On Sun, 2004-12-05 at 02:33 +0200, John Evans wrote: > Hi, I have decided to play around with python, for the simple reason >

Re: Python vs. Perl

2004-12-13 Thread Jon Perez
Michael McGarry wrote: I intend to use a scripting language for GUI development and front end code for my simulations in C. I want a language that can support SQL, Sockets, File I/O, and shell interaction. In my experience, Python is definitely much more suitable than Perl for the first four area

Re: lies about OOP

2004-12-16 Thread Jon Perez
projecktzero wrote: A co-worker considers himself "old school" in that he hasn't seen the light of OOP.(It might be because he's in love with Perl...but that's another story.) He thinks that OOP has more overhead and is slower than programs written the procedural way. The problem with OOP is not o

Re: PHP vs. Python (speed-wise comparison)

2004-12-27 Thread Jon Perez
[EMAIL PROTECTED] wrote: Anyone know which is faster? I'm a PHP programmer but considering getting into Python ... did searches on Google but didn't turn much up on this. Thanks! Stephen If you're talking about usage as a server side scripting language, then PHP will likely give better page servin

putting the output of a print statement into a string

2005-03-27 Thread Jon Perez
There are objects whose repr() is not the same as what gets printed out when you apply the print statement to them. Usually these are complex objects like exceptions. Example: >>> import smtplib >>> server=smtplib.SMTP("smtp.yourisp.com") >>> try: server.sendmail("[EMAIL PROTECTED]",

Re: putting the output of a print statement into a string

2005-03-27 Thread Jon Perez
Thanks, man! That was one fast reply... Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Jon Perez wrote: > > >>Question: >> >>Is there a way to somehow put the output of 'print exc_obj' into >>a string? > > > Ther

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