Re: [OT] Weaknesses of distro package managers - was Re: Python 2 to 3 conversion - embrace the pain

2015-03-16 Thread Alexander
Hi all, Surely you did not look at the package manager and package assortment of OpenBSD. It is actually a really good example of how package repository can be both reliable, easy to use and up to date. Also, what sort of quality can be expected from a piece of software, whose author is unable t

Re: [Tutor] Localhost client-server simple ssl socket test program problems

2011-12-15 Thread Alexander
t; All certificates and keys self-signed by openssl for test convenience. > > This is the site for referrence : > http://andyjeffries.co.uk/articles/x509-encrypted-authenticated-socket-ruby-client > > Or should I need a real certificate issued by a real CA to let things work? > > Any

class instance customization

2010-04-17 Thread Alexander
Hi, list. I've some nontrivial class implementation MyClass and its instance my: my = MyClass(args) MyClass uses in internals some variable which is not defined in MyClass itself. I want to extend instance of MyClass at runtime defining this variable and making new instance. It is like a class i

Re: class instance customization

2010-04-17 Thread Alexander
On 17.04.2010 18:32, Steven D'Aprano wrote: > On Sat, 17 Apr 2010 13:09:43 +0400, Alexander wrote: > > >> Hi, list. >> >> I've some nontrivial class implementation MyClass and its instance my: >> >> my = MyClass(args) >> >> MyClass us

Re: class instance customization

2010-04-19 Thread Alexander
On 18.04.2010 13:23, Steven D'Aprano wrote: > On Sat, 17 Apr 2010 19:55:44 +0400, Alexander wrote: > > >> Ok, I'll try to explain on the following example. Let's consider class >> MyClass that holds one string and concatenate it wit

convert time to UTC seconds since epoch

2010-07-20 Thread Alexander
Hi, list How with python standard library to convert string like '-MM-DD mm:HH:SS ZONE' to seconds since epoch in UTC? ZONE may be literal time zone or given in explicit way like +0100. -- http://mail.python.org/mailman/listinfo/python-list

Re: convert time to UTC seconds since epoch

2010-07-20 Thread Alexander
On 21.07.2010 00:46, Rami Chowdhury wrote: > On Jul 20, 2010, at 12:26 , Alexander wrote: > >> Hi, list >> >> How with python standard library to convert string like '-MM-DD >> mm:HH:SS ZONE' to seconds since epoch in UTC? ZONE may be literal time >

Curses Programming

2010-11-10 Thread alexander
Hi, all Here is the test. Plz help. / ***/ If you use the new image search of Google, you will find that the result images are layouted

Feed subscription IM bot

2010-11-10 Thread alexander
Hi, Can anyone help on this? / / The project should either be hosted online and usable from there, or can be run locally. Complete ource code should be delivered along with

Re: Python equivalent to the "A" or "a" output conversions in C

2012-06-19 Thread Alexander Blinne
On 19.06.2012 18:23, Edward C. Jones wrote: > Consider the following line in C: >printf('%a\n', x); > where x is a float or double. This outputs a hexadecimal representation > of x. Can I do this in Python? Don't know why there is no format character %a or %A in python, but the conversion is

Re: 2 + 2 = 5

2012-07-05 Thread Alexander Blinne
On 05.07.2012 16:34, Laszlo Nagy wrote: five.contents[five.contents[:].index(5)] = 4 5 > 4 5 is 4 > True That's surprising, because even after changing 5 to 4 both objects still have different id()s (tested on Py2.7), so 5 is 4 /should/ still be False (But isn't on my 2.7). But that

Gender, Representativeness and Reputation in StackOverflow

2012-07-23 Thread Alexander Serebrenik
ndrea Capiluppi (andrea.capiluppi @ brunel.ac.uk) [Lecturer, Brunel University, UK; NL; SO userid: 1528556] Alexander Serebrenik (a.serebrenik @ tue.nl) [Assistant Professor, Eindhoven University of Technology, NL; SO userid: 1277111] Bogdan Vasilescu (b.n.vasilescu @ tue.nl) [PhD student, Eind

Re: Gender, Representativeness and Reputation in StackOverflow

2012-07-23 Thread Alexander Serebrenik
1) The paper referenced contains 4 pages, so it should be available via IEEXplore. Moreover, you can find a copy on http://www.win.tue.nl/~aserebre/MSR2012.pdf 2) Since the survey is only one of the techniques we intend to use, and it will be augmented by analysing the data publicly available i

