Re: Sending a broadcast message using raw sockets

2013-01-22 Thread Corey LeBleu
If you don't *have* to use the actual socket library, you might want to have a look at scapy. It's a packet manipulation program/library. It might make things a little easier. http://www.secdev.org/projects/scapy/ On Jan 22, 2013 9:17 AM, "Peter Steele" wrote: > I just tried running you code,

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Corey Richardson
n't think of many. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing MySQLdb via FTP?

2012-06-08 Thread Corey Richardson
On Fri, 8 Jun 2012 09:55:23 -0800 Tim Johnson wrote: > See the thread titled "Python libraries portable?" you will note > that Corey Richardson makes the statement that MySQLdb is a C > extension. I accepted that statement, but upon looking at the > directories

Re: Python libraries portable?

2012-06-07 Thread Corey Richardson
be limited. > https://github.com/petehunt/PyMySQL/ is your best option, when it comes to using mysql without C extensions. I don't even know if it works, but it's the only one I could fine. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Python libraries portable?

2012-06-07 Thread Corey Richardson
ssuming same architecture and shared libraries, it will *probably* work, but no guarantees. If any of those are different, even slightly, it will break. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Python libraries portable?

2012-06-07 Thread Corey Richardson
run it on a SPARC architecture or > do we need to get the native libraries for SPARC? > Pure-python libraries should run wherever Python does, if it doesn't, that's a bug. C extensions to CPython shouldn't have any platform incompatibilities, but of course you'll need to rec

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

2012-06-04 Thread Corey Richardson
e 1, in > IOError: [Errno 13] Permission denied: '/dev/sda1' > > how can i own the access to read sda1? > You need read privileges. Either change the permissions of /dev/sda1, or run python as root. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: get latest from svn

2012-06-01 Thread Corey Richardson
On Fri, 1 Jun 2012 15:38:58 +0530 prakash jp wrote: > Hi All, > > Can some one suggest me a module to access SVN repository so that i > could download any given branch. > > Thanks Doing some basic googling, I found: http://pysvn.tigris.org/ I imagine you could also sh

Re: While stack:

2012-06-01 Thread Corey Richardson
hehardway.org/book/ex33.html Simplistic summary: it executes the indented code under the "while" until stack evaluates to non-True. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: os.path needs immediate attention!

2011-07-29 Thread Corey Richardson
for broken symbolic links' > >>> os.path.exists.__doc__ > 'Test whether a path exists. Returns False for broken symbolic links' > > Should have been one method: > >>> os.path.exists(path, ignoreSymLnks=False) It is. /usr/lib64/python2.7/ntp

Re: PEP 8 and extraneous whitespace

2011-07-22 Thread Corey Richardson
g each terminal 110 characters of breathing space. I still limit my lines to 78 chars though, if not for any reason besides text is nice and easy to read at that width, and everyone else is doing it. I have no reason to change. I've never desired more characters than that. -- Core

Re: Inconsistencies between zipfile and tarfile APIs

2011-07-22 Thread Corey Richardson
Excerpts from rantingrick's message of Fri Jul 22 02:40:51 -0400 2011: > On Jul 22, 12:45am, Terry Reedy wrote: > > On 7/22/2011 12:48 AM, rantingrick wrote: > > > On Jul 21, 11:13 pm, Corey Richardson wrote: > > > Hmm. Archives are more like directories than fil

Re: Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread Corey Richardson
Excerpts from rantingrick's message of Fri Jul 22 00:48:37 -0400 2011: > On Jul 21, 11:13pm, Corey Richardson wrote: > > I agree, actually. > > > Maybe i can offer a solution. A NEW module called "archive.py" (could > even be a package!) which expor

Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread Corey Richardson
e do not behave > like proper file objects should. > I agree, actually. -- Corey Richardson "Those who deny freedom to others, deserve it not for themselves" -- Abraham Lincoln signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

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

2011-07-20 Thread Corey Richardson
Stick to what you know please. > > Allow me. > > Tkinter sucks because it looks like an enfeebled Motif 1980s dawn-of- > GUIs scratchy window with grooves and lines everywhere. > Themed Tk (TTK) has come a far way. I'll leave the research for you, however, as I can not give t

Re: Tabs -vs- Spaces: Tabs should have won.

