How to exec() a string like interactive python does?

2012-06-05 Thread News123
If I start Python in interactive mode, and I yype the commands, 'a=3', 'a', 'print a' Then the output would look like: >>> a = 3 >>> a 3 >>> print a 3 Now within an application I'd like to achieve exactly this behaviour Meaning, that - for assignments nothing is displayed - for expressions t

Re: How to exec() a string like interactive python does?

2012-06-06 Thread News123
On 06/06/2012 12:12 AM, News123 wrote: If I start Python in interactive mode, and I yype the commands, 'a=3', 'a', 'print a' Then the output would look like: >>> a = 3 >>> a 3 >>> print a 3 Now within an application I

Re: How to exec() a string like interactive python does?

2012-06-06 Thread News123
On 06/06/2012 01:31 AM, Steven D'Aprano wrote: On Wed, 06 Jun 2012 00:12:00 +0200, News123 wrote: If I start Python in interactive mode, and I yype the commands, 'a=3', 'a', 'print a' Then the output would look like: >>> a = 3 >>>

best book about Webdesign with Django

2011-06-08 Thread News123
Hi, Do you have any recommendations for a good book about Web design with Django? Thanks for suggestions. -- http://mail.python.org/mailman/listinfo/python-list

Re: best book about Webdesign with Django

2011-06-10 Thread News123
Hi Thomas, APologies for not being clear enough in my question. On 06/09/2011 04:40 PM, Thomas Guettler wrote: > On 08.06.2011 12:29, News123 wrote: >> Hi, >> >> >> Do you have any recommendations for a good book about Web design with >> Django? > > Y

Using django ORM from web browser and from command line apps

2011-06-21 Thread News123
Hi, I'm having a django browser application. There's certain administrative tasks, that I'd like to perform from the command line (cronjob or manually). As these scripts might be huge and might consume quite some memory I'd prefer, that they were not part of the normal application and would just

using only the django ORM (DB access model) and nothing else.

2011-06-21 Thread News123
Hi, I have a small application running on a host without web server and without any need for django except its ORM accessing data bases without explicitely writing sql queries.) I assume there's many libraries (SQL Alchemy or others), which could do this job. and which migh have less overhead tha

Re: Using django ORM from web browser and from command line apps

2011-06-21 Thread News123
Hi Ian, On 06/22/2011 02:09 AM, Ian Kelly wrote: > On Tue, Jun 21, 2011 at 5:39 PM, News123 wrote: >> I'm having a django browser application. >> >> There's certain administrative tasks, that I'd like to perform from the >> command line (cronjob or manu

Re: using only the django ORM (DB access model) and nothing else.

2011-06-21 Thread News123
On 06/22/2011 01:51 AM, News123 wrote: > Hi, > > I have a small application running on a host without web server and > without any need for django except its ORM accessing data bases without > explicitely writing sql queries.) > > I assume there's many libraries (SQL

Re: using only the django ORM (DB access model) and nothing else.

2011-06-21 Thread News123
It seems I found a solution (refer to end of this tessage). Not sure though if there are any drawbacks or if this method of working could cause any other issues. On 06/22/2011 02:42 AM, News123 wrote: > On 06/22/2011 01:51 AM, News123 wrote: >> Hi, >> >> I have a small app

Re: using only the django ORM (DB access model) and nothing else.

2011-06-21 Thread News123
On 06/22/2011 03:04 AM, Ian Kelly wrote: >> >> So I need at least a little more to make my script work. > > There's a bit of magic in the way Django finds things, and I think > you'll still need to keep the basic structure of a Django project -- > models should be in a "models.py" file located in

Re: using only the django ORM (DB access model) and nothing else.

2011-06-21 Thread News123
On 06/22/2011 03:02 AM, Roy Smith wrote: > In article <[email protected]>, > News123 wrote: > > > I don't see any reason you couldn't use the Model layer by itself, if > you want to. It pretty much stands on its own. Thanks a lot fo

Re: Using django ORM from web browser and from command line apps

