Patrick Sheehan: Major Issues with Python

2023-03-26 Thread Patrick Sheehan
t;...I have been at this for 4 days now at least three hours each day...Any information or help you can provide would be greatly appreciated. Additionally, I do have PyCharm installed (As you can tell, I am a beginner), is PyCharm the same thing as Python? Thank you in advance! Respectfu

Pyserial problem

2022-12-22 Thread Patrick EGLOFF
works without any flow control, and CTS + DTR high. I checked with MINITERM, that the flow control and control lines have the same state. I'm a bit surprised and stucked. Can someone help ? Thanks, -- Patrick Egloff email : pegl...@gmail.com Web page : http://www.egloff.eu -- https://mail.

Fwd: pygame.midi input/output not working

2022-12-21 Thread Patrick EGLOFF
s for making my day ! Patrick Le mer. 21 déc. 2022 à 23:27, Thomas Passin a écrit : > On 12/21/2022 4:32 PM, Patrick EGLOFF wrote: > > HI, > > Some time ago I wrote a small software using pygame.midi > > It worked just fine with Win10/ python 3.9 / SDL 2.0.14 / pygame 2.0.1

pygame.midi input/output not working

2022-12-21 Thread Patrick EGLOFF
stop execution : my_input = pygame.midi.Input(MidiDeviceIn) midi_out = pygame.midi.Output(MidiDeviceOut) Does someone have a suggestion? Thanks, -- Patrick Egloff email : pegl...@gmail.com Web page : http://www.egloff.eu -- https://mail.python.org/mailman/listinfo/python-list

Python/New/Learn

2022-05-04 Thread Patrick 0511
Hello, I'm completely new here and don't know anything about python. Can someone tell me how best to start? So what things should I learn first? -- https://mail.python.org/mailman/listinfo/python-list

Re: Equivalent of "make install" for Python on windows?

2020-07-10 Thread Patrick Stinson
started to think I was missing something. Cheers, -Patrick > On Jul 10, 2020, at 8:01 AM, Patrick Stinson wrote: > > Building python from source on windows is straightforward enough with > PCBuild/build.bat. But it seems as though the resulting distribution that > runs from these

Equivalent of "make install" for Python on windows?

2020-07-10 Thread Patrick Stinson
always had the feeling that the distribution doesn’t really work correctly. Cheers, -Patrick -- https://mail.python.org/mailman/listinfo/python-list

Relative import cannot find .so submodule?

2020-01-11 Thread Patrick Stinson
/__init__.py gives the following error: Traceback (most recent call last): File "main.py", line 6, in from pkmidicron import MainWindow, util, ports File "/Users/patrick/dev/pkmidicron/pkmidicron/__init__.py", line 1, in from .mainwindow import * File "/Use

Problem Running Python

2019-12-16 Thread Patrick Igwilo via Python-list
language. Many thanks for the good work. Patrick. -- https://mail.python.org/mailman/listinfo/python-list

Building on windows and installing to prefix

2018-10-24 Thread Patrick Stinson
Hello! I am having trouble finding out how to build python from source and then install it to a path prefix, as you can on unix. I have looked at the options in “PCBuild\build.bat -h” and in readme.txt, and on google, but no dice. I have VS 2017. Thanks! -Patrick -- https://mail.python.org

Re: choice of web-framework

2017-10-22 Thread Patrick Vrijlandt
a provision for mistakes. The idea is much like the "revert" option that MoinMoin and other wikis provide. --Patrick -- https://mail.python.org/mailman/listinfo/python-list

choice of web-framework

2017-10-22 Thread Patrick Vrijlandt
tive. Finally, for a new project, I would not like to be confined to Python 2.7. What are your ideas? Thanks in advance, -- Patrick -- https://mail.python.org/mailman/listinfo/python-list

Compiling Python for iOS 11

2017-09-24 Thread Patrick Stinson
Has anyone successfully compiled python for iOS 11? I tried with 3.5.2 and 3.6.2 and got the following errors: turin:Python-3.6.2 patrick$ make Makefile:9845: warning: overriding commands for target `.obj/_pickle.o' Makefile:8855: warning: ignoring old commands for target `.obj/_pic

Re: Web Frameworks