2011-07-17 Thread Corey Richardson
ata). Inconsolata looks great on paper, though. DejaVu Sans Mono isn't the prettiest thing but it certainly gets the job done. -- Corey Richardson "Those who deny freedom to others, deserve it not for themselves" -- Abraham Lincoln signature.asc Description: PGP signature --

Re: list(), tuple() should not place at "Built-in functions" in documentation

2011-07-16 Thread Corey Richardson
"", line 1, in TypeError: 'Foo' object is not iterable >>> Which is tons more useful than >>> assert isinstance(f, (list, tuple)) Traceback (most recent call last): File "", line 1, in AssertionError >>> -- Corey Richardson &q

Re: list(), tuple() should not place at "Built-in functions" in documentation

2011-07-14 Thread Corey Richardson
(Or maybe the search is more advanced than I use it). They aren't exactly warts, it's useful information, but in the common case they probably aren't desired (I always use Google to search around the python docs). Not to mention that the search is slooowwww. It's plenty fast

Re: Function docstring as a local variable

2011-07-10 Thread Corey Richardson
ith *function* docstrings. > Ah. My bad, thank you for clarifying. -- Corey Richardson "Those who deny freedom to others, deserve it not for themselves" -- Abraham Lincoln signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Corey Richardson
wxGlade for wxWidgets, QtCreator (And something new for their newer system, don't remember the name), etc. -- Corey Richardson "Those who deny freedom to others, deserve it not for themselves" -- Abraham Lincoln signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Function docstring as a local variable

2011-07-10 Thread Corey Richardson
gt;> def foo(): ... "Docstring" ... print __doc__ ... >>> foo() None >>> What does yours do? -- Corey Richardson "Those who deny freedom to others, deserve it not for themselves" -- Abraham Lincoln signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Function docstring as a local variable

2011-07-10 Thread Corey Richardson
ame ds at it. Do you know what a docstring is? def foo(): """I am a docstring""" pass def bar(): ds = "I am not a docstring!" def baz(): "I am a docstring too!" pass def qux(): 'And even me! Quote type don't matter

Re: meaning of numpy.fft coefficients

2011-07-08 Thread Corey Richardson
is the real part, b is the imaginary. Python uses j, >>> 4+5j (4+5j) http://en.wikipedia.org/wiki/Complex_number http://docs.python.org/library/stdtypes.html#typesnumeric -- Corey Richardson "Those who deny freedom to others, deserve it not for themselves" -- Abraham L

Re: The end to all language wars and the great unity API to come!

2011-07-05 Thread Corey Richardson
lst[i], lst[i+1] = lst[i+1], lst[i] Untested, probably doesn't work either. See what's in there? An if. Nothing "user-defined" at all. Sure, WHAT the if does is user-controlled with the key, but that doesn't make that particular if a new control structure, and it certain

Re: Nested/Sub Extensions in Python

2011-07-01 Thread Corey Richardson
Excerpts from H Linux's message of Fri Jul 01 16:02:15 -0400 2011: > Dear all, > > I am currently fighting with a problem writing a set of Python > extensions in C. If you haven't seen it yet, Cython is a *very* nice tool for writing C extensions. http://cython.org/ -- Cor

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Corey Richardson
" would be useful. But I'm not really certain that would make much of a difference. I'll Cc this to d...@python.org. -- Corey Richardson "Those who deny freedom to others, deserve it not for themselves" -- Abraham Lincoln signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Corey Richardson
as the new object you create with []. It keeps that object around. The proper idiom instead of > >>> def a(foo=[]): > ... foo.append(1) > ... print foo > ... is def a(foo=None): if foo is None: foo = [] foo.append(1) print foo --

Re: // compile python core //

2011-06-25 Thread Corey Richardson
sing you're going to want to go through and edit Makefile.pre.in and take out stuff you dont' want. Just make sure you know what you're doing. That said, this was an educated guess, I don't actually know. http://hg.python.org/cpython/file/c5b0585624ef/Makefile.pre.in Best of l

Re: Python 2.6 OR 3.2

2011-06-09 Thread Corey Richardson
ifference http://wiki.python.org/moin/Python2orPython3 Pick one and learn it well. It'll be easy to switch to the other when/if you need to. Right now lots of nice libraries only support 2.x, like Twisted and lots of web frameworks (all? I think there's one or two that use 3). - -- Corey Richardson

Re: announcing: dmangame: an ai game. maybe.

2011-06-06 Thread Corey Richardson
r but new challenge to my brain. Thank you for your work and for sharing. - -- Corey Richardson -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) iQEcBAEBAgAGBQJN7ILhAAoJEAFAbo/KNFvpFjYH/A+5l58MURNwSkNkRvejcS83 GDCVkq7I9ojqkGdEMi4get4oz0z+TQnZ5PTjHNMpgZvbI+AM6esQ2NPKIUGQd4l