2011-06-21 Thread News123
On 06/22/2011 03:08 AM, Ian Kelly wrote: > On Tue, Jun 21, 2011 at 6:21 PM, News123 wrote: >> Out of curiousity: Do you know whether the imports would be executed for >> each potential command as soon as I call manage.py or only >> 'on demand'? > > Off the

Re: Free Software University - Python Certificate

2011-03-22 Thread News123
Hi Juan, On 03/22/2011 04:54 AM, Giovani wrote: > Hi all, my name is Juan and I suscribed to this website called "Free > Software University", opened recently. One of the goals of this > website is making some free high quality courses, one of them about > Python. > > I want to say this message

Re: Free Software University - Python Certificate - In reply to Noah Hall

2011-03-29 Thread News123
Hi Loyd, Having a decent front page might help to attract people: Go to http://www.freesoftwareuni.com/ and try to get any useful information except (free / GPL / not accredited / your email address) With out signing in / without registering you don't even see what FSU has to offer / plans

Re: Free Software University - Python Certificate - In reply to Noah Hall

2011-03-29 Thread News123
Hi Loyd, It wasn't me sending you the private email. I'm just a little surprised about this: "if you don't post under your real name you must be a bad person" - attitude. On 03/27/2011 01:15 PM, Lloyd Hardy wrote: > Secondly, if you do use various names and email addresses and play > 'maybe thi

portable way of sending notifying a process

2011-05-28 Thread News123
Hi, I'm looking for a portable way (windows XP / Windows Vista and Linux ) to send a signal from any python script to another one (one signa would be enough) I have several python scripts started from different parent processes occasionally some of the scripts want to tell another to reread it'

Re: portable way of sending notifying a process

2011-05-30 Thread News123
Thanks for all your feedback. Well, I'll play a little and go either for a wrapper around ways to detecth a file change or for a tiny socket solution. Thanks again. On 05/30/2011 04:03 AM, Chris Angelico wrote: > On Mon, May 30, 2011 at 11:44 AM, Chris Torek wrote: >>> What would be a light w

best set of modules for web automation without javascript

2009-02-13 Thread News123
Hi, I'd like to do some web automation with python 2.5 - https: - a cookiejar - some forms to be filled in what is the best set of modules. As far as I understood, there is httplib, but it seems (if I understood well) to be incoompatible with cookielib I'm a newcomer to webautomation with pyt

Re: best set of modules for web automation without javascript

2009-02-13 Thread News123
ments for forms , form fields and field vaules, returning an objcet. that could be modified and posted. bye N Joe Riopel wrote: > On Fri, Feb 13, 2009 at 9:04 AM, News123 wrote: >> Hi, >> I'd like to do some web automation with python 2.5 >> - https: >> - a cook

Re: best set of modules for web automation without javascript

2009-02-13 Thread News123
Hi Marco / Paul, Thanks I'll look into mechanize,ClientForm and BeautifulSoup. All three are now installed. I'll just have to play with them. bye N News123 wrote: > Hi Joel, > > Thanks, > This (the urllib2 methods you combined with cookielib) is what I am > curre

Re: Security implications of using open() on untrusted strings.

2008-11-25 Thread News123
Jorgen Grahn wrote: > Compare with a language (does Perl allow this?) where if the string > is "rm -rf /|", open will run "rm -rf /" and start reading its output. > *That* interface would have been Good example. (for perl): The problem doesn't exist in python open("rm -rf / |") would try t

checking for mis-spelled variable names / function names

2008-11-25 Thread News123
Hi, Let's imagine following code def specialfunc(): print "very special function" name= getuserinput() if name == 'one_name_out_of_a_million': print "Hey your name '%s' is really rare" % namee specialfunk() my python script could survive thousands of runs before falling

python book for non technical absolute beginner

2008-12-06 Thread News123
Hi, One of my 'non technical' friends complained about knowing nothing at all about programming (though using computers regularly for mails / web browsing / googling and downloading / cropping photos ) He wants to play a little with programming to stimulate parts of his otehrwise idle brain cells

Re: Guido's new method definition idea