2017-03-09 Thread Patrick McFarling
On Thursday, 9 March 2017 05:05:37 UTC-5, David Froger wrote: > There is a free ebook on the subject on O'Reilly: > http://www.oreilly.com/web-platform/free/python-web-frameworks.csp > > Hope it helps, > David > > > Quoting Patrick McFarling (2017-03-09 10:24:16)

Web Frameworks

2017-03-09 Thread Patrick McFarling
I would like to know what are the pros and cons of the web frameworks made in python. The one I tend to lean towards is Flask. -- https://mail.python.org/mailman/listinfo/python-list

Re: Work between multiple processes

2017-01-10 Thread Patrick Zhou
Hi Irmen, I have successfully got it to work with both side as python but so far having trouble with pyrolite.jar which is downloaded from https://mvnrepository.com/artifact/net.razorvine/pyrolite/4.4 Having simple codes as: public static void main(String[] args) { //System.out.pr

Re: Work between multiple processes

2017-01-06 Thread Patrick Zhou
t; work process to terminate so to return. > > > > > > either (1) or (2) doesn't work out well. Please suggest. Global system > > queue? > > > > Thanks, > > Patrick. > > > > > Is it a requirement that the workdf process is also

Building manylinux wheels & auditwheel

2016-10-21 Thread Patrick Young
4/ld-linux-x86-64.so.2 (0x5619467b3000) Any help would be greatly appreciated! I'm experiencing the same thing across the board with other builds I've been trying to manylinuxize. Thanks! -Patrick -- https://mail.python.org/mailman/listinfo/python-list

Pop ups.

2016-03-23 Thread Patrick Rugamba
Hello, This thing is making me run crazy. Am having these pop ups as I try using pycharm saying modify setup, and it is really annoying. I have no clue what is causing it but if it can’t be fixed I’d rather uninstall the programs because I may end up destroying my pc. I hope you guys can help. T

Re: How can I export data from a website and write the contents to a text file?

2015-11-19 Thread Patrick Hess
l vary depending on the operating system, are chosen automatically. with open("test.txt", "w") as textfile: textfile.write("line 1\n") textfile.write("line 2") This produces "line 1\nline 2" on Unix systems and "line 1\r\nline 2" on Windows. Also involves less typing this way. ;-) Patrick -- https://mail.python.org/mailman/listinfo/python-list

Re: surprise - byte in set

2015-01-03 Thread patrick vrijlandt
Dear all, Many thanks for your responses. I never realised this difference between 'bytes' and 'string'. Thanks, Patrick --- Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware. http://www.avast.com -- https://mail.python.org/mailman/listinfo/python-list

surprise - byte in set

2015-01-03 Thread patrick vrijlandt
t;>> b'b' in b'abc' True >>> 'b' in set('abc') True >>> b'b' in set(b'abc') False I was surprised by the last result. What happened? (Examples simplified; I was planning to manipulate the set) Patrick --- Dit e-

Re: Python and GUI development

2014-12-01 Thread Patrick Stinson
I’ve been using PyQt for 10 years. Absolutely fabulous, fun, and I imagine the others are also excellent as they have all been around long enough to die naturally if they were not very useful. > On Dec 1, 2014, at 3:13 AM, Chris Angelico wrote: > > On Mon, Dec 1, 2014 at 10:55 PM, Ganesh Pal

Re: Embedded python 'scripting engine' inside Python app

2014-11-24 Thread Patrick Stinson
> On Nov 23, 2014, at 4:57 AM, Chris Angelico wrote: > > On Mon, Nov 24, 2014 at 12:20 AM, Patrick Stinson > wrote: >> I think this is the way I’ll take it, and for all the same reasons. The only >> way they can break it is if they really want to. I guess anythin

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
> On Nov 24, 2014, at 2:44 AM, Ned Batchelder wrote: > > On 11/23/14 5:10 AM, Patrick Stinson wrote: >> I am defining a single class with a destructor method that prints >> ‘__del__’, and running that source code string using exec with the >> module’s dict li

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
> On Nov 24, 2014, at 6:12 AM, Ian Kelly wrote: > > > On Nov 24, 2014 1:27 AM, "Patrick Stinson" <mailto:patrickk...@gmail.com>> wrote: > > > > How does the __del__ method have a reference to the module’s globals dict? > > because it refe

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
ote: > > > On Nov 23, 2014 4:10 AM, "Patrick Stinson" <mailto:patrickk...@gmail.com>> wrote: > > m = types.ModuleType('mine') > > exec(s, m.__dict__) > > print('deleting...') > > m = None > > print('done') >