Re: Gender, Representativeness and Reputation in StackOverflow

2012-07-24 Thread Alexander Serebrenik
As a scientist I would be more than happy to publish in Open-Access Journals rather than in IEEE/ACM/Springer-published ones. However, I also have to be sure that my publications reach the scientific community and make an impact on it. Unfortunately, in many fields AFAIK the better journals (= h

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Alexander Blinne
On 17.08.2012 15:27, Gilles wrote: > For some reason, this CGI script that I found on Google displays the > contents of the variable but the HTML surrounding it is displayed > as-is by the browser instead of being rendered: > print "Content-Type: text/plain;charset=utf-8" With this line you tell

Re: Objects in Python

2012-08-24 Thread Alexander Blinne
On 23.08.2012 20:30, Dennis Lee Bieber wrote: > On Thu, 23 Aug 2012 15:33:33 +1000, Chris Angelico > declaimed the following in gmane.comp.python.general: >> x = 1; >> >> In C, this means: Assign the integer 1 to the variable x (possibly >> with implicit type casting, eg to floating point). >> >

Re: issue with struct.unpack

2012-08-26 Thread Alexander Blinne
On 26.08.2012 01:31, Dennis Lee Bieber wrote: > The struct module relies upon the user knowing the format of the data. > If your problem is that you have some null-terminated string data in a > variable width field, you will have to locate the position of the null > FIRST, and specify the appropria

Re: Python presentations

2012-09-13 Thread Alexander Blinne
On 13.09.2012 21:01, 8 Dihedral wrote: > def powerlist(x, n): > # n is a natural number > result=[] > y=1 > for i in xrange(n): > result.append(y) > y*=x > return result # any object in the local function can be returned def powerlist(x, n): result=

Re: Python presentations

2012-09-14 Thread Alexander Blinne
On 14.09.2012 00:38, Chris Angelico wrote: > On Fri, Sep 14, 2012 at 8:33 AM, Alexander Blinne wrote: >> def powerlist(x,n): >> if n==1: >> return [1] >> p = powerlist(x,n-1) >> return p + [p[-1]*x] > > Eh, much simpler. > >

Re: Python presentations

2012-09-16 Thread Alexander Blinne
On 14.09.2012 14:19, Chris Angelico wrote: > Err, yes, I did mean ** there. The extra multiplications may be > slower, but which is worse? Lots of list additions, or lots of integer > powers? In the absence of clear and compelling evidence, I'd be > inclined to go with the list comp - and what's mo

Re: Python presentations

2012-09-17 Thread Alexander Blinne
On 16.09.2012 19:35, Steven D'Aprano wrote: > On Sun, 16 Sep 2012 18:13:36 +0200, Alexander Blinne wrote: >> def powerlist2(x,n): >> if n==1: >> return [1] >> p = powerlist3(x,n-1) >> p.append(p[-1]*x) >> return p > > Is

Re: Functional way to compare things inside a list

2012-09-21 Thread Alexander Blinne
On 21.09.2012 00:58, thorso...@lavabit.com wrote: > Hi, > > list = [{'1': []}, {'2': []}, {'3': ['4', '5']}] > > I want to check for a value (e.g. '4'), and get the key of the dictionary > that contains that value. > (Yep, this is bizarre.) > > some_magic(list, '4') > => '3' > > What's the func

Re: write binary with struct.pack_into

2012-10-06 Thread Alexander Blinne
First, you should consider reading the documentation of struct.unpack_from and struct.pack_into at http://docs.python.org/library/struct.html quite carefully. It says, that these commands take a parameter called offset, which names the location of the data in a buffer (e.g. an opened file). exampl

Re: creating size-limited tar files

2012-11-07 Thread Alexander Blinne
I don't know the best way to find the current size, I only have a general remark. This solution is not so good if you have to impose a hard limit on the resulting file size. You could end up having a tar file of size "limit + size of biggest file - 1 + overhead" in the worst case if the tar is at l

Re: Python Noob Question.

2012-12-03 Thread Alexander Blinne
Hello, by having a quick look at their website i found a plugin for CoreTemp which acts as a server and can be asked for status information of the cpu. Now your task is really simple: write a little function or class that opens a network socket, connects to that plugin und asks it for the informat

Re: Conversion of List of Tuples

2012-12-04 Thread Alexander Blinne
Am 03.12.2012 20:58, schrieb subhabangal...@gmail.com: > Dear Group, > > I have a tuple of list as, > > tup_list=[(1,2), (3,4)] > Now if I want to covert as a simple list, > > list=[1,2,3,4] > > how may I do that? Another approach that has not yet been mentioned here: >>> a=[(1,2), (3,4)] >>>

Re: Good use for itertools.dropwhile and itertools.takewhile

2012-12-04 Thread Alexander Blinne
Another neat solution with a little help from http://stackoverflow.com/questions/1701211/python-return-the-index-of-the-first-element-of-a-list-which-makes-a-passed-fun >>> def split_product(p): ... w = p.split(" ") ... j = (i for i,v in enumerate(w) if v.upper() != v).next() ... retu

Re: Good use for itertools.dropwhile and itertools.takewhile

2012-12-04 Thread Alexander Blinne
Am 04.12.2012 19:28, schrieb DJC: (i for i,v in enumerate(w) if v.upper() != v).next() > Traceback (most recent call last): > File "", line 1, in > AttributeError: 'generator' object has no attribute 'next' Yeah, i saw this problem right after i sent the posting. It now is supposed to read

Re: Good use for itertools.dropwhile and itertools.takewhile

2012-12-04 Thread Alexander Blinne
Am 04.12.2012 20:37, schrieb Ian Kelly: > >>> def split_product(p): > ... w = p.split(" ") > ... j = next(i for i,v in enumerate(w) if v.upper() != v) > ... return " ".join(w[:j]), " ".join(w[j:]) > > > It still fails if the product description is empty. That's true..

Re: Good use for itertools.dropwhile and itertools.takewhile

2012-12-06 Thread Alexander Blinne
Am 05.12.2012 18:04, schrieb Nick Mellor: > Sample data Well let's see what def split_product(p): p = p.strip() w = p.split(" ") try: j = next(i for i,v in enumerate(w) if v.upper() != v) except StopIteration: return p, '' return " ".join(w[:j]), " ".join(w[j:]

Re: Python Noob Question.

2012-12-10 Thread Alexander Blinne
on't know how to make it 'query' or grab values constantly, if you don't > mind my potentially incorrect terminology. This is typically done with some kind of loop, e.g. run = True while run: #do something repeatedly and do "run = False" if you want to stop pass Greetings Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: Preventing tread collisions

2012-12-13 Thread Alexander Blinne
Am 12.12.2012 21:29, schrieb Dave Angel: > On 12/12/2012 03:11 PM, Wanderer wrote: >> I have a program that has a main GUI and a camera. In the main GUI, you can >> manipulate the images taken by the camera. You can also use the menu to >> check the camera's settings. Images are taken by the came

Re: [newbie] problem making equally spaced value array with linspace

2012-12-18 Thread Alexander Blinne
Am 18.12.2012 13:37, schrieb Jean Dubois: > I have trouble with the code beneath to make an array with equally > spaced values > When I enter 100e-6 as start value, 700e-6 as end value and 100e-6 I > get the following result: > [ 0.0001 0.00022 0.00034 0.00046 0.00058 0.0007 ] > But I was hop

Re: Pattern-match & Replace - help required

2012-12-19 Thread Alexander Blinne
Am 19.12.2012 14:41, schrieb AT: > Thanks a million > Can you recommend a good online book/tutorial on regular expr. in python? http://docs.python.org/3/howto/regex.html -- http://mail.python.org/mailman/listinfo/python-list

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-22 Thread Alexander Blinne
Am 22.12.2012 13:45, schrieb prilisa...@googlemail.com: > Ps.: The Socket, the DB has to be kept allways open, because of it's Server > functionality, A lot of Sensors, Timers, User interaction, must recived , > Calculated, etc so a reaction must be send in about 16~100 ms, different > modules o

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-22 Thread Alexander Blinne
Am 22.12.2012 19:10, schrieb prilisa...@googlemail.com: > It's for me a view of top side down, but how could the midlevel comunicate to > each oter... "not hirachical" You could use something like the singleton pattern in order to get a reference to the same datastore-object every time Datastore.

Python, email temperature

2012-12-22 Thread Alexander Ranstam
call last): File "sendcpu.py", line 36, in msg = cpu_temperature NameError: name 'cpu_temperature' is not defined Does anyone know why the program claims that cpu_temperature isnt defined, when it is? Thanx! //Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-22 Thread Alexander Blinne
Am 22.12.2012 21:43, schrieb prilisa...@googlemail.com: > I Think I describe my Situation wrong, the written Project is a > Server, that should store sensor data, perfoms makros on lamps according > a sequence stored in the DB and Rule systems schould regulate home devices > and plan scheduler job

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-24 Thread Alexander Blinne
bus) scheduler.do_things() if __name__=="__main__": main() Please feel free to ask specific questions about this approach. merry christmas everyone Alexander Blinne -- http://mail.python.org/mailman/listinfo/python-list

