class in c subclasses python classes, called in python

2010-11-25 Thread alex goretoy
onstructor 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

Re: ssh browser? where?

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

ssh browser? where?

2010-09-05 Thread alex goretoy
ys so much at python and I think your smart... :) 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 wrote: > Dear Officer, > I downloaded a C code packet whi

Re: Encryption source code with md5

2010-03-28 Thread alex goretoy
not difficult to reverse 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

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-22 Thread alex goretoy
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
r/lib/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-21 Thread alex goretoy
f courtesyflush. 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"

2010-03-20 Thread alex goretoy
On Sat, Mar 20, 2010 at 1:37 PM, D'Arcy J.M. Cain 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

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: 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
rt ALIASES=`alias|awk '{print $2}'|cut -d = -f 1|xargs` 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
, line 621, in __init__ errread, errwrite) File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory if i add shell=True i get empty string and no thins error message >>> p1=Popen([&quo

Re: datelib pythonification

2010-03-09 Thread alex goretoy
len(self.dates_list(*targs, **dargs)) Is this bloating the lib with unnecessary functions/methods? -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
estions are welcome. I love python and you guys 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: Multiple console windows for a single program?

2010-02-28 Thread alex goretoy
at I want to do 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: Starting Python from the terminal with no welcome message

2010-02-28 Thread alex goretoy
d redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "i486-linux-gnu". > (gdb) > > with that > > $ gdb -q > (gdb) > > > -- > htt

Re: Variable definition

2010-02-26 Thread alex goretoy
: ... for k,v in abc.items(): ...setattr(self,"prefix_%s"%k,v) ... >>> varDic = {'red': 'a', 'green': 'b', 'blue': 'c'} >>> abc=stuff() >>> abc.duuit(varDic) >>> dir(abc) ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'duuit', 'prefix_blue', 'prefix_green', 'prefix_red'] >>> -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: 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
hello all, since I posted this last time, I've added a new function dates_diff and modified the dates_dict function to set timedelta values returned by dates_diff in the returned dict def dates_dict(self,*targs,**dargs): """ dates_dict() - takes params same as prefs()

Re: Man Bites Python

2009-04-16 Thread alex goretoy
+1 Aahz -Alex Goretoy http://www.goretoy.com Mitch Hedberg<http://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> wr

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 Mailer<http://www.brainyquote.com/quotes/author

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
> > 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 -

Re: Lambda forms and scoping

2009-03-22 Thread alex goretoy
'apple'])) #bind call to function 1 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)

Re: Lambda forms and scoping

2009-03-22 Thread alex goretoy
gt; def c(a,b): ... a() ... b() ... >>> d={c:(a,b)} >>> d[c][0]() 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 "", line 1, in KeyError: None where function a and b are bo

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: 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: __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
hat too I can go on forever I maybe will recreate something like that in python, is a good idea, thx GAE is pretty 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 d

Re: Is python worth learning as a second language?

2009-03-20 Thread alex goretoy
ou can use 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 > On Thu, 19 Mar 2009, Aahz wrote: > > > --===0027953262== > > > > In article <49

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: Lambda forms and scoping

2009-03-20 Thread alex goretoy
tion, same 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: 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

cool things you can do with dict