Re: Python in CS1

2011-05-21 Thread Corey Richardson
ies you jump over onto the edu-sig list. - -- Corey Richardson -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) iQEcBAEBAgAGBQJN18oPAAoJEAFAbo/KNFvp9MwH/0zXSTTaxAwYPLSxhyirqr3X DUxyulE5HRn+NIarWyomlDfoayip3boyUBG1GQDDKh+sIIzPT9ETfL7+ep9rwkL4 VA7XSDMLu+4DtUlnFjGlfx

Re: Python 3.x and bytes

2011-05-17 Thread Corey Richardson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/17/2011 04:55 PM, Ethan Furman wrote: > Apparently, it's not well documented. If you check PEP 358 > you'll find it. > > ~Ethan~ Agreed, it looks like it should be mentioned in bytes.__doc__ about the single-integer

Re: Python 3.x and bytes

2011-05-17 Thread Corey Richardson
ss it an iterable, ex: >>> bytes([5, 6, 1, 3]) b'\x05\x06\x01\x03' - From help(bytes): | bytes(iterable_of_ints) -> bytes | bytes(string, encoding[, errors]) -> bytes | bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer | bytes(memory_view) -> byte

Re: Proper way to handle errors in a module

2011-05-12 Thread Corey Richardson
ror: name 'HelloError' is not defined". I don't know how to > define the exception. class HelloError(Exception): pass Of course, there are all sorts of other things you could do with your exception. http://docs.python.org/tutorial/errors.html#user-defined-exceptions

Re: using python to post data to a form

2011-04-04 Thread Corey Richardson
quot;BDFL"} data = urllib.urlencode(data) request = urllib2.Request(url, data) response = urllib2.urlopen(request) page = response.read() So yeah, passing in a Request object to urlopen that has some urlencode'ed data in it. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: proposal to allow to set the delimiter in str.format to something other than curly bracket

2011-04-03 Thread Corey Richardson
harp. > Roll your own http://docs.python.org/library/string.html#string.Formatter -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

The Magick of __call__ (Or, Digging Deeper Than I Ought To)

2011-04-01 Thread Corey Richardson
e: {0}".format(bar) ... >>> foo = Foo() >>> foo("Me!") Name: Me! Ok, nothing out of the ordinary. But what happens if >>> foo.name.__call__("Corey") Name: Corey >>> eval("foo.name" + (".__call__" * 9001)

Re: Python-related Animation Packages?

2011-03-29 Thread Corey Richardson
On 03/29/2011 01:17 PM, Benjamin J. Racine wrote: > Hello all, > > Does anyone know of software that might be of use in an attempt to animate an > object undergoing 6-DOF rigid body motions: surge, sway, heave, roll, pitch > and yaw? > > Thanks so much, > Ben Racine

Re: popular programs made in python?

2011-03-29 Thread Corey Richardson
s a rather extensive Python API that allows you to make scripts that can access any part of the software, or almost any part of it. Just look at http://en.wikipedia.org/wiki/List_of_Python_software It's not a complete list either. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: best python games?

2011-03-25 Thread Corey Richardson
rating or most downloaded as far as i can tell Unknown Horizons is pretty OK, and the upcoming PARPG looks promising (both use the FIFE engine). -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Good literature about python twisted

2011-03-15 Thread Corey Richardson
On 03/15/2011 03:18 PM, gelonida wrote: > o it seems another book or some other documentation would be great. > > Does anyone have recommendations? > http://krondo.com/?page_id=1327 -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Tk MouseWheel Support

2011-03-10 Thread Corey Richardson
On 03/10/2011 03:35 PM, Corey Richardson wrote: > Middle button is Button-3 IIRC, and I think it'd be MouseUp and > MouseDown. I'm really not sure though. It's Button-2 rather. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Tk MouseWheel Support

