Python doesn't work

2021-05-30 Thread Mr . Incognito
Hello I downloaded the latest versioon of Python and tried to open several .py files, but it doesn't open. It opens for a sec, then closes itself. I tried uninstalling and reinstalling, but it doesn't work. I hope you can help me! Saadetud Windows 10 rakendusest [1]Meil

Re: neoPython : Fastest Python Implementation: Coming Soon

2021-05-05 Thread Mr Flibble
On 05/05/2021 17:36, Igor Korot wrote: Hi, On Wed, May 5, 2021 at 11:27 AM Mr Flibble < flib...@i42.invalidwibblegrok.co.uk> wrote: On 05/05/2021 17:02, Chris Angelico wrote: On Thu, May 6, 2021 at 2:01 AM Mr Flibble wrote: neoPython : Fastest Python Implementation: Coming Soon M

Re: neoPython : Fastest Python Implementation: Coming Soon

2021-05-05 Thread Mr Flibble
On 05/05/2021 17:33, Mark Lawrence wrote: On Wednesday, May 5, 2021 at 4:57:13 PM UTC+1, Mr Flibble wrote: neoPython : Fastest Python Implementation: Coming Soon Message ends. /Flibble -- 😎 Dedicated to you and all like you https://www.youtube.com/watch?v=X15PsqN0DHc ORLY? If anyone is

Re: neoPython : Fastest Python Implementation: Coming Soon

2021-05-05 Thread Mr Flibble
On 05/05/2021 17:02, Chris Angelico wrote: On Thu, May 6, 2021 at 2:01 AM Mr Flibble wrote: neoPython : Fastest Python Implementation: Coming Soon Message ends. /Flibble My breath: not being held. Message ends. Why? The currently extant Python implementations are so inefficient they

Re: neoPython : Fastest Python Implementation: Coming Soon

2021-05-05 Thread Mr Flibble
On 05/05/2021 17:02, Chris Angelico wrote: On Thu, May 6, 2021 at 2:01 AM Mr Flibble wrote: neoPython : Fastest Python Implementation: Coming Soon Message ends. /Flibble My breath: not being held. Message ends. Why? The currently extant Python implementations contribute to climate

neoPython : Fastest Python Implementation: Coming Soon

2021-05-05 Thread Mr Flibble
neoPython : Fastest Python Implementation: Coming Soon Message ends. /Flibble -- 😎 -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-14 Thread Mr Flibble
On 14/02/2021 23:00, Christian Gollwitzer wrote: Am 14.02.21 um 11:12 schrieb Paul Rubin: Christian Gollwitzer writes: He wants that neoGFX is scriptable in Python, but instead of linking with CPython, he will write his own Python implementation instead, because CPython is slow/not clean/ what

Re: Change first occurrence of character x in a string - how?

2021-02-14 Thread Mr Flibble
On 14/02/2021 21:14, Chris Green wrote: What's the easiest way to change the first occurrence of a specified character in a string? By using a grown up (i.e. non-toy) programming language. /Flibble -- 😎 -- https://mail.python.org/mailman/listinfo/python-list

Re: Sketch

2021-02-14 Thread Mr Flibble
On 14/02/2021 09:10, Michał Jaworski wrote: Wow, that thread is entertaining. It seems that neos is one of it’s kind. What I hope is that it will support TempleOS. Going back going back to your original question Mr. Fibble. If ISO standard is what you really need to finish your project you

Re: Sketch

2021-02-14 Thread Mr Flibble
On 14/02/2021 09:10, Michał Jaworski wrote: Wow, that thread is entertaining. It seems that neos is one of it’s kind. What I hope is that it will support TempleOS. Going back going back to your original question Mr. Fibble. If ISO standard is what you really need to finish your project you

Re: Sketch

2021-02-13 Thread Mr Flibble
On 14/02/2021 05:04, Mark Lawrence wrote: On Sunday, February 14, 2021 at 5:01:46 AM UTC, Mr Flibble wrote: CPython *is* the dead parrot. It's time for Python to evolve out of the primordial soup. /Flibble -- 😎 Says the bloke(?) who doesn't use mailing lists but does get h