2009-03-16 Thread alex goretoy
: {}} >>> print a.b.c.__dict__ {'default': None, 'z': 3} >>> print a.b.c.z 3 >>> print a.b.c {} >>> a.b.b=peanutsdict() >>> class pdict(dict): pass ... >>> a.b.b.a=pdict() >>> a.b.b {} >>> a.b.b.__dict__ {'de

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

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

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: 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 wrote: > On Sun, 15 Mar 2009 23:18:54 -0500, alex goretoy > declaimed the following in > gmane.comp.python.general: > > > what is I just set

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 wrote: > i did this because this will read colo

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['properti

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
self.opt['properties'][k])) elif a is "download_files": if b is not "": if bool(b): print ("\nDOWNLOAD FILES",b) self.opt[&#

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
on","options"], "imp_set":['s','ss',"sss","set","setting","settings"], "imp_files":["f","fn",'file','files','filename','filenames','file_name&#x

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 O

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
FO": > self._hero(x,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 wrote: > this means i have to check if d[i] is list or dict and iterate over > properties > -Alex Goretoy > htt

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 wrote: > I will also actually need to nest it like so > > d={ >"site_name":["s","site&qu

Re: how to repeat function definitions less

2009-03-15 Thread alex goretoy
r_names'], "options":{ "src_name":["ss","src","source"], "mod_name":['m',"mod",'mods',"module","modules"], } -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 10:51 AM, MRAB wrote: > d={ >>"site_name":["s","site",'sites','site_name','site_names'], >>"jar_name":["j","jar",'jars','jar_name','jar_names'], > > -- http://mail.python.org/mailman/listinfo/python-list

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 wrote: > or use . (dot) where variable and () (parans) where function > > duck()(). > or > duck.().() > or > for long sentences > duck.[].()()... > >

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
s that return something though, I believe -Alex Goretoy http://www.goretoy.com On Sun, Mar 15, 2009 at 2:08 AM, alex goretoy wrote: > import os > def quacks(self,value): > return (1,0)[value] > _aduck="~/goose" > duck = if os.path.exists quacks str(_aduck)

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, Ma

suggestion for python function calling

2009-03-14 Thread alex goretoy
ons later duck().().() 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

Re: how to repeat function definitions less

2009-03-14 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..

Re: how to repeat function definitions less

2009-03-14 Thread alex goretoy
ite_names'], "jar_name":["j","jar",'jars','jar_name','jar_names'], ... } 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

Re: how to repeat function definitions less

2009-03-14 Thread alex goretoy
ions[1] is not "": self.opt['properties']['imp_opt'] = "".join(__options[1]) self.soc.debug( "%s"%("args imp_opt: ",self.opt['properties']['imp_opt']) ) #XXX#13

how to repeat function definitions less

2009-03-14 Thread alex goretoy
self.write(value,color,level) def write(self,value,color="red",level="INFO"): """ write - output message,take value string or list,color="" """ self._hero(value,color,level) -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

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 wrote: > My new class I've been working on migh

Re: converting a string to a function parameter

2009-03-14 Thread alex goretoy
""" me - determines current function prepends class name, takes value=__name__,color="" """ #self.frames() value="".join(str(value)) + "." + "".join(sys._getframe(1).f_code.co_name) sel

Re: __import__ with dict values

2009-03-14 Thread alex goretoy
as smoked during the making #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,

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 wrote: > I'm actually still getting to this section of my code, I've been working a > logging,stdout colors lately, Although I

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 wrote: > I d

Re: __import__ with dict values

2009-03-14 Thread alex goretoy
e(["FUNC NOT FOUND:",pfhpv[pfhpvi],self._pfmp[pfhpv[pfhpvi]]],'red') #if self._pfmp[pfhpv[pfhpvi]]== pfhp: self.opt['data']['defaults'][optv][optvvv]=self.value self.last_item=self.val

Re: __import__ with dict values

2009-03-13 Thread alex goretoy
;,""),getattr(B,x)) for x in dir(B) if x.startswith("b_") ) ) -Alex Goretoy http://www.goretoy.com On Fri, Mar 13, 2009 at 1:46 AM, Lie Ryan wrote: > Gabriel Genellina wrote: > >> En Thu, 12 Mar 2009 09:27:35 -0200, alex goretoy < >> aleksandr.

Re: __import__ with dict values

2009-03-12 Thread alex goretoy
t site_name 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? -Al

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 wrote: > note i would still like to be able to do __imp

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 wrote:

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 wrote: > yay, no more > > exec ("import " + "sys") > > in my code > > -Alex Goretoy > http://www.goretoy.com > > > > On Thu, Mar

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 wrote: > I have resolved this problem in my code. It has something to do with your > current working directory when you append cwd/j

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 wrote: > How would I imp

__import__ with dict values