Re: Python recursive tree, linked list thingy

2012-03-07 Thread Alexander Blinne
Am 07.03.2012 20:49, schrieb Wanderer: I have a list of defective CCD pixels and I need to find clusters where a cluster is a group of adjacent defective pixels. This seems to me to be a classic linked list tree search.I take a pixel from the defective list and check if an adjacent pixel is in th

Documentation, assignment in expression.

2012-03-23 Thread Alexander Blinne
e this: > while True: > line = f.readline() > if not line: > break > ... # do something with line I think at least we need a new example. Any ideas? Greetings Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation, assignment in expression.

2012-03-25 Thread Alexander Blinne
I am not sure I understand your argument. The doc section states that " [...] in Python you’re forced to write this: while True: line = f.readline() if not line: break ... # do something with line". That simply isn't true as one can simply write: for line in f: #do s

Re: Zipping a dictionary whose values are lists

2012-04-13 Thread Alexander Blinne
Am 12.04.2012 18:38, schrieb Kiuhnm: > Almost. Since d.values() = [[1,2], [1,2,3], [1,2,3,4]], you need to use > list(zip(*d.values())) > which is equivalent to > list(zip([1,2], [1,2,3], [1,2,3,4])) > > Kiuhnm While this accidently works in this case, let me remind you that d.values() do