2011-03-10 Thread Corey Richardson
r any help! > > Dick Middle button is Button-3 IIRC, and I think it'd be MouseUp and MouseDown. I'm really not sure though. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: having both dynamic and static variables

2011-03-05 Thread Corey Richardson
estion spawns from my ignorance: When would a functions definition change? What is the difference between a dynamic function and a fixed function? -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: What do I need to know in order to write a web application in python?

2011-03-05 Thread Corey Richardson
uot;. I'm sure the same applies for Glade. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Corey Richardson
it becomes more complete / more examples/tutorials using it become available. Tkinter is easy to use and comes right in the standard library. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Corey Richardson
#x27;s a good start, so you're more familiar with the language compared to the ones you currently know. And then you can try a web app with Django, but I suggest Pyramid instead. -- Corey Richardson [1] - Well, kinda. You could have Django driving the back-end and maybe use AJAX and have th

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Corey Richardson
e players. So look into XMPP (xmpppy or Twisted Words are your choices, I guess) and learn up on Javascript. That's my take on it, at least. I'm sure someone with more experience could direct you more specifically. Turn-based would be much easier. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Communicating from Flash to Python

2011-03-03 Thread Corey Richardson
P script via a webpage, so are you trying to use Python with the CGI to do this? If so, check out the actionscript thing at [1] and just implement the server page with Python CGI instead of PHP. [1] http://www.actionscript.org/resources/articles/82/1/Send-Email-via-Flash-and-PHP/Page1.html -- Co

Re: A Short Question on list

2011-03-03 Thread Corey Richardson
i in range(subsetrange): multiplysubset.append(recursiveMultiply(elemlist, i, 0)) -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-03-02 Thread Corey Richardson
on filling them. What are those gaps? -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: jQuery-like sliding container animations for Tkinter?

2011-02-26 Thread Corey Richardson
or smoothly shrink or grow? > > My working knowledge of Tkinter tells me that Tkinter's pack and > grid layout techniques will not be optimal for the above type of > animations. The place geometry manager might suit your needs, but that can be a bit PITA to work with. By can, I

Re: Python getting stuck

2011-02-26 Thread Corey Richardson
bpython, etc? What key combination are you using? My instinctive guess is that you are trying to Ctrl-C to copy something in the interpreter, which actually just raises a KeyboardInterrupt exception. However your additional symptoms seem to indicate otherwise. A more verbose description is neede

Re: Parsing numeric ranges

2011-02-25 Thread Corey Richardson
compact_range = "5-7".split('-') final_nums += range(int(compact_range[0]), int(compact_range[1]) + 1) And then looping through your compact notation deciding when it's a range notation and when it's a literal is all you have to do. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie...

2011-02-25 Thread Corey Richardson
On 02/25/2011 03:39 AM, Corey Richardson wrote: > Also, if one understands how a unicode byte looks like in a string, it's > pretty easy to understand, and looks a hell of a lot clearer than a > bunch of chr()'s without any space between. That's just my two cents. Err.

Re: Newbie...

2011-02-25 Thread Corey Richardson
, 45, 15, 3, 0, 3)]) > >> or even shorter, as a string constant: > >> sine = '\x0f-?-\x0f\x03\x00\x03' > > Now show your code to a 10 year old and see if he understands it... When I was 10 all I knew was Logo (and very little of it)! Also, if one understands how a unicode byte looks like in a string, it's pretty easy to understand, and looks a hell of a lot clearer than a bunch of chr()'s without any space between. That's just my two cents. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Struggling to convert a mysql datetime object to a python string of a different format

2011-02-24 Thread Corey Richardson
four months ago, correct? See: >> On Wednesday, August 04, 2010 7:40 PM ? wrote: -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing binary files in windows

2011-02-11 Thread Corey Richardson
On 02/11/2011 10:20 PM, Abhishek Gulyani wrote: > When I write binary files in windows: > > file = open(r'D:\Data.bin','wb') > file.write('Random text') > file.close() > > and then open the file it just shows up as normal text. There is nothing > binary about it. Why is that? > > Sorry if this

Re: OO Python

2011-02-09 Thread Corey Richardson
On 02/09/2011 04:50 PM, Paul Symonds wrote: > Are there any good resources to learn OO Python from? > To my knowledge, all Python is OO. What specifically about OOP do you want to know? http://www.alan-g.me.uk/tutor/tutclass.htm I've always liked Alan's site. Come over to the Tutor list if you