Re: Embedded python 'scripting engine' inside Python app

2014-11-24 Thread Patrick Stinson
ico wrote: > > On Sun, Nov 23, 2014 at 9:28 PM, Patrick Stinson > wrote: >> Thanks for your great reply. I even augmented the reloading with the same >> dict by clearing all of the non-standard symbols from the dict. This >> effectively resets the dict: > > You may

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
On Nov 23, 2014, at 5:56 PM, Ned Batchelder wrote: > > On 11/23/14 1:49 AM, Patrick Stinson wrote: >> If I create a module with imp.new_module(name), how can I unload it so that >> all the references contained in it are set to zero and the module is >> deleted?

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
.. done __del__ I the “__del__" to come between “deleting…” and “done”. This is not being run from the interactive interpreter by via a .py file. > On Nov 23, 2014, at 12:56 AM, Ian Kelly wrote: > > On Sun, Nov 23, 2014 at 2:48 AM, Ian Kelly wrote: >> On Sat, Nov 22, 2014

Re: Embedded python 'scripting engine' inside Python app

2014-11-24 Thread Patrick Stinson
to automate your app? Thanks! > On Nov 23, 2014, at 12:24 AM, Chris Angelico wrote: > > On Sun, Nov 23, 2014 at 4:48 PM, Patrick Stinson > wrote: >> I am writing a python app (using PyQt, but that’s not important here), and >> want my users to be able to write their own sc

unloading a module created with imp.new_module

2014-11-23 Thread Patrick Stinson
If I create a module with imp.new_module(name), how can I unload it so that all the references contained in it are set to zero and the module is deleted? deleting the reference that is returned doesn’t seem to do the job, and it’s not in sys.modules, so where is the dangling reference? Thanks!

Embedded python 'scripting engine' inside Python app

2014-11-23 Thread Patrick Stinson
I am writing a python app (using PyQt, but that’s not important here), and want my users to be able to write their own scripts to automate the app’s functioning using an engine API hat I expose. I have extensive experience doing this in a C++ app with the CPython api, but have no idea how to do

Re: "Backward"-Iterator - Beginners question

2013-11-01 Thread patrick vrijlandt
with Your hints I get what I want. Well, if you want to iterate over a SQL result backwards, I would seriously consider modifying the SELECT to yield the results in the right order. That would avoid keeping the list in memory and makes best use of the database. -- patrick -- https://mail.python

Re: personal library

2013-10-31 Thread patrick vrijlandt
gt; enough with the basics to clone someone else's project, pull changes > from upstream, and see where it's at. > > ChrisA Thank you all. I will download and start learning! -- patrick -- https://mail.python.org/mailman/listinfo/python-list

Re: personal library

2013-10-30 Thread patrick vrijlandt
e way to go, or is there another "distributed version control system" that I should shortlist? -- patrick -- https://mail.python.org/mailman/listinfo/python-list

personal library

2013-10-29 Thread patrick vrijlandt
brary on a network share and local copies on each computer, but of course I forget to synchronise often enough. As said, python is a hobby, and the solution should be as lightweight as possible! I'm usually on windows (vista, xp or 7). Thanks! -- patrick -- https://mail.python.org/mailman/

Pickle virtual machines implemented in other languages?

2013-10-29 Thread Patrick
Hi Everyone I was just wondering if anyone had tried to implement a pickle virtual machine in another language? I was thinking that it might make for a nice little form of cross language IPC within a trusted environment. -- https://mail.python.org/mailman/listinfo/python-list

calculating download speed from .pcap file

