GridBagSizer

2006-04-10 Thread ncf
Recently, I came across a presentation about wx.GridBagSizer while trying to look up more info to use it in an application, however, the presentation noted Don't use GridBagSizer. Ever. Can anyone please explain to me why using GridBagSizer would be such a bad idea? Or is this only applicable

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-20 Thread ncf
This section is the cause of the problem: for browser in (mozilla-firefox, mozilla-firebird, mozilla, netscape): if _iscommand(browser): register(browser, None, Netscape(browser)) It's trying to load mozilla-firefox as the exec name

Re: how to get any available port

2005-10-04 Thread ncf
Hmm...perhaps he is trying to do a transfer thing like many chat programs do. Instead of sending large files across a server, you Direct Connect and send the file directly. :shrugs: -- http://mail.python.org/mailman/listinfo/python-list

wxPython equiv. to tag_configure

2005-10-04 Thread ncf
Hi all. I'm trying to do a system where I'm working on a set of windows for both Tkinter and wxPython, and have come across a lovely little bump in the road. Tkinter's Text object has tag_* methods, but I don't know of a good way to do tag-related stuff with wxPython. In the wxWidgets manual, I

Re: wxPython equiv. to tag_configure

2005-10-04 Thread ncf
Errm, can you slap me please? :X Either way, thank you soo much :) -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: FarPy GUIE v0.1

2005-09-28 Thread ncf
Walter Purvis wrote: Is there a URL? Haha. Google :) http://farpy.holev.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: 1 Million users.. I can't Scale!!

2005-09-28 Thread ncf
If you have that many users, I don't know if Python really is suited well for such a large scale application. Perhaps it'd be better suited to do CPU intensive tasks it in a compiled language so you can max out proformance and then possibly use a UNIX-style socket to send/execute instructions to

Re: Will python never intend to support private, protected and public?

2005-09-28 Thread ncf
Do you know any language that has real private and protected attributes? As long as the values are stored in memory, there's always a way to alter and access them. So, IMHO, no program can have truely private/protected values. -- http://mail.python.org/mailman/listinfo/python-list

__call__ in module?

2005-09-27 Thread ncf
I have a feeling that this is highly unlikely, but does anyone in here know if it's possible to directly call a module, or will I have to wrap it up in a class? i.e., import MyMod MyMod.whatever = Hi? MyMod(meow mix) Thanks in advance -Wes --

Re: __call__ in module?

2005-09-27 Thread ncf
My thanks to you and Fredrik Lundh for the quality replies. however much so, I appreciate your moreso descriptive reply. I probably should've been a little more specific in my original query, and have stated that I *did* try it before I posted here asking for help. I was just hoping somebody

Re: __call__ in module?

2005-09-27 Thread ncf
My thanks to you and Fredrik Lundh for the quality replies. however much so, I appreciate your moreso descriptive reply. I probably should've been a little more specific in my original query, and have stated that I *did* try it before I posted here asking for help. I was just hoping somebody

Re: __call__ in module?

2005-09-27 Thread ncf
Thanks for this information. It'd really be interesting to see how well this works for the code I wish to apply it to. Thanks again and have a GREAT day. -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: zlib decode fails with -5

2005-09-27 Thread ncf
I don't mean this harshly, but have you tried recompressing the data to see if you may have had a bad data set? If it still fails, then I'm really not sure why/how zlib decides that there isn't enough room in the output buffer. Z_BUF_ERROR if there was not enough room in the output buffer Sorry

Re: Overhead of individual python apps

2005-09-27 Thread ncf
First, please don't get so upset at people's replies (if you weren't upset, that's how it was coming across, so my apologies). No matter what newsgroup/forum you go to, there's always someone who's going to suggest something like that. Anyways, I'm fairly certain there are some minimalistic

Re: ncurses programming

2005-09-26 Thread ncf
I don't know too much about (n)curses, but I feel that it's worth pointing out that Python has a (built-in?) module named `curses` that supports ncurses as of Python version 1.6. I don't think it'd be necessary to learn how to use ncurses in C first, though. The Python docs for the curses module

