class in c subclasses python classes, called in python

2010-11-25 Thread alex goretoy
with ABC(*args, **kwargs) is there a way to do this? Thanks in advance :) Thank you, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

ssh browser? where?

2010-09-05 Thread alex goretoy
much at python and I think your smart... :) Thank you, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: ssh browser? where?

2010-09-05 Thread alex goretoy
often. But I understand not everyone will be likely to do this. Thank you, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: running .py files on Linux

2010-04-26 Thread alex goretoy
make sure the tar, zip or package you downloaded isn't corrupt. verify it with a md5sum and then extract it. just a thought. Thank you, -Alex Goretoy http://launchpad.net/~a1g On Mon, Apr 26, 2010 at 11:05 AM, Tingting HAN hihigh...@gmail.com wrote: Dear Officer, I downloaded a C code packet

Re: Encryption source code with md5

2010-03-28 Thread alex goretoy
it. This is not c,c++, php or java man/woman. Good luck. Thank you, -Alex Goretoy http://launchpad.net/~a1g On Sun, Mar 28, 2010 at 12:59 AM, catalinf...@gmail.com catalinf...@gmail.com wrote: Dear friends . I have two simple questions: It is possible to encrypt with md5 python source code

Re: execute bash builtins in python

2010-03-22 Thread alex goretoy
/libpixman-1.so.0.14.0 005ca000-005e r-xp 08:06 199106 /usr/lib/libdirect-1.2.so.0.7.0 Thank you, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: execute bash builtins in python

2010-03-22 Thread alex goretoy
if at all possible Thank you, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: execute bash builtins in python

2010-03-22 Thread alex goretoy
actually using the -i param in the command to subprocess doesn't seem to work as well as setting PS1 to some garbage, it starts a new interactive shell therein kicking me out of python. :/ Thank you, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: execute bash builtins in python

2010-03-21 Thread alex goretoy
. Expect the next release sometime late next week, if you interested in the app. find it on launchpad. :) Enjoy. Thank you, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: EURO GIRLS MISS EUROPE MISS FRENCH FRENCH PRETTY GIRLS SEXY FRENCH GIRLS on www.sexyandpretty-girls.blogspot.com SEXY RUSSIAN GIRLS SEXY GREEK GIRLS SEXY DUTCH GIRLS SEXY UK G

2010-03-20 Thread alex goretoy
what do i do to remove this crap? how do i moderate it? why not gpg sign messages on python-list that way you know your authorized to post and spammers will have one more vector to deal with, there in stopping the not so leet -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: EURO GIRLS MISS EUROPE

2010-03-20 Thread alex goretoy
On Sat, Mar 20, 2010 at 1:37 PM, D'Arcy J.M. Cain da...@druid.net wrote: aybe it's time to stop gatewaying the newsgroup to the mailing list. As a test I have moved all Python posts from gmail.com with a Newsgroup header into ok thx, I'm learning as I go along -Alex Goretoy -- http

Re: execute bash builtins in python

2010-03-13 Thread alex goretoy
I found this to be even better; maybe someone will find this useful, who knows. just export PS1, duh Popen([bash -c 'export PS1='python'; source $HOME/.bashrc;alias'],shell=True,stdout=PIPE).stdout.read() -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: execute bash builtins in python