2013-10-11 Thread patrick
hi, im looking for a way to calculate download speed for a http connection inside my .pcap file. but doing even a simple read with dpkt doesnt really work. import pcap, dpkt import socket pcapReader = dpkt.pcap.Reader(file("http-download.pcap")) for ts, data in pcapReader: print ts, len(d

Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it?

2013-09-19 Thread patrick vrijlandt
restart(): > > This may be caused by the code before 'def'. Post the whole program. It may also have to do with having both tabs and spaces in one source file. Python cannot recognise the indentation if you do that. Replace al tabs by 4 spaces. -- patrick -- https://mail.python.org/mailman/listinfo/python-list

[JOB] Look for a Full Time Plone Developer

2013-06-06 Thread Patrick Waldo
Hi All, Please take a look at a new job opportunity for Python/Plone developers. Patrick Waldo, Project Manager Decernis <http://decernis.com/> *Job Description: Full Time Python/Plone Developer* We are looking for a highly motivated and self-reliant developer to work on systems buil

[JOB] Two opportunities at Decernis

2013-04-28 Thread Patrick Waldo
, cgam...@decernis.com. Best Patrick Project Manager Decernis News & Issue Management *Job Description: Full-Time Senior Software Engineer* We are looking for a highly effective senior software engineer with experience in both development and client interaction. Our company provides gl

Upgrading Python with NumPy, SciPy and Mayavi in a Rocks 6.0 cluster

2013-01-13 Thread Patrick Haley
Hi, We are looking for some guidance in installing an upgraded Python on our cluster. Our cluster was installed with Rocks 6.0, is running CentOs 6.2, and has python-2.6.6, gcc-4.4.6. We would like to install an upgraded version of Python along with the following modules NumPy Scipy (which w

AW: Android

2012-03-16 Thread Szabo, Patrick (LNG-VIE)
ompany registered in England and Wales having company number 03985643. Registered Office: Airwave Solutions Ltd, Charter Court, 50 Windsor Road, Slough, Berkshire, SL1 2EJ. . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo XSLT Developer LexisNexis A-1030 Wien, Marxerga

Windows Contextmenu

2012-03-13 Thread Szabo, Patrick (LNG-VIE)
__name__ == "__main__": main() Now the script runs fine but I don't get all arguments from sys.argv. No mather how many files I mark in the explorer I only get one as an argument. Can anyone tell me how to overcome this issue ? Best regards . . . . . .

Pythonbrew is not installing Python 2.7 successfully

2011-12-05 Thread Patrick Wayodi
ew install --force python27 root@debian:~# The log file build.log was empty. Please help me. Patrick. -- http://mail.python.org/mailman/listinfo/python-list

Re: match, concatenate based on filename

2011-11-03 Thread Patrick Maupin
On Nov 3, 9:55 pm, Matt wrote: > Hi All, > > I am trying to concatenate several hundred files based on their filename..   > Filenames are like this: > > Q1.HOMOblast.fasta > Q1.mus.blast.fasta > Q1.query.fasta > Q2.HOMOblast.fasta > Q2.mus.blast.fasta > Q2.query.fasta > ... > Q1223.HOMOblast.fasta

Re: Question about metaclass

2011-11-01 Thread Patrick Maupin
On Nov 1, 11:02 pm, Makoto Kuwata wrote: > Hi, > > I want to define a special class which groups functions, like: > >     class Greepting(FuncGroup): >         def hello():          # no self, no @staticmethod! >             print("Hello!") >         def goodbye():        # no self, no @staticmeth

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-10-31 Thread Patrick Maupin
On Oct 31, 9:12 pm, Dave Angel wrote: > I would claim that a well-written (in C) translate function, without > using the delete option, should be much quicker than any python loop, > even if it does copy the data. Are you arguing with me? I was agreeing with you, I thought, that translate would

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-10-31 Thread Patrick Maupin
On Mon, Oct 31, 2011 at 4:08 PM, Dave Angel wrote: Yes. Actually, you don't even need the split() -- you can pass an optional deletechars parameter to translate(). On Oct 31, 5:52 pm, Ian Kelly wrote: > That sounds overly complicated and error-prone. Not really. > For instance, split() wil

Re: Assigning generator expressions to ctype arrays

2011-10-29 Thread Patrick Maupin
On Oct 28, 3:24 pm, Terry Reedy wrote: > On 10/28/2011 2:05 PM, Patrick Maupin wrote: > > > On Oct 27, 10:23 pm, Terry Reedy  wrote: > >> I do not think everyone else should suffer substantial increase in space > >> and run time to avoid surprising you. > >

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Patrick Maupin
On Oct 28, 8:01 pm, Steven D'Aprano > > ALREADY LOSES DATA if the iterator isn't the right size and it raises an > > exception. > > Yes. What's your point? This fact doesn't support your proposal in the > slightest. You earlier made the argument that "If the slice has too few elements, you've just

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Patrick Maupin
On Oct 28, 4:51 pm, Patrick Maupin wrote: > On Oct 28, 3:19 am, Terry Reedy wrote: > > > On 10/28/2011 3:21 AM, Steven D'Aprano wrote: > > > > If the slice has too few elements, you've just blown away the entire > > > iterator for no good reason. >

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Patrick Maupin
On Oct 28, 3:19 am, Terry Reedy wrote: > On 10/28/2011 3:21 AM, Steven D'Aprano wrote: > > > If the slice has too few elements, you've just blown away the entire > > iterator for no good reason. > > If the slice is the right length, but the iterator doesn't next raise > > StopIteration, you've jus

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Patrick Maupin
On Oct 27, 10:23 pm, Terry Reedy wrote: > I do not think everyone else should suffer substantial increase in space > and run time to avoid surprising you. What substantial increase? There's already a check that winds up raising an exception. Just make it empty an iterator instead. > > It vio

Re: __dict__ attribute for built-in types

2011-10-27 Thread Patrick Maupin
On Oct 27, 9:46 pm, candide wrote: > Le 28/10/2011 02:02, MRAB a crit : > > > > > No, built-in classes written in C have certain limitations, but why > > would you want to do that anyway? > > Mainly for learning purpose and Python better understanding. > > Actually, I have a class of mine for draw

Re: Assigning generator expressions to ctype arrays

2011-10-27 Thread Patrick Maupin
On Oct 27, 5:31 pm, Steven D'Aprano wrote: > From the outside, you can't tell how big a generator expression is. It has no > length: I understand that. > Since the array object has no way of telling whether the generator will have > the correct size, it refuses to guess. It doesn't have to gu

Assigning generator expressions to ctype arrays

2011-10-27 Thread Patrick Maupin
Bug or misunderstanding? Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> x = 32 * [0] >>> x[:] = (x for x in xrange(32)) >>> from ctypes import c_uint >>> x = (32 * c_uint)() >>> x[:] = xrange(32) >>

Re: Dealing with name clashes in pypi

2011-05-23 Thread Patrick Sabin
On 2011-05-22 23:23, Terry Reedy wrote: On 5/22/2011 2:34 PM, Patrick Sabin wrote: I wanted to register my project (epdb) in pypi. Unfortunately there already exists a project with the same name. It is not possible for me to change the name of the project, because I used it in multiple writings

Dealing with name clashes in pypi

2011-05-22 Thread Patrick Sabin
project under a different name in pypi than the actual project name? -- Patrick -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes and twain_32.dll

2011-05-02 Thread Patrick Vrijlandt
ives a different response if it cannot find the requested DLL. Patrick -- http://mail.python.org/mailman/listinfo/python-list

ctypes and twain_32.dll

2011-04-30 Thread Patrick Vrijlandt
f sending any arguments. Also, contrary to the .NET example, I cannot express that the DLL entrypoint has ordinal 1. Of course, I may be totally wrong! I'm hoping for your suggestions! TIA, Patrick -- http://mail.python.org/mailman/listinfo/python-list

Re: enhanced map function

2011-03-17 Thread Patrick
],4]; b = [1, [2, 3], 4,5] shortest: a will be adjusted to [1, [3, 4],4] b will be adjusted to [1, [2, 3],4] longest: a will be adjusted to [1, 2,[3, 4],4,4] b will be adjusted to [1, 1,[2, 3],4,5] As I said previously, the enhance_map function will only handle limited "unma