2008-12-06 Thread News123
Daniel Fetchinson wrote: > The proposal is to allow this: > > class C: > def self.method( arg ): > self.value = arg > return self.value > > instead of this: > > class C: > def method( self, arg ): > self.value = arg > return self.value Hmm, I'd give the p

Re: Learning Python now coming from Perl

2008-12-06 Thread News123
I fully agree with Roy's answer. COding small tasks is a good starting point. For quite some time you'll be of course less efficient than with your previous language, but that's part of the learning curve, isn't it. I guess you'll learn the syntax rather quickly. What's more painful is to learn w

Re: operators as variables

2008-12-06 Thread News123
Terry Reedy wrote: > macc_200 wrote: >> Hi, >> just starting programming and have an elementary question after >> playing around with lists but cannot find the answer with googling. >> I have a list of variables and I would like some of those variables to >> be integers and some to be operators so

Re: Guido's new method definition idea

2008-12-07 Thread News123
the name 'class_elements' was just a suggestion it could be also something like 'auto_prepend_self' or whatever. bye N Dennis Lee Bieber wrote: > On Sat, 06 Dec 2008 19:02:22 +0100, News123 <[EMAIL PROTECTED]> declaimed > the following in comp

Re: Guido's new method definition idea

2008-12-07 Thread News123
Lie wrote: > On Dec 7, 1:02 am, News123 <[EMAIL PROTECTED]> wrote: >> What would be interesting would be some syntactical sugar to get rid of >> the 'self' (at least in the code body). >> >> example: >> class C: >> class_elements a,b,

Re: python book for non technical absolute beginner

2008-12-07 Thread News123
in the 'mathematical induction'. bye N News123 wrote: > Hi, > > One of my 'non technical' friends complained about knowing nothing at > all about programming (though using computers regularly for mails / web > browsing / googling and downloading / cropping phot

Re: Is 3.0 worth breaking backward compatibility?

2008-12-10 Thread News123
Troll? bye N walterbyrd wrote: > IMO: breaking backward compatibility is a big deal, and should only be > done when it is seriously needed. > > Also, IMO, most of, if not all, of the changes being made in 3.0 are > debatable, at best. I can not think of anything that is being changed > that was

Re: Python for kids?

2008-12-10 Thread News123
Hi, [EMAIL PROTECTED] wrote: > On Dec 7, 9:13 pm, "Russ P." <[EMAIL PROTECTED]> wrote: >> I have a 12-year-old son who spends too much time playing Xbox live >> and watching silly YouTube videos. I would like to try to get him >> interested in programming. > . . . > But I think it's better for y

Re: 1 or 1/0 doesn't raise an exception

2008-12-14 Thread News123
Hi. r wrote: > These are just the kind of things that make Python so beautiful ;) > Thanks Guido! You shouldn't forget to thank K&R ;-) Shortcutting logical operation shortcuts existed already in C and has been adopted by quite a lot of programming languages. bye N -- http://mail.python.org/

Re: mysql hash generator in python