Sketch

2021-02-13 Thread Mr Flibble
CPython *is* the dead parrot. It's time for Python to evolve out of the primordial soup. /Flibble -- 😎 -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 14/02/2021 03:26, Grant Edwards wrote: On 2021-02-14, Ned Batchelder wrote: On Saturday, February 13, 2021 at 7:19:58 PM UTC-5, Chris Angelico wrote: At the absolute least, show that you have something that can run Python code. The OP has been making these claims on IRC for a (at least t

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 14/02/2021 00:52, Alan Gauld wrote: On 14/02/2021 00:07, Mr Flibble wrote: On 13/02/2021 18:11, Alan Gauld wrote: You are going to create a Python compiler that will take existing Python code and output a byte code file. No neos is not a Python compiler: it is a *universal* compiler

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 14/02/2021 02:54, Mark Lawrence wrote: On Sunday, February 14, 2021 at 2:18:03 AM UTC, Mr Flibble wrote: On 14/02/2021 00:51, Ned Batchelder wrote: The OP has been making these claims on IRC for a while (at least two years). He has never cared to substantiate them, or even participate

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 14/02/2021 03:35, Paul Rubin wrote: Mr Flibble writes: I am creating neos as I need a performant scripting engine for my other major project "neoGFX" and I want to be able to support multiple popular scripting languages including Python. Is something wrong with Guile for that pu

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 14/02/2021 00:51, Ned Batchelder wrote: On Saturday, February 13, 2021 at 7:19:58 PM UTC-5, Chris Angelico wrote: On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble wrote: On 13/02/2021 23:30, Igor Korot wrote: Hi, But most importantly - what is the reason for this ? I mean - what problems the

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 14/02/2021 00:19, Chris Angelico wrote: On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble wrote: On 13/02/2021 23:30, Igor Korot wrote: Hi, But most importantly - what is the reason for this ? I mean - what problems the actual python compiler produce? Thank you. I am creating neos as I need

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 13/02/2021 23:30, Igor Korot wrote: Hi, But most importantly - what is the reason for this ? I mean - what problems the actual python compiler produce? Thank you. I am creating neos as I need a performant scripting engine for my other major project "neoGFX" and I want to be able to support

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 13/02/2021 18:11, Alan Gauld wrote: On 13/02/2021 16:09, Mr Flibble wrote: On 13/02/2021 00:01, Alan Gauld wrote: I'm assuming it's a new executable interpreter that can run any valid python code. Is that correct? It is a universal *compiler* so it compiles the python code to

Re: New Python implementation

2021-02-13 Thread Mr Flibble
On 13/02/2021 00:01, Alan Gauld wrote: On 12/02/2021 21:46, Mr Flibble wrote: The neos Python implementation will consist of a schema file which describes the language plus any Python-specific semantic concepts So the schema file is some kind of formal grammar definition of the language

Re: New Python implementation

2021-02-12 Thread Mr Flibble
On 12/02/2021 00:15, Alan Gauld wrote: On 11/02/2021 12:30, Mr Flibble wrote: I am starting work on creating a new Python implementation from scratch using "neos" my universal compiler that can compile any programming language. Can i clarify that? Are you saying that you ar

Re: New Python implementation