Re: Calling C++ Modules in Python

2011-03-11 Thread Patrick
ers. Correct me if I am wrong. Cheers, -Patrick. On Mar 11, 4:32 pm, Sophie Sperner wrote: > Hi Patrick, > > I'm using SWIG in my project. C++ code is wrapped and can be used in > python as custom module. > You should create a swig module.i file to describe headers upon which &

Calling C++ Modules in Python

2011-03-11 Thread Patrick
pers again?). SWIG (It works by taking the declarations found in C/C++ header and using them to generate the wrapper code that scripting languages need to access the underlying C/C++ code). Thanks -Patrick -- http://mail.python.org/mailman/listinfo/python-list

enhanced map function

2011-03-11 Thread Patrick
is a constant at the first point, then it feeds constant value to all other iterable combinations. Any tip is appreciated. -Patrick. def Add (x,y): return x+y def Bmap(function, *args): num = 0 for iter in args[0:]: if num < len(iter):

Re: audio time-stretching?

2010-09-11 Thread Patrick Charron
On Tue, 07 Sep 2010 15:33:55 +, kj wrote: > Does anyone know of a Python module for *moderate* "time-stretching"[1] > an MP3 (or AIFF) file? > > FWIW, the audio I want to time-stretch is human speech. If you are running your script on Linux you may use gstreamer(pyGST). With gstreamer you c