2009-03-12 Thread alex goretoy
th']]) and how come does above line doesn't give me diff value than below line? 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: [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 wrote: > 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 abo

[PyGTK] Singleton Window

2009-03-05 Thread alex goretoy
de()) self.singleton_child_window.connect("delete_event", lambda w,e: self.singleton_child_window.hide()) self.vbox = gtk.VBox(False, 0) self.singleton_child_window.add(self.vbox) self.vbox.show() self.label = gtk.Label("SINGLETON") self.vbox.pack_start(self.label

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 wrote: > Carl Schumann wrote: > > I coul

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:

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 hopin

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 Go

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 wrote: > How to read Binary

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
deError: 'ascii' codec 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 wrote: > I use google

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 >wrote: > a...@pythoncraft.com (Aahz) writes: > > > In article < > 6dcb8ce5-

reconstruct html form in pyGTK window and create dict from pyGTK

2009-02-05 Thread alex goretoy
ction(filefield2)"} headers = {"filefield1":"somefield","filefield2":"anotherfield"} What would be the best way for me 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

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

2009-01-31 Thread alex goretoy
o. If you can please 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.alexgoret

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 "http://www.alexgoretoy.com somebodywhoca...@gmail.com On Tue, Jan 20, 2009 at 3:42 AM, Дамјан Георгиевски wrote: > Something *like* this could work: > >myip = > urllib2.urlopen('http://whatismyip

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.29&view=markup but how to make this work with pcrunchly and threading Thread? On 1/15/09, alex goret

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 gore

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

2009-01-14 Thread alex goretoy
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.

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 wrote: > Hi, > > Adapted your kindly suggestions in a previous post, I now decide to > organize my source tree in a pattern like below: > &g

Re: urlopen exception

2009-01-10 Thread alex goretoy
"/usr/local/lib/python2.6/urllib2.py", line 427, in error return self._call_chain(*args) File "/usr/local/lib/python2.6/urllib2.py", line 361, in _call_chain result = func(*args) File "/usr/local/lib/python2.6/urllib2.py", line 510, in http_error_default

Re: urlopen exception

2009-01-10 Thread alex goretoy
I would try: site="http://www.bput.org/"; payloads="alert('xss')" 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 wrote: > Paul Rubin w

Re: python is great

2009-01-06 Thread alex goretoy
otancohen.com to that they will > be publicaly accessible. > Any more news on this research? -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Tue, Jan 6, 2009 at 9:24 PM, Mike Driscoll wrote: > On Jan 6, 2:24 pm, Joe Strout wrote: > > M.-A. Lemburg wrote: &g

Re: math module for Decimals

2009-01-06 Thread alex goretoy
}) = 0 mmap2(NULL, 15588, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7f2b000 mmap2(0xb7f2e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2) = 0xb7f2e000 close(4)= 0 close(3) = 0 It's probab

Re: Is there a better algorithm?

2009-01-05 Thread alex goretoy
#x27;age', 18), entry('pic', picture_data, > 'path/to/file')] Gabriel thank you for this. I just now realized I've being doing things the hard way. :) -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Mon, Jan 5, 2009 at 8:58 PM, Gabriel Genellina wro

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread alex goretoy
utput, either logged to pcap output file or by other means. -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Mon, Jan 5, 2009 at 8:14 PM, Grant Edwards wrote: > On 2009-01-05, Kangkook Jee wrote: > > > I'd like to measure number of bytes sent(or recv

Re: Is there a best linux distro for a python hobbyist?

2009-01-05 Thread alex goretoy
+1 for ubuntu -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Tue, Jan 6, 2009 at 12:39 AM, wrote: > Hi, > > I would have to put in a vote for Ubuntu. > > There seems to be a working ubuntu package for most of the things that I > have tried. Instead

Re: Measuring bytes of packet sent from python application

2009-01-05 Thread alex goretoy
Have you looked into scapy? www.secdev.org/projects/*scapy*/ There's another one, it comes with python I think. Can't seem to remember the name. I may be mistaken though. -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Mon, Jan 5, 2009 at 11:23 PM, Kangkook

Re: multiprocessing vs thread performance

2009-01-05 Thread alex goretoy
about How 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 wrote: > mk wrote: > > After reading http://www.python.org/dev/peps/pep-0371/ I was under > > impression that perfo

  1   2   >