2021-02-12 Thread Mr Flibble
On 12/02/2021 02:45, Terry Reedy wrote: On 2/11/2021 5:33 PM, Mr Flibble wrote: On 11/02/2021 22:25, Dan Stromberg wrote: On Thu, Feb 11, 2021 at 2:00 PM Mr Flibble wrote: On 11/02/2021 21:13, Dan Stromberg wrote: Does your project have a name yet?  I'd like to follow it through g

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 23:05, Paul Rubin wrote: Mr Flibble writes: "neos" - https://neos.dev/ https://github.com/i42output/neos Good luck, let us know when it is done. What is there doesn't look like a credible start so far, but maybe you will surprise us. Have you actually written

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 23:12, Greg Ewing wrote: On 12/02/21 11:33 am, Mr Flibble wrote: neos isn't a Python package so that isn't a problem. It might be a bit confusing if it ever becomes part of the wider Python ecosystem, though. Python is but one language that neos will implement.

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 22:25, Dan Stromberg wrote: On Thu, Feb 11, 2021 at 2:00 PM Mr Flibble wrote: On 11/02/2021 21:13, Dan Stromberg wrote: Does your project have a name yet? I'd like to follow it through google alerts or an announcement mailing list. "neos" - https://

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 21:13, Dan Stromberg wrote: Does your project have a name yet? I'd like to follow it through google alerts or an announcement mailing list. "neos" - https://neos.dev/ https://github.com/i42output/neos /Flibble -- 😎 -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 18:24, Paul Bryan wrote: On Thu, 2021-02-11 at 17:56 +, Mr Flibble wrote: Actually it is a relatively small task due to the neos universal compiler's architectural design.  If it was a large task I wouldn't be doing it. When do you estimate this task will be comp

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 18:06, Chris Angelico wrote: On Fri, Feb 12, 2021 at 5:01 AM Mr Flibble wrote: On 11/02/2021 16:31, Dan Stromberg wrote: On Thu, Feb 11, 2021 at 4:35 AM Mr Flibble wrote: Hi! I am starting work on creating a new Python implementation from scratch using "neos" my

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 18:03, Chris Angelico wrote: In any case, it's not Python if it can't handle arbitrarily large numbers. Python is an excellent language for mathematics. I am also creating Ada and Haskell implementations which have a similar requirement. /Flibble -- 😎 -- https://mail.python.or

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 16:31, Dan Stromberg wrote: On Thu, Feb 11, 2021 at 4:35 AM Mr Flibble wrote: Hi! I am starting work on creating a new Python implementation from scratch using "neos" my universal compiler that can compile any programming language. I envision this implementa

Re: New Python implementation

2021-02-11 Thread Mr Flibble
On 11/02/2021 15:13, Chris Angelico wrote: On Thu, Feb 11, 2021 at 11:36 PM Mr Flibble wrote: Hi! I am starting work on creating a new Python implementation from scratch using "neos" my universal compiler that can compile any programming language. Is it your intention to supp

New Python implementation