importing excel data into a python matrix?

2010-09-01 Thread patrick mcnameeking
Hello list, I've been working with Python now for about a year using it primarily for scripting in the Puredata graphical programming environment. I'm working on a project where I have been given a 1000 by 1000 cell excel spreadsheet and I would like to be able to access the data using Python. Do

Re: Diff of Text

2010-06-04 Thread Patrick Maupin
On Jun 3, 9:54 pm, GZ wrote: > Hi All, > > I am looking for an algorithm that can compare to source code files > line by line and find the minimum diff. I have looked at the difflib > included in python. The problem is that it is designed to make the > diff results easier for humans to read, inste

Re: signed vs unsigned int

2010-06-04 Thread Patrick Maupin
On Jun 2, 6:25 am, John Machin wrote: > On Jun 2, 4:43 pm, johnty wrote: > > > i'm reading bytes from a serial port, and storing it into an array. > > > each byte represents a signed 8-bit int. > > > currently, the code i'm looking at converts them to an unsigned int by > > doing ord(array[i]). h

Re: Another "Go is Python-like" article.

2010-05-22 Thread Patrick Maupin
On May 22, 6:14 pm, Steven D'Aprano wrote: > On Sat, 22 May 2010 12:13:30 -0700, Patrick Maupin wrote about the lack > of exceptions in Go: > > > Looking at their rationale, it is appears that one or more of the > > primary go developers had to deal way too often with

Re: where are the program that are written in python?

2010-05-22 Thread Patrick Maupin
On May 21, 10:30 pm, Chris Rebert wrote: > Erm, in fairness, I recall hearing that some speed-critical bits of hg > are written in C. It does lend credence to the "Python as glue > language" argument though; I doubt hg's extensibility and friendly > interface would have been as easy to implement

Re: where are the program that are written in python?

2010-05-22 Thread Patrick Maupin
On May 22, 1:49 pm, Terry Reedy wrote: > Because, as I said, and as you explain further, Python favors programmer > speed, including speed of testing new algorithms, over raw execution > speed of current algorithms. (Current) speed is (also) easier to test > than improvability and hence possible

Re: Another "Go is Python-like" article.

2010-05-22 Thread Patrick Maupin
On May 22, 5:00 am, Michele Simionato wrote: > On May 21, 4:20 pm, Grant Edwards wrote: > > > What about Go, exactly, do people see as Python-like? > > The philosophy of keeping things simple. I find the concurrency > mechanism quite Pythonic. That's nice. > Moreover Go interfaces are quite aki

Re: where are the program that are written in python?

2010-05-22 Thread Patrick Maupin
On May 22, 2:43 am, sturlamolden wrote: > On 21 Mai, 20:20, Patrick Maupin wrote: > > Also, any company in a competitive > > market where execution speed is extremely important might choose some > > other language because, frankly, the fact that a development tool is >

Re: where are the program that are written in python?

2010-05-21 Thread Patrick Maupin
On May 21, 9:12 pm, Ben Finney wrote: > a...@pythoncraft.com (Aahz) writes: > > In article > > , > > Patrick Maupin   wrote: > > > >There are a lot of commercial programs written in Python.  But any > > >company which thinks it has a lock on some kind

Re: where are the program that are written in python?

2010-05-21 Thread Patrick Maupin
On May 21, 8:45 pm, a...@pythoncraft.com (Aahz) wrote: > In article > , > Patrick Maupin   wrote: > >There are a lot of commercial programs written in Python.  But any > >company which thinks it has a lock on some kind of super secret sauce > >isn't going to use P