Re: ncurses programming

2005-09-26 Thread ncf
I don't know too much about (n)curses, but I feel that it's worth pointing out that Python has a (built-in?) module named `curses` that supports ncurses as of Python version 1.6. I don't think it'd be necessary to learn how to use ncurses in C first, though. The Python docs for the curses module

Re: wxPython MainLoop exception handling problem

2005-09-12 Thread ncf
Errm, maybe you could use the sys.excepthook function to catch the error and then print the details yourself from the traceback object. import sys def _exceptionhook(type, value, traceback): ''' your code here ''' sys.excepthook = _exceptionhook ((untested)) --

Re: Python Database Scripts

2005-09-12 Thread ncf
Hmm...sorry to go a little off topic here, but I, also, have been striving to learn Python/MySQL for a while using MySQL's official thing. Can you please explain to me why one must use a cursor and can't just do an execute on the connction? :confused about the subject: --

Re: encryption with python

2005-09-07 Thread ncf
Steve M wrote: My goal is to combine two different numbers and encrypt them to create a new number that cann't be traced back to the originals. Here's one: def encrypt(x, y): Return a number that combines x and y but cannot be traced back to them. return x + y Or you can use sha1

Re: Traceback Questions

2005-08-21 Thread ncf
Thanks man, I'll definately take a look into this and hopefully port it over and publish it. Have a GREAT day -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: Module Name Conflicts

2005-08-21 Thread ncf
Heh, so long as it works. Sorry for the delay, I've been away for a bit ;P Hope it's all owrking out -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter and gnuplot module

2005-08-18 Thread ncf
Because Tkinter is for GUI development on systems, and thereof, there is no plugin for browsers, I do not believe it to be possible to use Tkinter in a client's browser. If gnuplot.py allows you to save a plot to disk or get the plot's image file as a binary string, it should be possible to send

Re: Module Name Conflicts

2005-08-18 Thread ncf
Maybe what you're looking for is __import__()? help(__import__) Help on built-in function __import__ in module __builtin__: __import__(...) __import__(name, globals, locals, fromlist) - module Import a module. The globals are only used to determine the context; they are not

Traceback Questions

2005-08-18 Thread ncf
I'm just beginning with tracebacks, building off of what I see in asyncore's compact_traceback code, in order to hopefully store all the values from the location in which the exception occured. I'm actually trying to make this into a python bug report system for my current project, and am seeking

Re: Module Name Conflicts

2005-08-18 Thread ncf
I'm honestly not too sure how __import__ works, but I know you can provide a full path to it. Oh well, that was my best guess. I wish I could've been of more help. -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: time.clock() problem under linux (precision=0.01s)

2005-08-18 Thread ncf
Woa, if you don't mind my asking, why do you do a time-cache on your messages? -- http://mail.python.org/mailman/listinfo/python-list

Re: Import question

2005-08-09 Thread ncf
Hmm...thanks for the replies. Judging by this, it looks like I might still be in a slight perdiciment with doing it all, but time will tell. I wish there were a way I could reference across multiple modules. Well, thanks for your help. Hopefully I'll be able to work out some *simple* solution for

Re: Import question

2005-08-09 Thread ncf
Crap. Forgot to mention that in some instances, I do want the class definitions to create new instances and such. Sorry :) -- http://mail.python.org/mailman/listinfo/python-list

Simple Problem

2005-07-24 Thread ncf
I know I've seen this somewhere before, but does anyone know what the function to escape a string is? (i.e., encoding newline to \n and a chr(254) to \xfe) (and visa-versa) Thanks for helping my ignorance :P -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Problem

2005-07-24 Thread ncf
Thank you all for your replies. The repr() solution wasn't exactly what I was looking for, as I wasn't planning on eval()ing it, but the (en|de)code solution was exactly what I was looking for. An extended thanks to Jp for informing me of the version compatibility :) Have a GREAT day :) -Wes --

Re: Aliasing an object's __str__ to a different method