2008-12-17 Thread News123
Hi Matias. Could you show us the 'class implementation'? Whether class or not the result should be the same. If it isn't, then there should be a small error. If we have both code versions to look at it's easier to help you. bye N Matías Hernández wrote: > (sorry for my english, but i'm sp

Re: My last working day of 2007

2009-01-05 Thread News123
[email protected] wrote: > Jack> It's simple, a small program running on background, logging the > Jack> title of foreground window. A python script parses the log file > Jack> and then generates chart by matplotlib. > > Jack> I just want to get suggestions to improve it, or know the

Re: How to store passwords?

2009-01-07 Thread News123
Oltmans wrote: > I'm writing a program in which I will ask users to enter user name and > password once only. It's a console based program that will run on > Windows XP. Actually, I'm trying to provide the similar functionality > as "Remember me" thing in browsers. For that, I will need to store >

module dcop.: How to query running apps?

2008-11-09 Thread News123
Hi, I wrote a small application connecting to an application and sending commands to it. Currently I'm using the methods import dcop client = dcop.DCOPClient() client.registerAs(appname) ama = dcopclient.rc = dcop.DCOPRef("amarok", "player") controlling the app works now fine with for example

Where to locate existing standard encodings in python

2008-11-09 Thread News123
Hi, I was googling quite some time before finding the answer to my question: 'what are the names for the encodings supported by python?' I found the answer at http://python.active-venture.com/lib/node127.html Now my question: Can I find the same info in the standard python doc or query python

module cwiid and threading: how to use cwiid.Wiimote without blocking

2008-11-09 Thread News123
Hi, I'm using the module cwiid to conncet to a wiimote. import cwiid wiimote = cwiid.Wiimote() This function is blocking: It waits until it could sucessfully connect to a device or until 20 seconds passed without sucessful connection. As I wanted to do some things even if the wii-mote is not co

Re: Where to locate existing standard encodings in python

2008-11-11 Thread News123
es located there. thanks again and bye N Philip Semanchuk wrote: > > On Nov 11, 2008, at 9:10 AM, News123 wrote: > >> Hi Philip, >> >> Your answer touches exaclty one point, which I was slightly afraid of: >> - The list is not exhaustive >> - python version

Re: module cwiid and threading: how to use cwiid.Wiimote without blocking

2008-11-11 Thread News123
The only solution, that I found was recompiling the libcwiid wrapper, such that it allows threading (the patch existed already on the libcwiid Trac data base, though it's not part of an official release) bye N News123 wrote: > Hi, > > I'm using the module cwiid to c

Re: Where to locate existing standard encodings in python

2008-11-11 Thread News123
r and the other answers bye N Philip Semanchuk wrote: > > On Nov 9, 2008, at 7:00 PM, News123 wrote: > >> Hi, >> >> I was googling quite some time before finding the answer to my question: >> 'what are the names for the encodings supported b

Re: return a value to shell script

2008-11-14 Thread News123
I don't know what exactly your python script is doing and what kind of return value you have, Let's assume your python application prints nothing to stdout, then python could print out the return value and you could get it with the back ticks (reverse single quote) (at least for sh bash csh tcsh a

Re: spam update

2008-11-20 Thread News123
Hi, Grant Edwards wrote: > . . . It does penalizes legitimate users who post > from Google Groups. They've made the choice to use the same > posting conduit as spammers, and presumably they know the > consequences. Hmm I made the chooice to use google groups because sometimes I like to write

Re: can python access OS level features like bash scripting?

2009-04-19 Thread News123
Hi, I think you got lost in the wrong thread. Though your subject line is correct your post threads under "Is there a programming language, that . . . " Perhaps you 'replied' to above thread and changed 'just' the subject line. Chances to get an answer might be higher if you repost your question

the correct way to install python packages as non root user in non default path

2009-04-20 Thread News123
Hi, I'm having an Ubuntu host, but want to (experimentally) install some modules, which are newer than the Ubuntu ones (distros lag always a little behind and some tools need newer versions.) What would be a clean way to do this? I want to be sure, that any 'special hacks' on my host are cleanly

Re: the correct way to install python packages as non root user in non default path

2009-04-21 Thread News123
is may take a while) > Reading http://pypi.python.org/simple/ > No local packages or download links found for install > error: Could not find suitable distribution for Requirement.parse('install') So back to question 1 :-( How do I install non Ubuntu python packages in a local directory? alex

Re: the correct way to install python packages as non root user in non default path

2009-04-21 Thread News123
x27; wasn't inspired by apt-get, but by "python ./setup.py", which also seems to want a 'command' bye N Diez B. Roggisch wrote: > News123 wrote: > >> Hi Alex, >> >> >> Thanks a lot. Reading the description this sounds to be the right thing.

Re: What would YOU like to see in a txt to html converter?

2009-05-07 Thread News123
Florian Wollenschein wrote: > As you might have mentioned I'm just working on a txt to html converter > called "thc". This project is intended for me to learn Python and now > pyQT4 to which I changed a few days ago (started with Tkinter). > > I have implemented the following features so far: > >

Re: Your Favorite Python Book

2009-05-22 Thread News123
Evan Kroske wrote: > Sam Tregar wrote: >> Greetings. I'm working on learning Python and I'm looking for good >> books to read. I'm almost done with Dive into Python and I liked it a >> lot. I found Programming Python a little dry the last time I looked at >> it, but I'm more motivated now so I migh

Re: OT: Can;'t find a Mozilla user group

2009-06-03 Thread News123
Anthra Norell wrote: > I can't run Firefox and Thunderbird without getting these upgrade > ordering windows. I don't touch them, because I have reason to suspect > that they are some (Russian) virus that hijacks my traffic. Occasionally > one of these window pops up the very moment I hit a key an

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-28 Thread News123
r wrote: > more *maybe useful dump? > for i in dev.Items: > for p in i.Properties: > if not p.IsReadOnly: > print p.Name, '->', p.Value > . . . > Horizontal Resolution -> 200 > Vertical Resolution -> 200 > Horizontal Start Position -> 0 . . . > > No

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-28 Thread News123
parameters) is still not solved in python. bye N News123 wrote: > Hi, > > I'm trying to scan a document from a python 2.6 script without user > interaction. > > I found a code snippet, that allows me to scan under Vista, but that > doesn't allow me to select the d

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-28 Thread News123
MRAB wrote: > News123 wrote: >> r wrote: >>> more *maybe useful dump? >>> >>>>>> for i in dev.Items: >>> for p in i.Properties: >>> if not p.IsReadOnly: >>> print p.Name, '->',

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-28 Thread News123
Hi John, John Bokma wrote: > News123 wrote: > >> MRAB wrote: >>> News123 wrote: >>>> r wrote: >>>>> more *maybe useful dump? >>>>> >>>>>>>> for i in dev.Items: >>>>> for p in i.Properties

Re: share dictionary between processes

2009-12-18 Thread News123
Hi Michael, I'm new to the module multiprocessing, but at a first glance it seems, that multiprocessing.Value can only be shared if you create the second process from the first one. Id like to start the first process from the command line and much later the second process from the command line.

python xmlrpc client with ssl client certificates and standard modules

2010-01-03 Thread News123
Hi, I was googling fot quite some time and was not really succesfull. I found one solution, which I will try soon. It is http://www.cs.technion.ac.il/~danken/xmlrpc-ssl.html (found in http://hamakor.org.il/pipermail/python-il/2008-February/29.html ) This will probably work, but it requires t

Re: python xmlrpc client with ssl client certificates and standard modules

2010-01-04 Thread News123
-i 0.0.0.0 -p 443 > > 5) You can now access the service from any Python program: > > >>> import xmlrpclib > >>> server_url = 'https://myserver:443/yourapp/default/call/ > xmlrpc' > >>> server = xmlrpclib.Server(server_url) >