Re: PIL Open Problem

2011-02-07 Thread Corey Richardson
On 02/07/2011 05:27 PM, Richard Holmes wrote: > I'm trying to create an image for use in Tkinter. If I understand the > PIL documentation correctly, I first need to import Image, then > create an instance of the Image class and call 'open' Don't do that. This is wrong: import Image im = Image.Ima

P2PU Python Challenges

2011-02-05 Thread Corey Richardson
In my journeys across the face of the Internet, I found this: http://p2pu.org/general/python-challenges Not sure what it's really going to be, but any new programmers/people looking for something to do might be interested. I'm not quite sure how a class can be organised around a web riddle, but it

Re: psd estimation no matplotlib

2011-02-05 Thread Corey Richardson
tplotlib's source and put it in your own code, or even just write it yourself. ~Corey -- http://mail.python.org/mailman/listinfo/python-list

Re: parse GET/POST data on simple http server

2011-02-03 Thread Corey Richardson
On 02/03/2011 03:15 AM, Markus wrote: > Hi, > > As a beginner in python, I am looking for example code that would help > me understand how to > code following idea: > 1. Start minimal http server > 2. Send GET or POST data (url encoded, or from form) - example > Name="Foo" > 3. Analyze the GET/POS

Re: parse GET/POST data on simple http server

2011-02-03 Thread Corey Richardson
On 02/03/2011 03:15 AM, Markus wrote: > Hi, > > As a beginner in python, I am looking for example code that would help > me understand how to > code following idea: > 1. Start minimal http server > 2. Send GET or POST data (url encoded, or from form) - example > Name="Foo" > 3. Analyze the GET/POS

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-02 Thread Corey Richardson
On 2/2/2011 2:44 PM, rantingrick wrote: [snip] py> flamer_group.append(troll_group.pop("Corey Richardson")) Your moving up Corey. Keep up the good work! I don't recall ever doing anything but injecting my honest opinion. If my opinion may be flawed (or appears to be

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Corey Richardson
On 02/01/2011 07:42 PM, Robert wrote: > On 2011-02-01 10:54:26 -0500, Terry Reedy said: > >> On 2/1/2011 12:13 AM, rantingrick wrote: >>> On Jan 31, 4:17 pm, Kevin Walzer wrote: Rick, >> >>> Yes. IDLE is first and foremost a tool to get work done. However we >>> should not ignore the fact th

Re: how to get and search a html file from a website

2011-02-01 Thread Corey Richardson
On 02/01/2011 04:20 PM, Tracubik wrote: > Hi all! > i'm writing a notification program and i'm quite new to python. > The program have to check every 5 minutes a particular website and alert > me when a particular sentence ("user online") is in the html. > i've thinked to use a text browser (lynx)

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Corey Richardson
On 02/01/2011 03:05 PM, rantingrick wrote: > On Feb 1, 1:35 pm, John Nagle wrote: >> On 1/31/2011 2:17 PM, Kevin Walzer wrote: >> >>> It certainly would be interesting to see a fresh approach to IDLE... >> >> The future of "playing with Python" is probably Python in a browser >> window, of which t

Re: WxPython versus Tkinter.

2011-01-27 Thread Corey Richardson
On 01/27/2011 09:53 PM, alex23 wrote: > rantingrick wrote: >> You'll need to read that snippet in context to understand what i was >> talking about. Again, see my "tip of the day" in my last post to you. > > Pass. I'd have to see value in what you say inside of the endless > masturbatory self-agg

Re: WxPython versus Tkinter.

2011-01-27 Thread Corey Richardson
On 01/27/2011 05:08 PM, rantingrick wrote: >> wxPython is the best and most mature cross-platform GUI toolkit, given a >> number of constraints. The only reason wxPython isn't the standard >> Python GUI toolkit is that Tkinter was there first. >> -- Guido van Rossum > > You forgot to put a date on

Re: WxPython versus Tkinter.

2011-01-27 Thread Corey Richardson
On 01/27/2011 04:10 PM, rantingrick wrote: > On Jan 27, 2:00 pm, Terry Reedy wrote: >> On 1/27/2011 12:54 PM, Octavian Rasnita wrote: >> >>> Everything that's not accessible is not recommended. >> >> By you. We get that. >> >> >Tkinter should be at most accepted because there is no better solutio

Re: WxPython versus Tkinter.