2021-02-11 Thread Mr Flibble
Hi! I am starting work on creating a new Python implementation from scratch using "neos" my universal compiler that can compile any programming language. I envision this implementation to be significantly faster than the currently extant Python implementations (which isn't a stretch given ho

Python question

2020-03-07 Thread Mr . Lee Chiffre
Thank you Marco for at least taking the time to read my message even if you do not agree with me on things. And no disrespect to you. But I came here for python related questions and help. Not to be called suspicious and untrustworthy only because I am concerned about security of users and for b

Python question

2020-03-06 Thread Mr . Lee Chiffre
Thank you Marco for at least taking the time to read my message even if you do not agree with me on things. And no disrespect to you. But I came here for python related questions and help. Not to be called suspicious and untrustworthy only because I am concerned about security of users and for b

Python question

2020-03-06 Thread Mr. Lee Chiffre
Thank you Marco for at least taking the time to read my message even if you do not agree with me on things. And no disrespect to you. But I came here for python related questions and help. Not to be called suspicious and untrustworthy only because I am concerned about security of users and for bein

Re: Help building python application from source

2020-03-02 Thread Mr. Lee Chiffre via Python-list
> I think I have the solution, but can I ask you why are you creating a > bitcoin server? > Yes. I am a crypto anarchist. I have a bitcoin node to do my part to running the bitcoin network and help remain it decentralized and resilient. The more people that run a node the better it is. When it co

Re: Help building python application from source

2020-02-29 Thread Mr. Lee Chiffre
Thanks for the comments. > (To make OP's requirements plainly visible, note that this appears to > be a cryptocurrency application.) Correct. It is a software that does not store private keys but acts as a server to serve lightweight wallets that would connect to it remotely. Electrumx does not

Help building python application from source

2020-02-28 Thread Mr. Lee Chiffre
sorry re posting because I forgot subject line in last email. I am a python noob. This is why I ask the python masters. There is a python software I want to install on the server it is called Electrumx. https://github.com/kyuupichan/electrumx is the link. I am having troubles with installing t

Re: Python Resources related with web security

2019-11-26 Thread Mr. Gentooer
On Tue, Nov 26, 2019 at 03:29:48PM -0500, Joel Goldstick wrote: > On Tue, Nov 26, 2019 at 2:23 PM Mr. Gentooer wrote: > > > > > > On Mon, 25 Nov 2019 21:25:12 + (UTC), Pycode > > > > declaimed the following: > > > > > > > > comp.lang.p

Re: Python Resources related with web security

2019-11-26 Thread Mr. Gentooer
> > On Mon, 25 Nov 2019 21:25:12 + (UTC), Pycode > > declaimed the following: > > > > comp.lang.python gmane.comp.python.general how do you access these in a reasonable way? -- https://mail.python.org/mailman/listinfo/python-list

Re: Your IDE's?

2019-03-27 Thread Mr Zaug
On Monday, March 25, 2019 at 5:38:41 PM UTC-4, John Doe wrote: > What is your favorite Python IDE? "Your IDE's?" is not a question, nor is any word in English made plural with an apostrophe s. -- https://mail.python.org/mailman/listinfo/python-list

Re: Metaclasses - magic functions

2016-12-23 Thread Mr. Wrobel
W dniu 23.12.2016 o 15:14, Ian Kelly pisze: (...) cls.added_in_init = 'test' Man, you are awsome genius! Finally somebody was able to explain me what is the power of __new__ and difference between __init__ !!! So what I wanted to achieve was adding some new attributes to the class ins

Re: Metaclasses - magic functions

2016-12-23 Thread Mr. Wrobel
W dniu 21.12.2016 o 02:51, Ethan Furman pisze: On 12/20/2016 03:39 PM, Ben Finney wrote: "Mr. Wrobel" writes: Quick question, can anybody tell me when to use __init__ instead of __new__ in meta programming? Use ‘__new__’ to do the work of *creating* one instance from nothing;

Metaclasses - magic functions

2016-12-20 Thread Mr. Wrobel
Hi, Quick question, can anybody tell me when to use __init__ instead of __new__ in meta programming? I see that __new__ can be used mostly when I want to manipulate with class variables that are stored into dictionary. But when to use __init__? Any example? Thanx, M -- https://mail.python.

Re: [Theory] How to speed up python code execution / pypy vs GPU

2016-11-05 Thread Mr. Wrobel
W dniu 05.11.2016 o 22:17, Ben Bacarisse pisze: Steve D'Aprano writes: On Sun, 6 Nov 2016 04:10 am, Mr. Wrobel wrote: Hi, Some skeptics asked my why there is a reason to use Python against of any other "not interpreted" languages, like objective-C. Here's the &quo

[Theory] How to speed up python code execution / pypy vs GPU

2016-11-05 Thread Mr. Wrobel
Hi, Some skeptics asked my why there is a reason to use Python against of any other "not interpreted" languages, like objective-C. As my explanation, I have answered that there is a a lot of useful APIs, language is modern, has advanced objective architecture, and what is the most important -

Re: Meta classes - real example

2016-10-20 Thread Mr. Wrobel
W dniu 18.10.2016 o 16:42, Ethan Furman pisze: On 10/17/2016 11:44 PM, Mr. Wrobel wrote: Ok,so in general, we could say that using Metclasses is ok for manipulating __new__ but not that what is setting by __init__. Am I right? No and yes. In this code (python 2 syntax): #untested class

Re: Meta classes - real example

2016-10-17 Thread Mr. Wrobel
W dniu 17.10.2016 o 23:23, Ethan Furman pisze: On 10/17/2016 09:23 AM, Mr. Wrobel wrote: W dniu 17.10.2016 o 18:16, Chris Angelico pisze: On Tue, Oct 18, 2016 at 3:03 AM, Mr. Wrobel wrote: I am looking for an example of metaclass usage. Especially I am interestet in manipulating instance

Re: Meta classes - real example

2016-10-17 Thread Mr. Wrobel
W dniu 17.10.2016 o 18:16, Chris Angelico pisze: On Tue, Oct 18, 2016 at 3:03 AM, Mr. Wrobel wrote: Hi, I am looking for an example of metaclass usage. Especially I am interestet in manipulating instance variables, for example: My class: class MrMeta(type): pass class Mr(object

Meta classes - real example

2016-10-17 Thread Mr. Wrobel
Hi, I am looking for an example of metaclass usage. Especially I am interestet in manipulating instance variables, for example: My class: class MrMeta(type): pass class Mr(object): __metaclass__ = MrMeta def __init__(self): self.imvariable

Re: How to process syntax errors

2016-10-12 Thread mr . puneet . goyal
On Monday, October 10, 2016 at 7:45:40 PM UTC+5:30, mr.pune...@gmail.com wrote: > Hi > > Is there any way to capture syntax errors and process them ? I want to write > a function which calls every time whenever there is syntax error in the > program. > > For example, > > inside example.py >

Re: How to process syntax errors

2016-10-12 Thread mr . puneet . goyal
Hi All Its really good to see that some discussion happening around this topic. Sorry I was out from my work for sometime so couldn't follow up but I really find it useful. It gives me good opportunity to know python better as I recently started learning python. Ok so I tell you why I need to

How to process syntax errors

2016-10-10 Thread mr . puneet . goyal
Hi Is there any way to capture syntax errors and process them ? I want to write a function which calls every time whenever there is syntax error in the program. For example, inside example.py I just mention below line Obj = myClass() Obj xyz Obj is instance of a class. But there is synt

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Let me rephrase my question in other way. class myClass: def __init__(self, var): self.var = var myObj = myClass(abc) # I am calling instance with function name and arguments myObj func1 arg1 arg2 Can i associate any function like __init__ with instance ? Means if I just use in

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Well I jump from TCL to Python. And found that it was very convenient to use Procs there. So I was looking for that luxury in Python. I am not trying to reinvent the wheel. I was just curious to know if there is any possibility to create a caller function in my way (TCL) where I can call pyth

A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Hi I just started learning python. Is there any way to call functions in different way ? Rather calling obj.function(arg1, arg2) I would like to call like below "obj function arg1 arg2" this function is part of a class. class myClass: def function(arg1, arg2): # do something

Re: Looking for the best way to make this

2016-10-05 Thread mr . marydavid
Here is another example http://www.codetwo.com/media/images/exchange-sync-screencast-5.jpg -- https://mail.python.org/mailman/listinfo/python-list

Looking for the best way to make this

2016-10-05 Thread mr . marydavid
http://www.qualicode.com/EN/images/ScheduleGrid.png looking to add schedule like that to my software trying with Qt but not sure how to . -- https://mail.python.org/mailman/listinfo/python-list

Re: Generate config file from template using Python search and replace.

2015-12-01 Thread Mr Zaug
Ye, this does work. Many thanks! filename = "{NNN}_{BRAND}_farm.any".format(BRAND=brand, NNN=nnn) with open(filename, "w") as outstream: outstream.write(data) -- https://mail.python.org/mailman/listinfo/python-list

Re: Generate config file from template using Python search and replace.

2015-12-01 Thread Mr Zaug
That makes sense. So I still can't see how to write the string object to a file whist naming the file with whatever values I provided for the NNN and BRAND variables. Printing the contents of the string object is working with all the expected substitutions. Do I need to convert the string obje

Re: Generate config file from template using Python search and replace.

2015-12-01 Thread Mr Zaug
Actually, I don't understand what you mean by "all other braces." What braces are you talking about? The placeholders in the template file (the file being read in) have braces around them but they are not escaped. Also, do I really need curly braces to tell Python what my placeholders are? --

Re: Generate config file from template using Python search and replace.

2015-12-01 Thread Mr Zaug
Oh, that's much easier to read. Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Generate config file from template using Python search and replace.

2015-11-30 Thread Mr Zaug
On Monday, November 30, 2015 at 4:14:48 AM UTC-5, Peter Otten wrote: > Mr Zaug wrote: > > > On Sunday, November 29, 2015 at 5:50:51 PM UTC-5, Peter Otten wrote: > >> Mr Zaug wrote: > >> > >> > When I run this script on OS X El Capitan, I see, >

Re: Generate config file from template using Python search and replace.

2015-11-29 Thread Mr Zaug
On Sunday, November 29, 2015 at 5:50:51 PM UTC-5, Peter Otten wrote: > Mr Zaug wrote: > > > When I run this script on OS X El Capitan, I see, > > > > # permission sensitive cache > > $include "_dispatcher_shared_auth-checker: > > > > Was

Re: Generate config file from template using Python search and replace.

2015-11-29 Thread Mr Zaug
On Sunday, November 29, 2015 at 5:50:51 PM UTC-5, Peter Otten wrote: > Mr Zaug wrote: > > > When I run this script on OS X El Capitan, I see, > > > > # permission sensitive cache > > $include "_dispatcher_shared_auth-checker: > > > > Was

Re: I can't understand re.sub

2015-11-29 Thread Mr Zaug
On Sunday, November 29, 2015 at 8:12:25 PM UTC-5, Rick Johnson wrote: > On Sunday, November 29, 2015 at 3:37:34 PM UTC-6, Mr Zaug wrote: > > > The items I'm searching for are few and they do not change. They are > > "CONTENT_PATH", "ENV" and "

Re: I can't understand re.sub

2015-11-29 Thread Mr Zaug
Thanks. That does help quite a lot. -- https://mail.python.org/mailman/listinfo/python-list

I can't understand re.sub

2015-11-29 Thread Mr Zaug
I need to use re.sub to replace strings in a text file. I can't seem to understand how to use the re module to this end. result = re.sub(pattern, repl, string, count=0, flags=0); I think I understand that pattern is the regex I'm searching for and repl is the thing I want to substitute for what

Re: Generate config file from template using Python search and replace.

2015-11-29 Thread Mr Zaug
When I run this script on OS X El Capitan, I see, # permission sensitive cache $include "_dispatcher_shared_auth-checker: Was I supposed to incorporate it into the script I posted? -- https://mail.python.org/mailman/listinfo/python-list

Re: Generate config file from template using Python search and replace.

2015-11-28 Thread Mr Zaug
I should mention the template file is small, just 98 lines long and the working config file will be the same size. -- https://mail.python.org/mailman/listinfo/python-list

Generate config file from template using Python search and replace.

2015-11-28 Thread Mr Zaug
I need to generate a config file based on an existing "template" file. I need to replace a set of strings with other strings globally in the generated file. Here is a snippet of the template file, where CONTENT_PATH and DAMPATH are two "placeholders" or variables. There are several other such pl

Re: Sudoku solver

2015-03-29 Thread mr . smittye
On Wednesday, March 25, 2015 at 4:39:40 AM UTC-7, Marko Rauhamaa wrote: > A lot of discussion was generated by the good, old fibonacci sequence. I > have yet to find practical use for fibonacci numbers. However, the > technique behind a sudoku solver come up every now and again in > practical situa

Re: numpy array product driving me mad

2015-03-20 Thread Mr. Twister
>> I think that you want >> >> P * R[;,None] > > Sorry, I meant > > P * R[:, None] > > Manolo Muchísimas gracias, Manolo. Eres un genio y me has ayudado mucho. Te debo una. -- https://mail.python.org/mailman/listinfo/python-list

numpy array product driving me mad

2015-03-20 Thread Mr. Twister
Hi everyone. Hope you can help me overcome this "noob" issue. I have two numpy arrays: >>> P array([[[ 2, 3], [33, 44], [22, 11], [ 1, 2]]]) >>> R array([0, 1, 2, 3]) the values of these may of course be different. The important fact is that: >>> P.shape (1, 4, 2) >>>

Re: Can I trust downloading Python?

2013-09-11 Thread Mr. Roboto
On Saturday, September 7, 2013 9:17:46 PM UTC-4, Aaron Martin wrote: > Hi, I am thinking about getting a software but it requires python, so that > brought up a few questions. Is it safe do download python, and does it come > with spam or advertisements? If it doesn't then should I get the latest

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-15 Thread Mr. Joe
On Wed, May 15, 2013 at 12:15 PM, dieter wrote: > > If Python would automatically redecorate overridden methods in a derived > class, I would have no control over the process. What if I need > the undecorated method or a differently decorated method (an > uncached or differently cached met

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-14 Thread Mr. Joe
Sorry for digging this old topic back. I see that my "'property' does not play well with polymorphic code" comment generated some controversy. So here's something in my defense: Here's the link to stackoveflow topic I am talking about: http://stackoverflow.com/questions/237432/python-properties-a

Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Mr. Joe
I seem to stumble upon a situation where "!=" operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - """ # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function class DemoClass

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-03 Thread Mr. Joe
Thanks for clearing up. Developers of python should address this issue, in my opinion. 3.4/3.5 maybe, but better late than never. Recently, I've been beaten back for using some exotic features of python. One is this[ Took me hours to get to the bottom ]. The other one is 'property' decorator. I wa

Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-02 Thread Mr. Joe
Is there any way to raise the original exception that made the call to __getattr__? I seem to stumble upon a problem where multi-layered attribute failure gets obscured due to use of __getattr__. Here's a dummy code to demonstrate my problems: """ import traceback class BackupAlphabet(object):

How do I use PyGTK to put text besides clickable buttons?

2012-04-02 Thread Jason Hsu, Mr. Swift Linux
I've decided to use PyGTK instead of gtkdialog for providing configuration menus/dialog boxes in Swift Linux, the Linux distro I started. The problem with gtkdialog is that the i386 version is no longer available in the Debian repository. Since a picture is worth a thousand words, I'll give you a

Can I fully replace GNU Bash with Python?

2011-11-04 Thread Jason Hsu, Mr. Swift Linux
This question concerns my process of creating Swift Linux from the base distro (antiX Linux in the past, Linux Mint Debian Edition now). (NOTE: The process I'm describing here is an oversimplification.) All of my development work takes place in the ~/develop directory. This is the directory where

Learning to use decorators with classes

2009-06-30 Thread Mr SZ
Hi, I'm writing an LDAP plugin for my TG2 application. In this I wrote a small class based decorator with args to set up a connection and call the necessary functionality but I'm having problems with it. Here's my code: class getConnection(object): def __init__(self, settings, credentials)

Find the name of a setup tools plugin when its class is known.

2009-06-29 Thread Mr SZ
Hi, Using pkg_resources, I can iterate through the plugins in an entrypoint and note down the plugin classes and all using "pkg_resources.iter_entry_points(ENTRYPOINT)" Now, when the plugin is loaded, I want to know it's entrypoint name as I have to load a bunch of settings identified by the

getattr on a function

2009-04-27 Thread Mr SZ
Hi all, Is it possible to call functions using getattr. I have written a simple script with functions that call either SSL, TLS or plain functionality. something like: def func(): ... def funcSSL(): ... def funcTLS(): ... Now, based on my args I would like to call either one of them. I

Re: Emulate a printf() C-statement in Python???

2009-03-19 Thread Mr. Z
"Andrii V. Mishkovskyi" wrote in message news:mailman.2185.1237467269.11746.python-l...@python.org... On Thu, Mar 19, 2009 at 2:43 PM, Mr. Z wrote: > I'm trying emulate a printf() c statement that does, for example > > char* name="Chris"; > int age=30; >

Emulate a printf() C-statement in Python???

2009-03-19 Thread Mr. Z
I'm trying emulate a printf() c statement that does, for example char* name="Chris"; int age=30; printf("My name is %s", name); printf("My name is %s and I am %d years old.", %s, %d); In other words, printf() has a variable arguement list the we all know. I'm trying to do this in Python... clas

imaplib thread method anomaly

2009-02-03 Thread Mr SZ
Hi, I was looking at the thread functionality of IMAP4rev1 servers with the threading extension. Here is my output with debug=8 : 02:23.02 > GDJB3 UID THREAD references UTF-8 (SEEN) 02:23.02 < * THREAD (3)(2)(4)(1) 02:23.02 matched r'\* (?P[A-Z-]+)( (?P.*))?' => ('THREAD', ' (3)(2)

Re: Is there a better algorithm?

2009-01-02 Thread mr
As has been noted, the best is to fix the input to be regular-3- tuples. For the fun of it, here's another variation of a solution: tuples = [(1, 2), (3, 4, 5), (6, 7)] def triple_or_pair(seq): u = None try: k, u, v = seq except ValueError: k, v = seq return k, u,

Re: OT: Binary tree logarithms properties

2008-12-18 Thread Mr . SpOOn
2008/12/17 Terry Reedy : > Nodes only have single number indexes if you arrange them linearly. Then the > index depends on how you arrange them, whether you start the array indexes > with 0 or 1, and whether you start the level numbers with 0 or 1. Call the > breadth-first sequence bf. Then the 1

OT: Binary tree logarithms properties

2008-12-17 Thread Mr . SpOOn
Hi, I'm searching for a clear explanation of binary tree properties, expecially the ones related to logarithms. For example, I know that in a tree with 2n-1 nodes, we have log(n) levels, from 0 to log(n). So, if k is the level, the nodes on a level have indexes between 2^k and 2^(k+1)-1. For k=0

Re: Free place to host python files?

2008-12-16 Thread Mr . SpOOn
2008/12/16 feba : > Stuff like code.google, sf.net, are more oriented towards serious > development, not just holding random apps, aren't they? > > Anyway, I found MediaFire, which looks like it will suffice for now. Take a look to Dropbox (http://www.getdropbox.com/). You can use it to directly

Re: matching exactly a 4 digit number in python

2008-11-21 Thread Mr . SpOOn
2008/11/21 harijay <[EMAIL PROTECTED]>: > Hi > I am a few months new into python. I have used regexps before in perl > and java but am a little confused with this problem. > > I want to parse a number of strings and extract only those that > contain a 4 digit number anywhere inside a string > > How

Re: strange permission issue with nosetests

2008-11-20 Thread Mr . SpOOn
On Thu, Nov 20, 2008 at 13:34, Ben Finney <[EMAIL PROTECTED]> wrote: > Mr.SpOOn <[EMAIL PROTECTED]> writes: > >> Searching on google I found this: http://www.siafoo.net/article/61 >> He had the same issue and said to change permission of the file to 664. > > Unit test modules, which are primarily m

strange permission issue with nosetests

2008-11-20 Thread Mr . SpOOn
Hi, I'm trying the nose testing package. I've just started reading the tutorial and I had a problem with the first simple example. This is the test: def test_b(): assert 'b' == 'b' In the same directory I gave the command nosetests and it runs the test. Then I try with nosetests -v, but it

Re: Building musical chords starting from (a lot of) rules

2008-11-19 Thread Mr . SpOOn
I think I've found a nice way to represent and build chords. At least, at the moment it satisfy me, maybe later I'll understand how it sucks. I'm using two separate classes: one represent a chord and is implemented as a set of Notes; the other represents the structure (type) of the chord and is a

Re: Programming exercises/challenges

2008-11-19 Thread Mr . SpOOn
On Wed, Nov 19, 2008 at 3:41 PM, Philip Semanchuk <[EMAIL PROTECTED]> wrote: > I'm not sure why you'd need to host the Python code anywhere other than your > home computer. If you wanted to pull thousands of pages from a site like > that, you'd need to respect their robots.txt file. Don't forget to

Re: Programming exercises/challenges

2008-11-19 Thread Mr . SpOOn
On Wed, Nov 19, 2008 at 1:50 PM, Jeremiah Dodds <[EMAIL PROTECTED]> wrote: > If you need to do it on the extremely cheap, you can host on your own > machine on a port other than 80, make sure your router / firewall is > forwarding the port to your machine, and use dyndns (http://dyndns.com) to > gi

Re: Programming exercises/challenges

2008-11-19 Thread Mr . SpOOn
On Wed, Nov 19, 2008 at 1:35 PM, Jeremiah Dodds <[EMAIL PROTECTED]> wrote: > > Personally, I prefer a host that gives me root on a box (or virtual > machine). I've had a great time with slicehost (http://slicehost.com). Yes, I knew about slicehost, but it is expensive for what I need to do, that i

  1   2   >