2005-07-22 Thread ncf
In trying to develop a protocol for a current app I'm working on, I was using classes which inherited from object for my core packet, and using str(Message) to convert it to an encoded packet. However, I found that this did not work, and it drove me insane, so in a test file, I wrote the following

Re: Python IDE

2005-07-19 Thread ncf
Honestly, I'm just using Python's own IDLE to do it all. It works rather well for my tastes :) -- http://mail.python.org/mailman/listinfo/python-list

Re: retrieving https pages

2005-07-19 Thread ncf
It might be checking the browser's User-agent. My best bet for you would to be to use something to record the headers your browser sends out, and mimic those in Python. If you look at the source code for urlopener (I think you can press Alt+M and type in urlopener), under the FancyURLopener

Re: Could anyone write a small program to log the Signal-to-Noise figures for a Netgear DG834 router?

2005-07-19 Thread ncf
I'm sure that nobody here is willing to write it for you. However, I believe that jkn was right in trying to get you to solve the problem. ;) You know what you need to do, but how are you going to do it? Create a flow chart ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd behaviour of regexp module

2005-07-13 Thread ncf
To possibly clearify what the others have said, group() is the same as saying group(0). Group is, if I recall correctly, supposed to return the n-th subpattern from the regular expression (subpatterns, as you know, being indicated by parenthises). Hope that helps :) -Wes --

Re: Should I use if or try (as a matter of speed)?

2005-07-09 Thread ncf
Honestly, I'm rather new to python, but my best bet would be to create some test code and time it. -- http://mail.python.org/mailman/listinfo/python-list

Re: pyo contains absolute paths

2005-07-09 Thread ncf
compiled files might be version/architecture dependant. -NcF -- http://mail.python.org/mailman/listinfo/python-list

Threading Question

2005-06-30 Thread ncf
I've used python for a while now, and am startting to dig into threads and sockets (using asyncore/asynchat). Through all this, I've been using the -v option on python to generate verbose output and try to pinpoint any potential problems...however, one warning is eluding me as to it's

Re: Favorite non-python language trick?

2005-06-30 Thread ncf
Hmm...I think it's time I do better justice to what I previously wrote. http://www.artima.com/weblogs/viewpost.jsp?thread=98196 The above article was linked by Python's PEP... -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-30 Thread ncf
Sorry, I realized that shortly after my post =X -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question: how to keep a socket listening?

2005-06-24 Thread ncf
Heh, like I said. I was not at all sure. :P Nevertheless, could this be the problem? =\ -- http://mail.python.org/mailman/listinfo/python-list

Re: End Of Line Confusion

2005-05-18 Thread ncf
First off, my apologies...Google Groups doesn't seem to want to let me reply inline. I refrained from putting the name in there as it's potentially offensive (gotta love America). If you would aid you, I can send you the entire Python script via. email. Editor was IDLE on Slackware Linux using

Re: command to update a web page

2005-05-17 Thread ncf
I can't begin to know too much about this subject, but Python has a builtin httplib module which might be interesting to you. There is also a ftplib if that is how you want to do it. Python's documentation seems to have adequate examples on how to use the two modules. -Wes --

End Of Line Confusion

2005-05-17 Thread ncf
I'm having an odd problem. I'm getting an error from IDLE saying End Of Line detected while scanning single-quoted string. Odd thing is, it's not single-quoted, it's one of the doc-strings (if that's what you call them). In the following code (class name replaced with NAME), the error is being

Re: Python Args By Reference

2005-05-11 Thread ncf
Thanks to everyone for your assistance. I shall reread this a couple times and then try to make something that works. Many thanks and have a GREAT day. -Wes -- http://mail.python.org/mailman/listinfo/python-list

Python Args By Reference

2005-05-10 Thread ncf
Hello all, I was wondering if there was any way to pass arguments (integer and such) by reference (address of), rather than by value. Many thanks in advance. -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Args By Reference

2005-05-10 Thread ncf
As I fail to see how an array could be used in this (my own stupidity?), would you have any such example? For reference, I'm trying to translate this: http://www.cr0.net:8040/code/crypto/sha256/ (Inside sha256_process). Once again, thanks for the patience, I'm still picking up on all the little