2011-01-26 Thread Corey Richardson
On 01/26/2011 01:18 AM, Octavian Rasnita wrote: > From: "rantingrick" > On Jan 25, 3:41 pm, Corey Richardson wrote: > >> Do you honestly think he was talking about the accessibility problem? >> IMO that should move to another thread, because this one is simply &g

Re: WxPython versus Tkinter.

2011-01-25 Thread Corey Richardson
On 01/25/2011 03:55 PM, Octavian Rasnita wrote: > >> this thread was a "psy-ops" (psychological >> operations) trick to turn off wxPython adopters by associating it with >> juvenile nonsense > > Do you think the need for accessibility is a nonsense? > Or do you think it is something juvenile? >

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
idea why, I've never used wxPython before today. Unfortunately, it doesn't actually show the items in the directory. Since I'm definitely not a wxPython user, would you mind making the above work, rantingrick? Not trying to worm out of anything, but this is way over my head.

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 09:29 PM, rantingrick wrote: On Jan 23, 8:07 pm, Corey Richardson wrote: because imageIdx is just a dictionary, No, imageIdx is an integer. You're right. imageIdx = self.imageMap[iconname] I confused imageIdx with self.imageMap. But that still doesn't fix my p

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 08:28 PM, rantingrick wrote: On Jan 23, 6:30 pm, Corey Richardson wrote: On 01/23/2011 07:07 PM, rantingrick wrote: On Jan 22, 6:07 pm, rantingrickwrote: I await any challengers... WxPython Challenge 1 code updated... * Fixed tab traveral * Removed hand

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 08:50 PM, rantingrick wrote: On Jan 23, 7:40 pm, Corey Richardson wrote: Why can't we use a TreeCtrl? If we can't use all our widgets, why can you use all yours? ~Corey Columns Corey, the key word here is "columns". One more time...COOLUUUMMMNNNSS

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
x27;t use all our widgets, why can you use all yours? ~Corey -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
-challenges Good luck! Still doesn't fix the problem of the code not working on Linux boxes. Maybe wxPython isn't the best option, it doesn't appear very cross-platform. Still getting: Loading Images: -- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/file.bmp, file.bmp -- /home/

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
. Here is the output on my system (Linux Mint 64bit): /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps Loading Images: -- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/file.bmp file.bmp -- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/folder.bmp folder.bmp -- /home/corey/Downloads/Wx_Tk_Challenge/B

Re: A and B but not C in list

2011-01-23 Thread Corey Richardson
On 01/23/2011 04:05 PM, CM wrote: In Python, is there a recommended way to write conditionals of the form: "if A and B but not C or D in my list, do something." ? I may also have variations on this, like "if A but not B, C, or D". Do I have to just write out all the if and elifs with all poss

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 05:18 AM, rusi wrote: Tried the code with debian sid and default python (2.6) I get (after some loading... statements) Segmentation fault [Actually this is the first time in my 10 years of python that Ive seen a pure python module segfault :-) ] I also have a segfault. You sho

Re: Need GUI pop-up to edit a (unicode ?) string

2011-01-22 Thread Corey Richardson
nd easy, comes built into Python. Looks like you need two labels, an entry, and a button. When I was learning Tkinter I used http://effbot.org/tkinterbook/. Hope it helped, ~Corey -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Corey Richardson
On 01/18/2011 11:15 PM, rantingrick wrote: > On Jan 18, 10:10 pm, Corey Richardson wrote: > >> That is a pretty large dependency to rely on, and it is rather >> undesirable IMO. > > And what exactly is undesirable? Unless you actually back up your > statements with

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Corey Richardson
On 01/18/2011 10:54 PM, Adam Skutt wrote: > On Jan 18, 9:27 pm, Corey Richardson wrote: >> >> Why would you add in only a part of wxPython, instead of all of it? Is >> the work to cut it down really an advantage over the size of the full >> toolkit? From what I just che

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Corey Richardson
On 01/18/2011 10:24 PM, rantingrick wrote: > On Jan 18, 9:02 pm, Corey Richardson wrote: > >> If that's what you believe, I don't think many (if any) here have an >> issue with replacing Tkinter with something that has more features and >> is just as easy to use

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Corey Richardson
On 01/18/2011 09:46 PM, rantingrick wrote: > On Jan 18, 8:27 pm, Corey Richardson wrote: > >> You mentioned having a segment of wxPython in the stdlib earlier. If >> this actually feasible from a legal standpoint, and would the >> maintainers of wxPython be willing to p

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Corey Richardson
On 01/18/2011 09:16 PM, rantingrick wrote: > On Jan 18, 7:59 pm, Corey Richardson wrote: >> On 01/18/2011 08:41 PM, rantingrick wrote: > >> >From that, it appears we need to: >> >> 1. Replace Tkinter with something more modern and feature-complete, but >&g

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Corey Richardson
On 01/18/2011 08:41 PM, rantingrick wrote: > On Jan 18, 7:19 pm, Corey Richardson wrote: > >> I for one am quite pleased with Tkinter up to this point. It allowed me >> to come in with extremely minimal GUI experience, and make something >> that worked with minimal

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Corey Richardson
hy should Tkinter be replaced? Why was it added there in the first place? What should replace it, and why? Instead of arguing about little piddly details like the difference between a button and a hyperlink, just stick to the task at hand that you yourself presented. My two cents, ~Corey -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex url