2010-03-12 Thread alex goretoy
` export FUNCTIONS=`declare -F|awk '{print $3}'|xargs` use this at the end or the .bashrc and then you can access defined aliases and functions inside python with environ -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

execute bash builtins in python

2010-03-11 Thread alex goretoy
() '' thank you, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: datelib pythonification

2010-03-09 Thread alex goretoy
are practically helping me expand on my knowledge in this realm :) I haven't touched it in a little bit so after I mess with it again I'll be able to add more this thread/lib or whatever. Thanks Again, -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: datelib pythonification

2010-03-09 Thread alex goretoy
I have another quick question. What would be the best way to implement dates length function? or should i just leave that up to the user using the lib? -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: datelib pythonification

2010-03-09 Thread alex goretoy
)) Is this bloating the lib with unnecessary functions/methods? -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: Starting Python from the terminal with no welcome message

2010-02-28 Thread alex goretoy
was configured as i486-linux-gnu. (gdb) with that $ gdb -q (gdb) -- http://mail.python.org/mailman/listinfo/python-list good idea, could be very useful. I don't think I recall seeing that option in python. +1 -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple console windows for a single program?

2010-02-28 Thread alex goretoy
is have a separate window for each. Is my only option to make my own console windows using TK or something? Thanks in advance, Blake B -- http://mail.python.org/mailman/listinfo/python-list you can also use python-vte -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: loop through each line in a text file

2010-02-26 Thread alex goretoy
I smell homework -- http://mail.python.org/mailman/listinfo/python-list

Re: Variable definition

2010-02-26 Thread alex goretoy
', 'prefix_blue', 'prefix_green', 'prefix_red'] -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating variables from dicts

2010-02-25 Thread alex goretoy
The problem i see with using globals() is that it can overwrite a previously defined function or key within the global namespace, making the code potentially dangerous and wild with exploits. my $0.02 -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: Starting with Classes - basic problem

2010-02-22 Thread alex goretoy
you need to define init with two underscores, I've made that mistake myself long long time ago :) def __init__ not def _init_ -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: datelib pythonification

2010-02-20 Thread alex goretoy
): if(type(targs[0])==type(date.today()) and targs[1] == type(date.today())): start,end=(targs[0],targs[1]) return end-start -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: Man Bites Python

2009-04-16 Thread alex goretoy
+1 Aahz -Alex Goretoy http://www.goretoy.com Mitch Hedberghttp://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html - I drank some boiling water because I wanted to whistle. On Thu, Apr 16, 2009 at 2:32 PM, Roy Hyunjin Han starsareblueandfara...@gmail.com wrote: Hahaha! On Thu, Apr 16

Re: How to create a virtual serial port?

2009-04-11 Thread alex goretoy
A number of vendors (Keyspan, Belkin) make USB serial ports. FWIW, I use one here on this iMac and OS X with screen(1) and a null modem cable to act as a serial console for a headless Linux box. +1 -Alex Goretoy http://www.goretoy.com Norman Mailerhttp://www.brainyquote.com/quotes/authors/n

Re: A request (was: how to repeat function definitions less

2009-03-25 Thread alex goretoy
my messages are _not_ spam. -Alex Goretoy http://www.goretoy.com Robert Benchley - I have tried to know absolutely nothing about a great many things, and I have succeeded fair... -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda forms and scoping

2009-03-22 Thread alex goretoy
]() inside a d[c][1]() inside b d[c(d[c][0],d[c][1])] inside a inside b Traceback (most recent call last): File stdin, line 1, in module KeyError: None where function a and b are bound in function c -Alex Goretoy http://www.goretoy.com Samuel Beckett - Birth was the death of him. On Sun, Mar

Re: Lambda forms and scoping

2009-03-22 Thread alex goretoy
and return from a bound function 2 bollox=42 d={bollox: (c,(func1,func2)} # call c, which is bound, passing in func1 and func2 unbound, function pointer print d[bollox][0](func1,func2,name=fred flinstone,apple=bollox) fred flinstone has 42 apples -Alex Goretoy http://www.goretoy.com Fred Allen

Re: Lambda forms and scoping

2009-03-22 Thread alex goretoy
Ah, so this is a terminology issue. I'd say that a and b are *called* in function c, not *bound*. I've never seen bind used in this sense before, but as Humpty Dumpty said to Alice: i use the word expressively -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo

Re: Is python worth learning as a second language?

2009-03-21 Thread alex goretoy
limiting, but I will try to hack it to do things for me anyway. maybe uploading my own libs and import those or upload python into the project, not sure yet, thats why I may go with django -Alex Goretoy http://www.goretoy.com Samuel Beckett - Birth was the death of him. On Sat, Mar 21, 2009 at 3:17

Re: __init__ vs. __del__

2009-03-21 Thread alex goretoy
__init__ is the object construction(initialization) faze __del__ is the object destruction faze, I think GC also happens, not sure -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python worth learning as a second language?

2009-03-21 Thread alex goretoy
I think Python in general maybe slower than PHP(from what I read), but it is still fast enough for my project needs -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python worth learning as a second language?

2009-03-21 Thread alex goretoy
oh yeah, your welcome. I'm just leaning, so I'm glad to help someone else learn as well. -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda forms and scoping

2009-03-20 Thread alex goretoy
as rename function a() #bind call to address space hope this helps -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: precision question

2009-03-20 Thread alex goretoy
I think you are looking for this: (math.pi - (math.sqrt(math.pi)))**2 1.8745410610157363 simple, multiplication and division have a higher precedence over addition and subtraction -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python worth learning as a second language?

2009-03-20 Thread alex goretoy
it too, so that adds to how powerful it is. -Alex Goretoy http://www.goretoy.com Samuel Beckett - Birth was the death of him. 2009/3/20 Tomasz Rola rto...@ceti.com.pl On Thu, 19 Mar 2009, Aahz wrote: --===0027953262== In article 49b58b35$0$3548$426a7...@news.free.fr

Re: A request (was: how to repeat function definitions less

2009-03-16 Thread alex goretoy
sorry, I'll try to keep it cool -Alex Goretoy http://www.goretoy.com On Mon, Mar 16, 2009 at 2:08 AM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote: On Sun, 15 Mar 2009 23:18:54 -0500, alex goretoy aleksandr.gore...@gmail.com declaimed the following in gmane.comp.python.general: what is I

Re: print - bug or feature - concatenated format strings in a print statement

2009-03-16 Thread alex goretoy
print(10 + 20 % 7) a bug or a feature? It is a feature print ((10+20) % 7) -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question: How do I add elements to **kwargs in a function?

2009-03-16 Thread alex goretoy
: if key not in self: self[key] = other[key] -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

cool things you can do with dict

2009-03-16 Thread alex goretoy
() class pdict(dict): pass ... a.b.b.a=pdict() a.b.b {} a.b.b.__dict__ {'default': None, 'a': {}} a.b.b.__dict__['a'] {} a.b.b.__dict__['a'].x=4 a.b.b.__dict__['a'].x 4 a.b.b.a.x 4 Anyone else know anymore cool pieces of code? -Alex Goretoy http://www.goretoy.com Jean Anouilh - What you get

Re: having a function called after the constructor/__init__ is done

2009-03-16 Thread alex goretoy
__del__ I use it to close a mysql connection -Alex Goretoy http://www.goretoy.com E. B. White - Be obscure clearly. On Mon, Mar 16, 2009 at 10:11 PM, thomas.han...@gmail.com thomas.han...@gmail.com wrote: Hi all, We've been breaking our heads over a good way of accomplishing an on_load

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
sweet, I've been wondering how those work. I've read some stuff about them and still doesn't make sense to me. Why would I want to use itPlease explain, thank you -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 1:05 AM, Michele Simionato michele.simion...@gmail.com wrote

suggestion for python function calling

2009-03-15 Thread alex goretoy
().().() or fuck(().()) or something like that, I'mma go to sleep nowI think this way it might the language even stonger, but who knows, what do you all think? Not trying to make it like ruby, just more options to the interpreter, and syntax styles -Alex Goretoy http://www.goretoy.com -- http

Re: suggestion for python function calling

2009-03-15 Thread alex goretoy
basically import os def quacks(self,value): return (1,0)[value] _aduck=~/goose duck = if os.path.exists quacks str(_aduck) duck()() or does this get in the way with some other pre-existing syntax interpretation implementations? -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009

Re: suggestion for python function calling

2009-03-15 Thread alex goretoy
believe -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 2:08 AM, alex goretoy aleksandr.gore...@gmail.comwrote: import os def quacks(self,value): return (1,0)[value] _aduck=~/goose duck = if os.path.exists quacks str(_aduck) duck()() -- http://mail.python.org/mailman

Re: suggestion for python function calling

2009-03-15 Thread alex goretoy
or use . (dot) where variable and () (parans) where function duck()(). or duck.().() or for long sentences duck.[].()()... using dot seperator or double dot separator for application where its currently not being used, but for syntax errors -Alex Goretoy http://www.goretoy.com On Sun, Mar 15

Re: suggestion for python function calling

2009-03-15 Thread alex goretoy
maybe this is like decorators -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 2:20 AM, alex goretoy aleksandr.gore...@gmail.comwrote: or use . (dot) where variable and () (parans) where function duck()(). or duck.().() or for long sentences duck.[].()()... using dot

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
I will also actually need to nest it like so d={ site_name:[s,site,' sites','site_name','site_names'], jar_name:[j,jar,'jars','jar_name','jar_names'], options:{ src_name:[ss,src,source], mod_name:['m',mod,'mods',module,modules], } -Alex Goretoy http

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
this means i have to check if d[i] is list or dict and iterate over properties -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 1:03 PM, alex goretoy aleksandr.gore...@gmail.comwrote: I will also actually need to nest it like so d={ site_name:[s,site,' sites','site_name

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
,y,z) ) Thanks to all of you for helping me learn python -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 1:05 PM, alex goretoy aleksandr.gore...@gmail.comwrote: this means i have to check if d[i] is list or dict and iterate over properties -Alex Goretoy http://www.goretoy.com

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
Michele I tried your way but I dont seem to have a good grasp on the concept yet, will read up more for now I think I will try to make it work same way as colors only with decorator as def inside def instead of @, that doesn't make sense quite yet -Alex Goretoy http://www.goretoy.com On Sun

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
] } pynutbutter will be really good soon, thx for your help :) I'm glad to be doing this in python -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 3:30 PM, alex goretoy aleksandr.gore...@gmail.comwrote: Michele I tried your way but I dont seem to have a good grasp on the concept

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
('='))-1): _args=self.args[_argsi].split(=) print (printing A:,_args) _set_arg(_arg[0],_arg[1]) -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 3:56 PM, alex goretoy aleksandr.gore...@gmail.comwrote: this is the final result of the args i

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
['properties'].keys(): self.opt[i] = getattr(self.opt['properties_object'], i) but not like this: for i in self.opt['properties'].keys(): setattr(self, opt[i], getattr(self.opt['properties_object'], i)) -Alex Goretoy http

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
what is I just set colors: self.opt['arg_opts_options']['imp_colors'] then they are both pointing to the same place, correct? -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 11:16 PM, alex goretoy aleksandr.gore...@gmail.comwrote: i did this because this will read colors

Re: __import__ with dict values

2009-03-14 Thread alex goretoy
in self.final_funcs.keys(): if self.final_funcs[ff]: exec ( ff ) self.soc.me_him(['EXIT:',__name__],self.func_me_color) Thank you, -Alex Goretoy http://www.goretoy.com On Fri, Mar 13, 2009 at 11:56 PM, Gabriel Genellina gagsl-...@yahoo.com.arwrote: prevents

Re: __import__ with dict values

2009-03-14 Thread alex goretoy
I'm actually still getting to this section of my code, I've been working a logging,stdout colors lately, Although I am going to need __import__ in several places in this program -Alex Goretoy http://www.goretoy.com On Sat, Mar 14, 2009 at 3:05 AM, alex goretoy aleksandr.gore...@gmail.comwrote

Re: __import__ with dict values

2009-03-14 Thread alex goretoy
I can show you people more code if you want :) I like to learn -Alex Goretoy http://www.goretoy.com On Sat, Mar 14, 2009 at 3:09 AM, alex goretoy aleksandr.gore...@gmail.comwrote: I'm actually still getting to this section of my code, I've been working a logging,stdout colors lately

Re: __import__ with dict values

2009-03-14 Thread alex goretoy
#list( ( self.__setattr__(x.replace(b_,),getattr(B,x)) for x in dir(B) if x.startswith(b_) ) ) for smoke in dir(crack): if smoke.startswith(b_): setattr(self, smoke[2:], getattr(crack, smoke)) -Alex Goretoy http://www.goretoy.com On Sat, Mar 14, 2009

Re: converting a string to a function parameter

2009-03-14 Thread alex goretoy
): self.reaper(value,self.colors['default'],ERROR) self.space() else: self.grow(self.log(value,level)) -Alex Goretoy http://www.goretoy.com On Fri, Mar 13, 2009 at 4:45 PM, Aaron Brady castiro...@gmail.com wrote: On Mar 13, 3:21 pm, Paul McGuire pt...@austin.rr.com

Re: converting a string to a function parameter

2009-03-14 Thread alex goretoy
This is a file that is going into the new version of python-stdout-colors project location: http://code.google.com/p/python-stdout-colors/ -Alex Goretoy http://www.goretoy.com On Sat, Mar 14, 2009 at 10:45 AM, alex goretoy aleksandr.gore...@gmail.comwrote: My new class I've been working

how to repeat function definitions less

2009-03-14 Thread alex goretoy
,level) -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: how to repeat function definitions less

2009-03-14 Thread alex goretoy
] is not : self.opt['properties']['imp_downloads'] = .join(__options[1]) self.soc.debug( %s%(args imp_downloads: ,self.opt['properties']['imp_downloads']) ) -Alex Goretoy http://www.goretoy.com On Sat, Mar 14, 2009 at 6:54 PM, MRAB goo...@mrabarnett.plus.com

Re: how to repeat function definitions less

2009-03-14 Thread alex goretoy
'], ... } Once again, I haven't been sleeping regularly latelyworking on pynutbutter 24/7...Thanks for all your help -Alex Goretoy http://www.goretoy.com On Sat, Mar 14, 2009 at 10:02 PM, alex goretoy aleksandr.gore...@gmail.comwrote: Nice, this is good code. Thank you. Seeing as we

Re: __import__ with dict values

2009-03-13 Thread alex goretoy
) if x.startswith(b_) ) ) -Alex Goretoy http://www.goretoy.com On Fri, Mar 13, 2009 at 1:46 AM, Lie Ryan lie.1...@gmail.com wrote: Gabriel Genellina wrote: En Thu, 12 Mar 2009 09:27:35 -0200, alex goretoy aleksandr.gore...@gmail.com escribió: note i would still like to be able to do

__import__ with dict values

2009-03-12 Thread alex goretoy
? d['syspath']=__import__(d['sys']) Meaning, when I do this doesn't work. Which makes sense. d['syspath']() d['syspath'].d['path'] but this works both with fromlist and without. d['syspath'].path -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: __import__ with dict values

2009-03-12 Thread alex goretoy
I have resolved this problem in my code. It has something to do with your current working directory when you append cwd/jars to sys.path and try to import from interactive console -Alex Goretoy http://www.goretoy.com On Thu, Mar 12, 2009 at 4:58 AM, alex goretoy aleksandr.gore...@gmail.comwrote

Re: __import__ with dict values

2009-03-12 Thread alex goretoy
yay, no more exec (import + sys) in my code -Alex Goretoy http://www.goretoy.com On Thu, Mar 12, 2009 at 5:42 AM, alex goretoy aleksandr.gore...@gmail.comwrote: I have resolved this problem in my code. It has something to do with your current working directory when you append cwd/jars

Re: __import__ with dict values

2009-03-12 Thread alex goretoy
or eval for that matter -Alex Goretoy http://www.goretoy.com On Thu, Mar 12, 2009 at 5:43 AM, alex goretoy aleksandr.gore...@gmail.comwrote: yay, no more exec (import + sys) in my code -Alex Goretoy http://www.goretoy.com On Thu, Mar 12, 2009 at 5:42 AM, alex goretoy

Re: __import__ with dict values

2009-03-12 Thread alex goretoy
note i would still like to be able to do __import__(sys).path maybe if __import__ had __str__ defined, How is my thinking on this? and how would I achieve something like this? -Alex Goretoy http://www.goretoy.com On Thu, Mar 12, 2009 at 5:44 AM, alex goretoy aleksandr.gore...@gmail.comwrote

Re: __import__ with dict values

2009-03-12 Thread alex goretoy
__import__(opt['imp_mod']).options eval(opt['imp_mod']+.+opt['imp_opt']) how to make top work like bottom? -Alex Goretoy http://www.goretoy.com On Thu, Mar 12, 2009 at 5:56 AM, alex goretoy aleksandr.gore...@gmail.comwrote: note i would still like to be able to do __import__(sys).path

Re: __import__ with dict values

2009-03-12 Thread alex goretoy
and files_name, also many other variable that overwrite the configuration that is set from the jar.properties This was working when I was using exec and eval. I was not able to just use exec I had to use exec on import and eval on module.module it was wierd, can someone tell me why? -Alex Goretoy http

[PyGTK] Singleton Window

2009-03-05 Thread alex goretoy
) self.singleton_child_window.add(self.vbox) self.vbox.show() self.label = gtk.Label(SINGLETON) self.vbox.pack_start(self.label,False,False,0) self.label.show() def main(self): gtk.main() if __name__ == __main__: singleton = Singleton_Test() singleton.main() -Alex Goretoy http://www.goretoy.com -- http

Re: [PyGTK] Singleton Window

2009-03-05 Thread alex goretoy
Correction, it's not True singleton. -Alex Goretoy http://www.goretoy.com On Thu, Mar 5, 2009 at 10:38 PM, alex goretoy aleksandr.gore...@gmail.comwrote: Hello All, I am trying to create a singleton window in pygtk and for the life of me can't seem to figure out a better way to go

Re: Explanation for trailing comma in example from Learning Python?

2009-02-19 Thread alex goretoy
Thank you for clerification Christian, when using trailing comma with print statement/function, does it not mean to output newline after printed data? -Alex Goretoy http://www.goretoy.com On Thu, Feb 19, 2009 at 2:54 PM, Christian Heimes li...@cheimes.de wrote: Carl Schumann wrote: I could

Re: Python Module for console text formatting?

2009-02-18 Thread alex goretoy
I created a little script for doing stdout coloring for me a while back. Maybe this will get you closer to what you are looking for. It's kinda hackish, but it works. http://code.google.com/p/python-stdout-colors/ -Alex Goretoy http://www.goretoy.com On Wed, Feb 18, 2009 at 10:22 PM

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread alex goretoy
GAE (Google App Engine) uses WSGI for webapps. You don't have to overhead of managing a server and all it's services this way as well. Just manage dns entries. Although, there are limitations depending on your project needs of what libs you need to use. appengine.google.com -Alex Goretoy http

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread alex goretoy
GAE is definitely not suitable in this case... The servers are provided and maintained as part of a large scientific project for which I am providing just a few services... Other groups are running services in other platforms on tomcat through soaplab/instantsoap - but I was hoping to use

Re: GAE read binary file into db.BlobProperty()

2009-02-10 Thread alex goretoy
(urlfetch.Fetch(http://www.example.com/ +k.image).content) img.rotate(90) jpg_data= img.execute_transforms(images.JPEG) k.image_blob=jpg_data k.put() -Alex Goretoy http://www.goretoy.com On Mon, Feb 9, 2009 at 11:07 AM, alex goretoy aleksandr.gore...@gmail.comwrote: How

GAE read binary file into db.BlobProperty()

2009-02-09 Thread alex goretoy
How to read Binary file into GAE(Google App Engine) db.BlobProperty() datastore? -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

GAE open()

2009-02-08 Thread alex goretoy
can't decode byte 0xd0 in position 14: ordinal not in range(128) but when I try to read binary with b, I get IOError. raise IOError('invalid mode: %s' % mode) IOError: invalid mode: b -Alex Goretoy http://www.alexgoretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to host a (Python) project?

2009-02-07 Thread alex goretoy
If you don't mind changing dns entries. You can also use Google App Engine. It's really nice. http://code.google.com/appengine/docs/python/tools/webapp/overview.html -Alex Goretoy http://www.alexgoretoy.com On Fri, Feb 6, 2009 at 1:07 AM, alex goretoy aleksandr.gore...@gmail.comwrote: I use

reconstruct html form in pyGTK window and create dict from pyGTK

2009-02-05 Thread alex goretoy
to construct this dict from a user friendly form in pyGTK Sorry this is alot of questions. Any advise on this matter will be greatly appreciated. Thank you. -Alex Goretoy http://www.alexgoretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to host a (Python) project?

2009-02-05 Thread alex goretoy
I use google code. http://code.google.com/p/pynutbutter -Alex Goretoy http://www.alexgoretoy.com On Thu, Feb 5, 2009 at 6:55 PM, Ben Finney bignose+hates-s...@benfinney.id.au bignose%2bhates-s...@benfinney.id.auwrote: a...@pythoncraft.com (Aahz) writes: In article 6dcb8ce5-c93e-458c

PyNutButter BETA 1.0.0 - Automates CSV data Importation into any website http/https and/or mysql database

2009-01-31 Thread alex goretoy
donate or something somehow. Upcoming Features: use of parsed data from more than one file at a time. pyGTK for ease of configuration creation(any help?) gui creation of custom functions automatic form parsing based on given urls in config -Alex Goretoy http://www.alexgoretoy.com somebodywhoca

Re: ifconfig in python

2009-01-19 Thread alex goretoy
ifconfig -a|grep inet addr|awk '{print $2}' wget http://myip.dk; cat index.html|grep div class=\Box\ rm index.html* this wget prolly better with urllib as prevoiusly noted by Дамјан, hope this helps... -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Tue, Jan 20, 2009

error: cannot invoke setopt() - perform() is currently running

2009-01-14 Thread alex goretoy
it tries to setopt again? Has anyone come across this? Any help in this matter will be highly appreciated, I've spent a week on this and can't seem to figure it out. Googling hasn't brought me any thing except my own codehahaha go figure TIA -- -Alex Goretoy http://www.alexgoretoy.com

Re: error: cannot invoke setopt() - perform() is currently running

2009-01-14 Thread alex goretoy
more info for all: the class I'm trying to use threading on top of called pcrunchly. I've posted it previously on here, but you can find it at this link. http://article.gmane.org/gmane.comp.python.general/604050 How can i make this work with threading Thread? On 1/15/09, alex goretoy

Re: error: cannot invoke setopt() - perform() is currently running

2009-01-14 Thread alex goretoy
sorry for multi posting It's a habit I have. The closest thing I can come up with is this http://pycurl.cvs.sourceforge.net/viewvc/pycurl/pycurl/examples/retriever-multi.py?revision=1.29view=markup but how to make this work with pcrunchly and threading Thread? On 1/15/09, alex goretoy

Re: File layout in development stage

2009-01-11 Thread alex goretoy
sys.path.append() -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Mon, Jan 12, 2009 at 2:00 AM, Steven Woody narkewo...@gmail.com wrote: Hi, Adapted your kindly suggestions in a previous post, I now decide to organize my source tree in a pattern like below: prj

Re: urlopen exception

2009-01-10 Thread alex goretoy
I would try: site=http://www.bput.org/; payloads=scriptalert('xss')/script attack= urllib2.urlopen(site+payloads,80).readlines() -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Sun, Jan 11, 2009 at 2:49 AM, Steve Holden st...@holdenweb.com wrote: Paul Rubin wrote

Re: urlopen exception

2009-01-10 Thread alex goretoy
, in _call_chain result = func(*args) File /usr/local/lib/python2.6/urllib2.py, line 510, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 404: Not Found -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Sun

Re: math module for Decimals

2009-01-06 Thread alex goretoy
./configuremakemake install I didn't do anything else. Like set PYTHONPATH. I solved it though. You can tell by the output it's looking for it in my other python install lib path. Thank you. -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Tue, Jan 6, 2009 at 10:44 AM, Mark

Re: python is great

2009-01-06 Thread alex goretoy
on this research? -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Tue, Jan 6, 2009 at 9:24 PM, Mike Driscoll kyoso...@gmail.com wrote: On Jan 6, 2:24 pm, Joe Strout j...@strout.net wrote: M.-A. Lemburg wrote: On the Mac in particular, if you want your app to run

Re: Python training in Colorado, January 27-30

2009-01-05 Thread alex goretoy
, holes and fun. Why would someone want to pass up the ability to use the same thing in so many more ways than one. It doesn't compute. By all means I'm not trying to steal your thread. Please don't feel that way. -Alex Goretoy http://www.alexgoretoy.com On Mon, Jan 5, 2009 at 6:47 PM, s

Re: math module for Decimals

2009-01-05 Thread alex goretoy
Hmm. Maybe we shouldn't be using this syntax in from_float, if it's the only thing that prevents the trunk version of decimal.py from being used with Python 2.4. On the other hand, from_float isn't going to work until 2.7 anyway, since it uses a whole bunch of new stuff: as_integer_ratio

Re: threading a 10 lines out of a file

2009-01-05 Thread alex goretoy
that would be great. TIA for all your help. -Alex Goretoy http://www.alexgoretoy.com On Mon, Jan 5, 2009 at 6:13 PM, Steve Holden st...@holdenweb.com wrote: re, however, that the CPython implementation won't net you any benefit if all threads are CPU-bound, since due to something called the GIL

Re: threading a 10 lines out of a file

2009-01-05 Thread alex goretoy
researched some stuff awhile ago, but I didn't quite need it then. I just wanted to see what I'm getting into. Any other stuff about this would be appreciated to. Although of topic. Sorry. By the way, I wanted to really thank everyone for all your help. It means a lot to me. -Alex Goretoy http

Re: multiprocessing vs thread performance

2009-01-05 Thread alex goretoy
the thread starts or a for loop. -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Sat, Jan 3, 2009 at 1:31 PM, Nick Craig-Wood n...@craig-wood.com wrote: mk mrk...@gmail.com wrote: After reading http://www.python.org/dev/peps/pep-0371/ I was under impression

  1   2   >