Re: why () is () and [] is [] work in other way?

2012-04-21 Thread Alexander Blinne
Am 21.04.2012 05:25, schrieb Rotwang: > On 21/04/2012 01:01, Roy Smith wrote: >> In article<877gxajit0@dpt-info.u-strasbg.fr>, >> Alain Ketterlin wrote: >> >>> Tuples are immutable, while lists are not. >> >> If you really want to have fun, consider this classic paradox: >> > [] is [] >>

Re: why () is () and [] is [] work in other way?

2012-04-23 Thread Alexander Blinne
Am 21.04.2012 14:51, schrieb gst: > Hi, > > I played (python3.2) a bit on that and : > > case 1) Ok to me (right hand side is a tuple, whose elements are evaluated > one per one and have same effect as your explanation (first [] is destroyed > right before the second one is created) : > x

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

2012-06-11 Thread Alexander Blinne
On 10.06.2012 23:27, Paul Rubin wrote: > Here is an exercise from the book that you might like to try in Python: > > http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-24.html#%_idx_3894 > > It's not easy ;-) I liked this exercize. At first I wrote my own merger. > def merge(*iterables): >

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

2012-06-15 Thread Alexander Blinne
On 15.06.2012 09:00, Paul Rubin wrote: > Alexander Blinne writes: >>> def gen_s(): >>> s = [1] >>> m = skipdups(heapq.merge(*[(lambda j: (k*j for k in s))(n) for n in >>> [2,3,5]])) >>> yield s[0] >>> while True: >>>

Re: why the following python program does not face any concurrency problems without synchronize mechanism?

2011-07-09 Thread Alexander Kapps
On 09.07.2011 22:45, smith jack wrote: from threading import Thread def calc(start, end): total = 0; for i in range(start, end + 1): total += i; print '--result:', total return total t = Thread(target=calc, args=(1,100)) t.start() I have run thi

Re: How can I make a program automatically run once per day?

2011-07-09 Thread Alexander Kapps
On 10.07.2011 02:26, John Salerno wrote: I have a script that does some stuff that I want to run every day for maybe a week, or a month. So far I've been good about running it every night, but is there some way (using Python, of course) that I can make it automatically run at a set time each nigh

Re: list comprehension to do os.path.split_all ?

2011-07-28 Thread Alexander Kapps
On 28.07.2011 22:44, Ian Kelly wrote: On Thu, Jul 28, 2011 at 2:18 PM, gry wrote: [python 2.7] I have a (linux) pathname that I'd like to split completely into a list of components, e.g.: '/home/gyoung/hacks/pathhack/foo.py' -->['home', 'gyoung', 'hacks', 'pathhack', 'foo.py'] os.path.

Re: list comprehension to do os.path.split_all ?

2011-07-29 Thread Alexander Kapps
On 29.07.2011 21:30, Carl Banks wrote: It's not even fullproof on Unix. '/home//h1122/bin///ghi/'.split('/') ['','home','','bin','','','ghi',''] The whole point of the os.path functions are to take care of whatever oddities there are in the path system. When you use string manipulation to m

Re: Hardlink sub-directories and files

2011-08-08 Thread Alexander Gattin
Hello, On Tue, Aug 02, 2011 at 02:32:54AM -0700, loial wrote: > This works fine for files, but the directory > also contains sub- directories (which themselves > contain files and sub-directories). However I > do not think it is possible to hard link > directories ? On some Unices it is, as I he

Re: Linux : create a user if not exists

2011-08-16 Thread Alexander Kapps
On 16.08.2011 16:57, smain kahlouch wrote: Ok than you. You're right but it doesn't help me : I replaced it : >>> def finduser(user): ... if pwd.getpwnam(user): ... print user, "user exists" ... return True ... return False ... >>> finduser('realuser') realuser

Re: I think I found 2 undocumented string format codes.

2011-08-24 Thread Alexander Kapps
On 24.08.2011 22:45, Bill wrote: My google-fu has failed me in finding info on %h and %l string formatting codes. '%h' %'hello' exceptions.ValueError: incomplete format '%l' %'hello' exceptions.ValueError: incomplete format Does anyone know what doing a "complete format" means? See http

Re: Tk MouseWheel Support

2011-03-10 Thread Alexander Kapps
On 10.03.2011 21:28, Richard Holmes wrote: I am trying to use the mouse wheel to scroll a list box, but I'm not getting the event. When I bind "" to the listbox I get the event and I'm able to scroll using yview_scroll. I've tried binding "MouseWheel" and"", and I've also tried"" and "" even thou

Re: attach to process by pid?

2011-03-10 Thread Alexander Kapps
On 10.03.2011 23:25, Nobody wrote: On Thu, 10 Mar 2011 20:22:11 +0100, Giampaolo Rodolà wrote: I think he wants to attach to another process's stdin/stdout and read/write from/to them. I don't know if this is possible but it would be a great addition for psutil. It's not even a meaningful con

OT: processes, terminals and file descriptors on *nix (was: Re: attach to process by pid?)

2011-03-11 Thread Alexander Kapps
On 11.03.2011 03:18, Nobody wrote: On Thu, 10 Mar 2011 23:55:51 +0100, Alexander Kapps wrote: I think he wants to attach to another process's stdin/stdout and read/write from/to them. I don't know if this is possible but it would be a great addition for psutil. It's not ev

Get Path of current Script

2011-03-14 Thread Alexander Schatten
Hi, could someone help me with a small problem? I wrote a Python script that does some RegEx... transformations. Now, this script loads some configuration data from a file located in the same directory: open ('config.txt', 'r'). However, this only works when I execute the script being in the dir

Re: Get Path of current Script

2011-03-14 Thread Alexander Schatten
Thanks for the comments so far. This sounds to be more complicated in detail than I expected. I wonder how all the other Python programs and scripts are doing that... -- http://mail.python.org/mailman/listinfo/python-list

Re: Get Path of current Script

2011-03-14 Thread Alexander Schatten
They don't. Hm, ok, I am always for best practices. If there is a better way to do it I am open for suggestions ;-) How would the best practice be to load configuration data from a file. I mean, this is something very common: you write a program or a script and want to load some configuration data

Re: os.path.walk() to get full path of all files

2011-03-16 Thread Alexander Kapps
On 16.03.2011 20:41, dude wrote: My goal is create a list of absolute paths for all files in a given directory (any number of levels deep). root dir1 file1 file2 dir2 file3 dir3 -dir4 --file4 file5 So the above woul

Re: OT: processes, terminals and file descriptors on *nix

2011-03-16 Thread Alexander Kapps
On 13.03.2011 01:50, Nobody wrote: I don't have any links. If you want to understand the core Unix API, the best reference I know of is Stevens ("Advanced Programming in the Unix Environment", by W. Richard Stevens). Unfortunately, it's not cheap. In spite of the title, it doesn't assume any pr

Re: os.path.walk() to get full path of all files

2011-03-16 Thread Alexander Kapps
On 16.03.2011 22:00, dude wrote: awesome, that worked. I'm not sure how the magic is working with your underscores there, but it's doing what I need. thanks. The underscore is no magic here. It's just a conventional variable name, saying "I m unused". One could also write: for root, UNUSE

Re: class error

2011-03-18 Thread Alexander Kapps
On 18.03.2011 21:13, monkeys paw wrote: I have the following file: FileInfo.py: import UserDict After this import statement, the name "UserDict" refers to the module. class FileInfo(UserDict): Here you are trying to subclass the module. What you need instead is: class FileInfo(UserDict.U

Re: Reading/Writing files

2011-03-18 Thread Alexander Kapps
On 18.03.2011 22:33, Jon Herman wrote: Hello all, I am pretty new to Python and am trying to write data to a file. However, I seem to be misunderstanding how to do so. For starters, I'm not even sure where Python is looking for these files or storing them. The directories I have added to my PYTH

Re: install excel xlwt in ubuntu 9

2011-03-19 Thread Alexander Kapps
On 19.03.2011 07:29, ratna PB wrote: Hey friends i tried a lot to install excel xlwt in ubuntu 9 but failed please help me before i get full fraustrated... What have you tried and how did it failed? On 9.10, simply do (you might need to enable the universe repository in Synaptic first): $ s

Re: send function keys to a legacy DOS program

2011-03-19 Thread Alexander Gattin
Hello, On Thu, Mar 10, 2011 at 04:58:53PM -0800, Justin Ezequiel wrote: > We have an old barcode program (MSDOS and source code unavailable.) > I've figured out how to populate the fields (by hacking into one of > the program's resource files.) > However, we still need to hit the following functio

Re: send function keys to a legacy DOS program

2011-03-19 Thread Alexander Gattin
On Sun, Mar 20, 2011 at 12:52:28AM +0200, Alexander Gattin wrote: > On Thu, Mar 10, 2011 at 04:58:53PM -0800, Justin > Ezequiel wrote: > > We have an old barcode program (MSDOS and source code unavailable.) > > I've figured out how to populate the fields (by hacking into o

Re: Incompatible _sqlite3.so

2011-03-27 Thread Alexander Kapps
On 27.03.2011 23:24, Tim Johnson wrote: I have python 2.6.5 on my main workstation with ubuntu 10.04. I am attempting to set up a temporary test platform on an asus netbook with slax running from an SD card. I have installed a python 2.7 module on the slax OS. (I can't find a python 2.6.5 module

Re: Incompatible _sqlite3.so

2011-03-27 Thread Alexander Kapps
On 28.03.2011 00:21, Tim Johnson wrote: Python 2.6: http://www.slax.org/modules.php?action=detail&id=3118 That module is *not* trusted. See the warning? It's just not verified by the Slax developers. That doesn't mean it's not trusted. It's the same as with Ubuntu packages from the Unive

Re: send function keys to a legacy DOS program

2011-03-29 Thread Alexander Gattin
Hello, On Sun, Mar 20, 2011 at 06:59:46PM -0700, Justin Ezequiel wrote: > On Mar 20, 7:30 am, Alexander Gattin > wrote: > > You need to place 2 bytes into the circular buffer > > to simulate key press. Lower byte is ASCII code, > > higher byte is scan code (they are the

Re: ipython: Multiple commands on the same line and newlines

2011-04-17 Thread Alexander Kapps
On 17.04.2011 20:40, Phil Winder wrote: Ok, thanks all. It's a little disappointing, but I guess that you always have to work in a different way when you move to a new language. Andrea's %edit method is probably the best compromise, but this now means that I will have to learn all the (obscure) s

Pickling over a socket

2011-04-19 Thread Roger Alexander
= read(1) File "/usr/local/lib/python2.7/socket.py", line 380, in read data = self._sock.recv(left) socket.error: [Errno 107] Transport endpoint is not connected I'm at a loss, can anyone provide any guidance? Thanks, Roger Alexander 1 import pickle 2 import socke

Re: Pickling over a socket

2011-04-19 Thread Roger Alexander
Thanks everybody, got it working. I appreciate the help! Roger. -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Disable creation of pyc files in DrPython

2011-04-20 Thread Alexander Kapps
On 20.04.2011 15:21, craf wrote: Hi. I wonder if anyone uses Python DrPython as editor. I need to know if you can disable the creation of Pyc files created by the program. In the Geany editor you can add the parameter -B, but not if it can in this editor. I don't know DrPython, but Python itse

Python competitions and learnings

2011-04-30 Thread Alexander Lyabah
Hi. My name is Alexander. I spend a lot of time in writing a new service checkio.org It's all about python, learn python, find the best solution in python. And Im looking for feedback from peoples who best in python. Here I make some video tutorial about this service http://checkio.bl

Re: Python competitions and learnings

2011-05-01 Thread Alexander Lyabah
On May 1, 12:29 am, Terry Reedy wrote: > On 4/30/2011 3:22 PM, Alexander Lyabah wrote: > > > I spend a lot of time in writing a new service checkio.org > > > It's all about python, learn python, find the best solution in > > python. > > > And Im look

Re: Python competitions and learnings

2011-05-01 Thread Alexander Lyabah
On May 1, 3:26 am, harrismh777 wrote: > Alexander Lyabah wrote: > > What do you think about it? > > > I'm also have a not a very good English, so I need help with it too, > > Alexander, your site is very interesting. I spent some time this > afternoon apprecia

Re: Python competitions and learnings

2011-05-01 Thread Alexander Lyabah
And what do you think about Score Games and competitions? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python competitions and learnings

2011-05-02 Thread Alexander Lyabah
On May 1, 7:22 pm, Alexander Lyabah wrote: > On May 1, 3:26 am, harrismh777 wrote: > > > > > > > > > > > Alexander Lyabah wrote: > > > What do you think about it? > > > > I'm also have a not a very good English, so I need help with i

Re: Python competitions and learnings

2011-05-02 Thread Alexander Lyabah
On May 2, 1:33 am, Terry Reedy wrote: > On 5/1/2011 12:49 PM, Alexander Lyabah wrote: > > > And what do you think about Score Games and competitions? > > The rules of the first score game were not clear to me. I could not > figure out how to play it interactively myself

Re: Python competitions and learnings

2011-05-05 Thread Alexander Lyabah
On May 1, 12:29 am, Terry Reedy wrote: > On 4/30/2011 3:22 PM, Alexander Lyabah wrote: > > > I spend a lot of time in writing a new service checkio.org > > > It's all about python, learn python, find the best solution in > > python. > > > And Im look

Re: PyGTK notebook: get current page

2011-05-07 Thread Alexander Kapps
On 07.05.2011 17:04, Tracubik wrote: Hi all! I've made a simple PyGTK program. It's a window with a notebook, the notebook have 2 pages When changing page, i'ld like to get the id of current page. I've coded it, but i can get only the previously open page, not the current one. This is not a big

Re: turn monitor off and on

2011-05-14 Thread Alexander Kapps
On 14.05.2011 09:29, harrismh777 wrote: harrismh777 wrote: def turnOnMonitor(): SC_MONITORPOWER = 0xF170 win32gui.SendMessage(win32con.HWND_BROADCAST, win32con.WM_SYSCOMMAND, SC_MONITORPOWER, -1) Wonder what the equivalent of this is in Linux... ? Probably xset dpms force {on,off,...} -- h

Re: regular expression i'm going crazy

2011-05-16 Thread Alexander Kapps
On 16.05.2011 18:25, Tracubik wrote: pls help me fixing this: import re s = "linka la baba" re_s = re.compile(r'(link|l)a' , re.IGNORECASE) print re_s.findall(s) output: ['link', 'l'] why? As the docs say: "If one or more groups are present in the pattern, return a list of groups;" http

Debugging reason for python running unreasonably slow when adding numbers

2023-03-14 Thread Alexander Nestorov
I'm working on an NLP and I got bitten by an unreasonably slow behaviour in Python while operating with small amounts of numbers. I have the following code: ```python import random, time from functools import reduce def trainPerceptron(perceptron, data):   learningRate = 0.002   weights = perce

Re: How Do I Get A Bug In Multiprocessing Fixed?

2021-06-17 Thread Alexander Neilson
;No connection could be made because the target machine actively refused it', None, 10061, None) Reconnecting Traceback (most recent call last): File "C:\Users\Alexander\AppData\Local\Programs\Python\Python37\lib\multiprocessing\connection.py", line 619, in SocketClient s.connect(address

(Python 3.5) Asyncio and an attempt to run loop.run_until_complete() from within a running loop

2016-04-08 Thread Alexander Myodov
so, won't the previous event loop miss any its events? Thank you in advance. Alexander -- https://mail.python.org/mailman/listinfo/python-list

Re: (yet another) PEP idea to tackle binary wheels problem efficiently

2019-02-18 Thread Alexander Revin
Two minor typos: platform tag should be separated by "-", not "_". Also it makes sense to use "amd64" instead of "x86_64", so platform can be just split by "_" On Sat, Feb 16, 2019 at 9:29 PM Alexander Revin wrote: > > Hi all, > > I&#

(yet another) PEP idea to tackle binary wheels problem efficiently

2019-02-18 Thread Alexander Revin
Hi all, I've been thoroughly reading various discussions, such as [1], [2] and related ones regarding PEP 425, PEP 491 and PEP 513. I also happen to use musl sometimes, so as discussed here [3] I thought it would be a good idea to submit a new PEP regarding musl compatibility. It's not a secret t

Mouse control

2019-10-06 Thread Alexander Vergun
opened by the script only then the script controls the mouse. I tried to call win32gui.SetCapture without any effect. Does anyone have an idea how to handle this? Thank you very much, Alexander -- Ing. Alexander Vergun tel.: +421905167381 -- https://mail.python.org/mailman/listinfo/python-list

Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Alexander Neilson
ore. Regards Alexander Alexander Neilson Neilson Productions Limited 021 329 681 alexan...@neilson.net.nz > On 24/06/2020, at 07:57, Tony Kaloki wrote: > >  > > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 > > From: Tony Kaloki<

Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Alexander Neilson
-methods Happy to have helped and good luck with your Python journey. Regards Alexander Alexander Neilson Neilson Productions Limited 021 329 681 alexan...@neilson.net.nz > On 24/06/2020, at 08:49, Tony Kaloki wrote: > >  > Alexander, >Thank you so much! It wo

Re: strip() method makes me confused

2020-11-07 Thread Alexander Neilson
containing comma) returns false so it stops searching from that end and does the same at the other end. https://www.programiz.com/python-programming/methods/string/strip Hope that helps. Regards Alexander Alexander Neilson Neilson Productions Limited 021 329 681 alexan...@neilson.net.nz

ANN: Dao Language v.0.9.6-beta is release!

2005-12-02 Thread Alexander Zatvornitskiy
age. I think, it is the best way to evaluate new language. Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: MoinMoin and Mediawiki?

2005-01-11 Thread Alexander Schremmer
ly running two separate wiki packages, which gets > confusing. There are even MoinMoin sites that are as big as that. Maybe you should rethink your kind of prejudice and re-evaluate MoinMoin. Kind regards, Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: MoinMoin and Mediawiki?

2005-01-11 Thread Alexander Schremmer
On 11 Jan 2005 08:49:52 -0800, Paul Rubin wrote: > Alexander Schremmer <[EMAIL PROTECTED]> writes: >>> I need to set up a wiki for a small group. I've played with MoinMoin >>> a little bit and it's reasonably straightforward to set up, but

Re: OT: MoinMoin and Mediawiki?

2005-01-12 Thread Alexander Schremmer
is not a large wiki? :-) Kind regards, Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: limited python virtual machine (WAS: Another scripting language implemented into Python itself?)

2005-01-25 Thread Alexander Schremmer
ing of every relevant function that checks the current "mode" and raises an exception if it is not correct. The import handler would need to check if the module is whitelisted (based on the path etc.). Python is too dynamic to get this working while just using tricks that manipulate some builtins/globals etc. Kind regards, Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: limited python virtual machine (WAS: Another scripting language implemented into Python itself?)

2005-01-26 Thread Alexander Schremmer
corated" by those security checks) have to be in the modules whitelist to work flawlessy (i.e. not generate exceptions). Any comments about this from someone who already hacked CPython? Kind regards, Alexander -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   >