Re: python xmlrpc client with ssl client certificates and standard modules

2010-01-04 Thread News123
help. > > If your server is written already you may be able to use it with the > ssl cherrypy wsgi server (the one that web2py uses) and you do not > need web2py at all. > > Massimo > > On Jan 4, 3:38 am, News123 wrote: >> Thanks for your answer. >> >> I&

Re: python xmlrpc client with ssl client certificates and standard modules

2010-01-05 Thread News123
Hi Martin, Thanks a lot for your reply. It helped me to find the correct solution. Unfortunaltely xmlrpclib.ServerProxy does not allow a host tuple, but just a uri. So the simplest solution, that I found is to create a custom transport import xmlrpclib class SafeTransportWithCert(xmlrpclib.Sa

PyQT 4.6.2 question about radiobuttons

2010-01-14 Thread News123
Hi, As you wll notice: I don't have a lot of GUI and only very litte PyQT-experience. I have a UI created with qt designer. The UI contains a few named radio buttons in a button group. ( for example radioButton_one to radioButton_four ) I am unable locate a signal, that is fired whenever one

start .pyo files with doubleclick on windows

2010-01-24 Thread News123
Hi, I'd like to start .pyo files under windows with a double click. (I know I can just write a .bat wrapper, but somehow it would be more fun to start with a direct double click) Currently this works if the file does not import any other .pyo file. The problem is, that a dobleclick performs

Re: start .pyo files with doubleclick on windows

2010-01-24 Thread News123
Hi Alf, Alf P. Steinbach wrote: > * News123: >> Hi, >> >> >> I'd like to start .pyo files under windows with a double click. > > C:\> assoc .pyo > .pyo=Python.CompiledFile > > C:\> ftype python.compiledfile > python.compiledfile="

Re: problems on installing PyGTK in Windows XP

2009-10-29 Thread News123
Hi Yang, Did you modify the path environment variable to point to your gtk lib? This might be the problem. Below the steps, that I followed. > General instructions are under http://www.pygtk.org/downloads.html > > In detail: > > Install the GTK+ bundle > > * Download the bundle > http

scanning under windows WIA with custom settings (dpi / etc )

2009-11-22 Thread News123
Hi, I'm trying to scan a document from a python 2.6 script without user interaction. I found a code snippet, that allows me to scan under Vista, but that doesn't allow me to select the dpi / color mode / etc. The snippet uses win32com.client # # script start import win32com

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-23 Thread News123
Hi r, r wrote: > On Nov 22, 11:32 am, News123 wrote: > >> - This script works fine for me under Windows 7, however I'm >> unable to specify additional parameters, like dpi and >> color mode. > > I have found something interesting but have no idea H

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-23 Thread News123
Hi r, r wrote: > On Nov 22, 11:32 am, News123 wrote: > >> - This script works fine for me under Windows 7, however I'm >> unable to specify additional parameters, like dpi and >> color mode. > > I have found something interesting but have no idea H

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-25 Thread News123
News123 wrote: > Hi, > > I'm trying to scan a document from a python 2.6 script without user > interaction. > > I found a code snippet, that allows me to scan under Vista, but that > doesn't allow me to select the dpi / color mode / etc. I'm still stuck

simple and fast platform independent IPC

2010-02-03 Thread News123
Hi, I wondered what IPC library might be best simplest for following task? I'm having a few python scripts all running on the same host (linux or win), which are started manually in random order. (no common parent process) Each process might be identified by an integer (1,2,3) or by a symbolic na

Re: simple and fast platform independent IPC

2010-02-03 Thread News123
Hi Gabriel, I'll look at it. I wasn't aware about named pipes for windows. bye N Gabriel Genellina wrote: > En Wed, 03 Feb 2010 05:32:58 -0300, News123 escribió: > >> I'm having a few python scripts all running on the same host (linux or >> win), which are

Re: simple and fast platform independent IPC

2010-02-03 Thread News123
Tim Golden wrote: > >> Anyway, you have in mind that respect to speed: >> >> shared memory> named pipes> Unix domain socket> TCP socket > > True, but the OP didn't mention speed; rather simplicity. Not > saying it isn't a consideration but premature optimisation and > all that... > Yes true.

Re: simple and fast platform independent IPC

2010-02-03 Thread News123
Hi Terry, Terry Reedy wrote: > > That aside, I would wonder whether you could use a master process with a > gui to haphazardly launch subprocess, so as to avail oneself of > multiprocessing.Queue. > T This is also an option I'm looking. insted of the python scripts, thet users would normally

pychecker and "import my.special.module as mymod"

2010-02-03 Thread News123
Hi, I'm not really used to structuring modules withn directories, but I started playing # # the commands to reproduce my setup: # mkdir -p my/special touch my/__init__.py my/special/__init__.py echo 'print "myspecialmod"' >

xmlrpc slow in windows 7 if hostnames are used

2010-02-04 Thread News123
Hi, I wrote a small xmlrpc client on Windows 7 with python 2.6 srv = xmlrpclib.Server('http://localhost:80') I was able to perform about 1 rpc call per second After changing to srv = xmlrpclib.Server('http://127.0.0.1:80') I was able to perform about 10 to 16 rpc calls per second. So it seem

Re: xmlrpc slow in windows 7 if hostnames are used

2010-02-05 Thread News123
Yhanks a lot I'll check whether this is the root cause. Currently my machine could live without IPV6 bye N Gabriel Genellina wrote: > En Thu, 04 Feb 2010 19:34:20 -0300, News123 escribió: > >> I wrote a small xmlrpc client on Windows 7 with python 2.6 >> >>

Re: xmlrpc slow in windows 7 if hostnames are used

2010-02-05 Thread News123
Hi Gabriel, Gabriel Genellina wrote: > En Thu, 04 Feb 2010 19:34:20 -0300, News123 escribió: > >> I wrote a small xmlrpc client on Windows 7 with python 2.6 >> >> srv = xmlrpclib.Server('http://localhost:80') >> >> I was able to perform about 1 rpc

Re: xmlrpc slow in windows 7 if hostnames are used

2010-02-05 Thread News123
Hi JM, Jean-Michel Pichavant wrote: >> Gabriel Genellina wrote: >> >>> En Thu, 04 Feb 2010 19:34:20 -0300, News123 escribió: >>> >>> >>>> I wrote a small xmlrpc client on Windows 7 with python 2.6 >>>> >>>> srv = xm

how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-05 Thread News123
Hi, I'm using an XMLRPC server under Windows. What I wonder is how I could create a server, that can be killed with CTRL-C The server aborts easily with CTRL-BREAK but not with CTRL-C (under Windows) If I press CTRL-C it will only abort when the next RPC call occurs. It seems it is blocking i

can pydoc display doc for local funcs? or other doc tools for own code

2010-02-05 Thread News123
Hi, often I start "pydoc -g" in a projects working directory in order to view the docstrings of my own project and in order to get a quick overview of the code structure In some cases I would like to see also to see private methods (especially when trying to understand the internals of a collegu

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-06 Thread News123
Hi Gabriel, Gabriel Genellina wrote: > En Fri, 05 Feb 2010 20:03:51 -0300, News123 escribió: > >> I'm using an XMLRPC server under Windows. >> >> What I wonder is how I could create a server, that can be killed with >> CTRL-C >> >> The server ab

how to add pydoc strings to 'Data and other attributes'

2010-02-06 Thread News123
the python documentation # ##### __author__ = 'News123' # this will also be part of pydoc """ general blabla will not be part of pydoc""" class MyClass(object): """ This clas

sshd in python for windows 7

2010-02-06 Thread News123
Hi, I wondered which modules would be best to perform following task: A user uses a standard ssh (e.g. putty or openssh) client and performs an ssh to a windows host The windows host would run a python script acting as ssh server. Instead of controlling a shell the user would directly have acce

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-06 Thread News123
Hi Gabriel, Gabriel Genellina wrote: > En Fri, 05 Feb 2010 20:03:51 -0300, News123 escribió: > >> I'm using an XMLRPC server under Windows. >> >> What I wonder is how I could create a server, that can be killed with >> CTRL-C >> >> The server ab

Re: xmlrpc slow in windows 7 if hostnames are used

2010-02-07 Thread News123
Hi JM, Jean-Michel Pichavant wrote: > News123 wrote: >> Jean-Michel Pichavant wrote: >> >> >> Well This was exactly my question. >> for virtual web servers I cannot just use the IP-address. >> some XMLRPC servers do need the histname within the HTTP-POST

Re: sshd in python for windows 7

2010-02-07 Thread News123
Hi Jerry, Jerry Hill wrote: > On Sat, Feb 6, 2010 at 7:07 PM, News123 wrote: >> Hi, >> >> I wondered which modules would be best to perform following task: >> >> A user uses a standard ssh (e.g. putty or openssh) client and performs >> an ssh to a windows

Re: sshd in python for windows 7

2010-02-07 Thread News123
Hi Jerry, Jerry Hill wrote: > On Sat, Feb 6, 2010 at 7:07 PM, News123 wrote: >> Hi, >> >> I wondered which modules would be best to perform following task: >> >> A user uses a standard ssh (e.g. putty or openssh) client and performs >> an ssh to a windows

Re: sshd in python for windows 7

2010-02-07 Thread News123
Hi Jerry, Jerry Hill wrote: > On Sat, Feb 6, 2010 at 7:07 PM, News123 wrote: >> Hi, >> >> I wondered which modules would be best to perform following task: >> >> A user uses a standard ssh (e.g. putty or openssh) client and performs >> an ssh to a windows

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-13 Thread News123
Hi Gabriel, News123 wrote: > Hi Gabriel, > > Gabriel Genellina wrote: >> En Fri, 05 Feb 2010 20:03:51 -0300, News123 escribió: >> >>> I'm using an XMLRPC server under Windows. >>> >>> What I wonder is how I could create a server, that ca

problem with QtSignals "object has no attribute 'emit'"

2010-02-14 Thread News123
Hi, I'm having a rather small code snippet, where I create pyQT signals. I manage creating a signal as class attribute, but I can't create a list of signals or a signal as object.member. > from PyQt4.QtGui import * > from PyQt4.QtCore import * > > class MyWin(QMainWindow): > clssig = py

listing existing windows services with python

2010-02-15 Thread News123
Hi, What is the best way with python to get a list of all windows services. As a start I would be glad to receive only the service names. However it would be nicer if I could get all the properties of a service as well. Thanks for any info and bye N -- http://mail.python.org/mailman/listinf

How to use python to register a service (an existing .exe file)

2010-02-15 Thread News123
Hi, Is there a python way to register new windows services. I am aware of the instsrv.exe program, which can be used to install services. I could use subprocess.Popen to call instsrv.exe "service_name" program.exe but wondered, whether there's already an existing function. Thans in advance

Re: listing existing windows services with python

2010-02-16 Thread News123
P. Steinbach wrote: > * alex23: >> News123 wrote: >>> What is the best way with python to get a list of all windows services. >>> >>> As a start I would be glad to receive only the service names. >>> >>> However it would be nicer if I could get all the

Re: listing existing windows services with python

2010-02-17 Thread News123
lex23 writes: > >> News123 wrote: >>> What is the best way with python to get a list of all windows services. >>> >>> As a start I would be glad to receive only the service names. >>> >>> However it would be nicer if I could get all the prop

Re: Help with lambda

2010-02-24 Thread News123
Jonathan Gardner wrote: > On Feb 18, 4:28 am, lallous wrote: >> f = [lambda x: x ** n for n in xrange(2, 5)] > > This is (pretty much) what the above code does. > f = [] n = 2 f.append(lambda x: x**n) n = 3 f.append(lambda x: x**n) n = 4 f.append(lambda x: x**n

Re: Renaming identifiers & debugging

2010-02-25 Thread News123
Hi Luca, Luca wrote: > Hello, i am trying to develop an application to teach programming to > young kids in a similar way as Logo did in the past. I would like to use > an embedded Python as underlying language but this raises a problem. > > The target of my app are very young kids that might be

Image.frombuffer and warning

2010-03-02 Thread News123
Hi, I am using the PIL function from_buffer in python 2.6.4 I am having the line im2 = Image.frombuffer('L',(wx,wy),buf) I receive the warning: > ./pytest.py:63: RuntimeWarning: the frombuffer defaults may change in a future release; for portability, change the call to read: > frombuffer(mode

python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-02 Thread News123
Hi, I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge enough to contain the resulting image - call my c_function, which

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread News123
Hi Tim, Tim Roberts wrote: > News123 wrote: >> I created a grayscale image with PIL. >> >> Now I would like to write a C function, which reads a;most all pixels >> and will modify a few of them. >> >> My current approach is: >> - transform the imag

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread News123
Hi Stefan, Stefan Behnel wrote: > News123, 03.03.2010 01:38: >> I created a grayscale image with PIL. >> >> Now I would like to write a C function, which reads a;most all pixels >> and will modify a few of them. >> >> My current approach is: >> - tr

Re: Image.frombuffer and warning

2010-03-03 Thread News123
Hi Peter, Peter Otten wrote: > News123 wrote: > I cannot reproduce the problem: > > $ cat frombuffer.py > import sys > import Image > wx = 3 > wy = 2 > buf = "a"*wx*wy > if "--fixed" in sys.argv: > Image.frombuffer("L", (wx, wy),

  1   2   3   >