Re: where are the program that are written in python?

2010-05-21 Thread Patrick Maupin
On May 21, 5:21 am, Deep_Feelings wrote: > i could not see many programs written in python Well you could try PyPi, or even a search on googlecode. > (i will be interested > more in COMMERCIAL programs written in python ). What do you mean by commercial, and why? > and to be honest ,i > tried

Re: optional argument to a subclass of a class

2010-05-20 Thread Patrick Maupin
On May 20, 10:35 pm, Alex Hall wrote: > So how do I get at anything inside **kw? Is it a list? It's a dictionary. Use *args for a list. (As with self, the name is whatever you want to use, but some sort of consistency is nice.) One of the cool things about Python is how easy it is to play at

Re: optional argument to a subclass of a class

2010-05-20 Thread Patrick Maupin
On May 20, 9:56 pm, Alex Hall wrote: > Hi all, > I am now trying to allow my classes, all of which subclass a single > class (if that is the term), to provide optional arguments. Here is > some of my code: > > class Craft(): >  def __init__(self, >  name, >  isAircraft=False, >  id=helpers.id(), >

Re: starting repl programmatically

2010-05-20 Thread Patrick Maupin
On May 20, 6:57 pm, Brendan Miller wrote: > I have a python script that sets up some environmental stuff. I would > then like to be able to change back to interactive mode and use that > environment. What's the best way to do that? >>> import cmd >>> class MyCmd(cmd.Cmd): ... def default(self,

Re: Newbie Alert: subprocess.call

2010-05-19 Thread Patrick Maupin
On May 19, 10:28 pm, Ben Finney wrote: > Better is to use ‘shlex.split’ to split the string as a shell parser > would do http://docs.python.org/library/shlex#shlex.split>. Good point. I always forget about shlex.split because I'm usually passing (relatively) constant strings with no funny quoti

Re: Newbie Alert: subprocess.call

2010-05-19 Thread Patrick Maupin
On May 19, 9:27 pm, Carbon wrote: > I am new to Python and am trying to write a GUI wrapper script in python > 2.5 to get username and passwords from Linux users to send as options to > run an app on a 2X terminal server. I came across the easygui module and > its multpasswordbox function, which m

Re: help need to write a python spell checker

2010-05-18 Thread Patrick Maupin
On May 14, 3:19 am, "harry k" wrote: > Write a spell checking tool that will identify all misspelled word in a text > file using a provided dictionary. Well, this has been educational. Both my daughters just finished their final exams last week, so I was confused about seeing the homework assi

Re: recall function definition from shell

2010-05-18 Thread Patrick Maupin
On May 18, 1:41 pm, superpollo wrote: > Patrick Maupin ha scritto: > > > > > On May 18, 12:31 pm, superpollo wrote: > >>  >>> def myfun(): > >> ...     return "WOW" > >> ... > >>  >>> myfun() > &g

Re: recall function definition from shell

2010-05-18 Thread Patrick Maupin
On May 18, 12:31 pm, superpollo wrote: >  >>> def myfun(): > ...     return "WOW" > ... >  >>> myfun() > 'WOW' >  >>> > > now, i would like to "list" the funcion definition, something like this: > >  >>> myfun.somethinglikethis() > def myfun(): >      return "WOW" >  >>> > > is there something lik

Re: Picking a license

2010-05-18 Thread Patrick Maupin
On May 18, 11:03 am, Robert Kern wrote: > On 2010-05-16 09:25 , Ed Keith wrote: > > No, the GPL makes it clear that the responsibly is on the distributor to > > either supply the source or written notice, Caveat venditor. The violation > > exists regardless of whether or not the recipient makes

Re: getting attributes and methods of class without creating object

2010-05-17 Thread Patrick Maupin
On May 17, 10:52 pm, shuvro wrote: > Suppose I have a class like this - > > class myClass(object): > >     def __init__(self): >         self.a = 10 >         self.b = 20 > >     def my_method(self,var = 20): >         self.local_var = var > > I want to know about its method(__init__ and my_method

Re: classes and __init__ question

2010-05-17 Thread Patrick Maupin
On May 17, 3:55 pm, Alex Hall wrote: > So what is a subclass compared to a class? Are you saying that what is > passed to the class, so what is in the parentheses of the class, is > really the superclass? If so, what is the advantage of doing this; why > not just create a class that is not a sub?

Re: classes and __init__ question

2010-05-17 Thread Patrick Maupin
On May 17, 3:19 pm, Alex Hall wrote: > Hi all, > I am a bit confused about classes. What do you pass a class, since all > the actual information is passed to __init__? For example, say you > have a dog class. The dog object has a name, a size, and a color. I > believe you would say this: > > class

Re: python application question

2010-05-17 Thread Patrick Maupin
On May 17, 8:20 am, a wrote: > ps someone helped me with enumerate(), which works on the linux but > not on the windows? enumerate() works fine on windows. Perhaps your windows box has a really old Python? Regards, Pat -- http://mail.python.org/mailman/listinfo/python-list

Re: global variables in imported modules

2010-05-16 Thread Patrick Maupin
On May 16, 5:38 pm, James Mills wrote: > On Mon, May 17, 2010 at 8:26 AM, vsoler wrote: > > However, can I be 100% sure that,no matter how I access variable > > 'x' (with config.x or mod.config.x) it is always the same 'x'. I mean > > that either reference of 'x' points to the same id(memory posi

Re: global variables in imported modules

2010-05-16 Thread Patrick Maupin
On May 16, 4:42 pm, vsoler wrote: > Taken fromwww.python.org, FAQ 2.3 How do I share global variables > across modules? > > config.py: > > x = 0   # Default value of the 'x' configuration setting > > mod.py: > > import config > config.x = 1 > > main.py: > > import config       # try removing it >

Re: imports and exec

2010-05-16 Thread Patrick Maupin
On May 16, 1:51 pm, Paul Carter wrote: > We are using python for our build system. Each subproject dir has a > python script that builds it. Parent dirs have python scripts that > recurse into their children and use exec to invoke the python scripts. > Recently we discovered that one of the python

Re: Picking a license

2010-05-16 Thread Patrick Maupin
On May 16, 9:19 am, Ed Keith wrote: > --- On Sat, 5/15/10, Lawrence D'Oliveiro > wrote: > > >> But what about the “freedom” to take away > > other > > >> people’s freedom? Is that really “freedom”? > > > > Yes. > > > But that’s a “freedom” that non-GPL licences do not > > give you, that the GPL

Re: write a 20GB file

2010-05-15 Thread Patrick Maupin
On May 15, 7:09 pm, Dave Angel wrote: > Nathan Rice wrote: > > This is precisely the situation mmap was made for :)  It has almost the same > > methods as a file so it should be an easy replacement. > > > > > Only on a 64bit system, and I'm not sure it's even possible there in > every case.  On a

Re: write a 20GB file

2010-05-15 Thread Patrick Maupin
On May 15, 7:09 pm, Dave Angel wrote: > Nathan Rice wrote: > > This is precisely the situation mmap was made for :)  It has almost the same > > methods as a file so it should be an easy replacement. > > > > > Only on a 64bit system, and I'm not sure it's even possible there in > every case.  On a

Re: Picking a license

2010-05-15 Thread Patrick Maupin
On May 15, 2:59 pm, Paul Boddie wrote: [Rest of the post, that contains points previously debated and well- refuted, snipped] > Any claim that a licensing change is needed merely to let people > develop open source applications on the platform is dishonest, See, there you go again, impugning th

Re: Picking a license

2010-05-15 Thread Patrick Maupin
On May 15, 12:49 pm, Albert van der Horst wrote: > In article > <7bdce8a7-bf7d-4f1f-bc9d-1eca26974...@d27g2000yqc.googlegroups.com>, > Patrick Maupin   wrote: > > > >That is correct.  All "privileges" as you put it are merely things > >that a user can

Re: Picking a license

2010-05-15 Thread Patrick Maupin
On May 14, 8:04 am, Ethan Furman wrote: > Steven D'Aprano wrote: >> You've never had to recode something because it was nominally available >> under a proprietary licence that you (or your client) was unwilling to >> use? Lucky you! > Steven, did you actually read what he wrote?  If you did, why

  1   2   3   4   5   6   7   >