2011-01-15 Thread Corey Richardson
On 01/15/2011 08:48 PM, Jean-Francois wrote: > Hi, > > I try to match the following url with one regex > > /hello > /hello/ > /hello/world > /hello/world/ > > > world is a variable, I can put toto instead > > Thanks ! What was the regex you tried, and where did it fail? I'm no re guru, but he

Re: cipher encoding

2011-01-12 Thread Corey Richardson
On 01/12/2011 07:39 PM, Corey Richardson wrote: > On 01/12/2011 07:35 PM, Cathy James wrote: >> Dear all, >> >> I hope someone out there can help me. >> >> The output string of my code is close to what i need, but i need it >> 1)printed on one line a

Re: cipher encoding

2011-01-12 Thread Corey Richardson
On 01/12/2011 07:35 PM, Cathy James wrote: > Dear all, > > I hope someone out there can help me. > > The output string of my code is close to what i need, but i need it > 1)printed on one line and > 2) reversed > > #mycode: > s= input("Enter message: ") > key=1 > for letter in s: > num=(

Re: Python use growing fast

2011-01-10 Thread Corey Richardson
On 01/10/2011 10:24 PM, Dan Stromberg wrote: > On Mon, Jan 10, 2011 at 5:22 PM, Krzysztof Bieniasz > wrote: >>> Also depends on how one defines "popularity" in the context of >>> programming languages. >> >> Tiobe quite clearly states what they mean by the name "popularity". >> Namely the number o

Re: What INI config file module allows lists of duplicate same-named options?

2011-01-09 Thread Corey Richardson
ger. > > > -- > I'm a pessimist about probabilities; I'm an optimist about possibilities. > Lewis Mumford (1895-1990) > Seems to me to be a standard enforced by Windows itself, not any an issue with the modules. What exactly are you doing? ~Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: compute the double square...... :(

2011-01-08 Thread Corey Richardson
> try: > a = int(a) > except: > print("not an integer") > exit(1) > Here it would be better to use: if type(a) != int print("Not an integer") exit(1) > count = 0; > count = count + 1; > if (x == a**2 + b**2): > > print "double square" ~Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: student question

2011-01-07 Thread Corey Richardson
;>>> for line in q_file: > print line # prints nothing > > ...why does it print nothing? IIRC, iterating through the lines in a file moves the cursor (is that the correct term?) to the end of the file. After the first one, use q_file.seek(0) to go back to the start. I

Re: Google Chart API, HTTP POST request format.

2011-01-05 Thread Corey Richardson
I moved from the API's. Should I change version just for > these library's? > > Should I be learning Python on 3.1? > > Awesome! > > [snip] I swapped from 3 to 2.6 a while back, better support for modules, and not really losing much in the way of features. ~

Re: Just Starting in on programming

2011-01-04 Thread Corey Richardson
e, and I learned a lot. #python recommends http://www.greenteapress.com/thinkpython/html/index.html in the topic, and the Python tutorial at http://docs.python.org/tutorial/ is quality, you may learn quite a bit from it. If you have questions, I suggest you look into the tutor mailing list, tu..

Re: PExpect Cross-Platform Alternative

2010-02-12 Thread corey goldberg
implementation of Expect that claims to run on Windows also: http://code.google.com/p/python-expect/ -Corey -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >