Can't run program

2020-05-19 Thread Ryan Harrington
Hi - I'm not the least bit technical. Trying to learn through YouTube. I've gotten exit code 1, 2, 106. Tried setting up the project interpreter and can't figure it out. Tried uninstalling and reinstalling everything and still having problems. Any feedback appreciated. Than

Re: [Scons-users] SCons Version 3.0.3 Released

2019-01-08 Thread Ryan Schmidt
On Jan 7, 2019, at 21:26, Bill Deegan wrote: > A new SCons release, 3.0.3, is now available on the SCons download page: > > https://scons.org/pages/download.html > > > Here is a summary of the changes since 3.0.1: It would have been good to mention the changes since 3.0.2, whi

Re: Overwhelmed by the Simplicity of Python. Any Recommendation?

2018-11-06 Thread Lie Ryan
> I like to step through my code line by line, > it's impossible to do it with > object-oriented programming language. I suggest pudb, it's a curses based debugger, which is nicer than pdb, but doesn't require tedious IDE setup. > Also, there's no good REPL IDE. Not quite sure what you meant b

RE: email automation

2018-10-23 Thread Ryan Johnson
Consider a web service API…Not really sure about where you want to evaluate your incoming emails, but perhaps MailChimp could help. https://mailchimp.com/features/marketing-automation/ There are a bunch of ways to automate things with web services now, using Zapier. https://mailchimp.com/feature

RE: Advice on law firm

2018-10-17 Thread Ryan Johnson
Correction: specializing in warranty of merchantability, software licenses, and possibly class action suits. Sent from Mail for Windows 10 From: Ryan Johnson Sent: Wednesday, October 17, 2018 9:26 PM To: python-list@python.org Subject: Advice on law firm Anyone know a good US based law firm

Advice on law firm

2018-10-17 Thread Ryan Johnson
Anyone know a good US based law firm that specializes in software licenses and class action suits? Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

RE: ESR "Waning of Python" post

2018-10-16 Thread Ryan Johnson
Have seen this waning of python thread so many times. Hoping it would have waned by now. Lol. Sent from Mail for Windows 10 From: jfine2...@gmail.com Sent: Tuesday, October 16, 2018 12:42 PM To: python-list@python.org Subject: Re: ESR "Waning of Python" post On Tuesday, October 16, 2018 at 8:00

RE: Wikipedia on Python

2018-10-16 Thread Ryan Johnson
Not really having read the whole story here, just wanna say that Wikipedia articles already suffer from a tug-of-war between professionals and students. Don’t worsen the problem. Include lay explanation and go into the technical details in a natural progression. Don’t force the reader to make la

RE: Single DB connection during class's lifetime. Metaclass,singletonand __new__() examples and references.

2018-10-15 Thread Ryan Johnson
Thank you. That clears everything up. Sent from Mail for Windows 10 From: Cameron Simpson Sent: Saturday, October 13, 2018 6:06 PM To: Ryan Johnson Cc: python-list@python.org Subject: Re: Single DB connection during class's lifetime. Metaclass,singletonand __new__() examples and references

RE: Single DB connection during class's lifetime. Metaclass,singleton and __new__() examples and references.

2018-10-12 Thread Ryan Johnson
AM To: python-list@python.org Subject: Re: Single DB connection during class's lifetime. Metaclass,singleton and __new__() examples and references. On 12/10/2018 01:19, Ryan Johnson wrote: > I am working on using mysql.connector in a class and have found an example of > how to crea

Single DB connection during class's lifetime. Metaclass, singleton and __new__() examples and references.

2018-10-11 Thread Ryan Johnson
I am working on using mysql.connector in a class and have found an example of how to create a single connection that spans the lifetime of all instances of the class: https://softwareengineering.stackexchange.com/a/358061/317228 however, I do not understand a few things about the class, includ

Re: Python doesn't install

2018-10-10 Thread Ryan Johnson
ttps://mail.python.org/mailman/listinfo/python-list > -- If you believe in an open internet, and that you should be free to fix your own computer and program and modify it without restrictions, join the Free Software Foundation <https://my.fsf.org/associate/support_freedom/join_fsf?referrer=

RE: Python indentation (3 spaces)

2018-10-07 Thread Ryan Johnson
, 2018 10:35 AM To: python-list@python.org Subject: Re: Python indentation (3 spaces) On 10/5/2018 11:30 PM, Ryan Johnson wrote: > The point that OP is trying to make is that a fixed standard that is > distinguishable from the even-spacing Tab-length convention in code and > text editor

Re: Python indentation (3 spaces)

2018-10-05 Thread Ryan Johnson
replace all Tabs with Spaces by highlighting the entire code block, hitting Tab once and Shift-Tab after. Peace Ryan On Fri, Oct 5, 2018 at 4:51 PM Terry Reedy wrote: > On 10/5/2018 4:48 PM, ts9...@gmail.com wrote: > > I am new to Python programming but have significant SQL and C >

Solved: pip hangs after successful operation (sandboxed environment problem)

2018-10-05 Thread Ryan Johnson
. Alternately, you may try to add the folder locations to the white-list, but this didn’t work for me. Have a nice day, Ryan Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

pip hangs after successful operation

2018-10-04 Thread Ryan Johnson
, via “pip list” and “py -m pip list” methods, there is a discrepancy. This is the culprit, but I don’t know how to fix the problem. Output: • PS C:\Users\Ryan> py -V Python 3.7.0 • PS C:\Users\Ryan> pip list Package Version --- --- Click   7.0 mysqlclient 1.3.

Questions on PEP 440 - Version Identification and Dependency Specification

2018-08-18 Thread Ryan Holmes
Greetings all, I currently follow PEP 440 as it relates to my application. Right now we follow a x.y.z scheme, with y incrementing with our normal releases, z incrementing for any bug fixes for that release, and x not really incrementing unless something major happens (for example, our conversi

make test on Centos 7.4 fails

2017-10-19 Thread Decker, Ryan C.
56\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 88) = 0 accept4(3, NULL, NULL, SOCK_CLOEXEC)= 4 sendto(4, "abc", 3, 0, NULL, 0) = -1 ENOKEY (Required key not available) +++ exited with 2 +++ Any

FW: Printing to a file and a terminal at the same time

2017-10-12 Thread Lie Ryan
It wouldn't be too difficult to write a file object wrapper that emulates tee, for instance (untested): class tee(object): def __init__(self, file_objs, autoflush=True): self._files = file_objs self._autoflush = autoflush def write(self, buf): for f in self._files

How to track usage within a desktop python application

2017-10-08 Thread Ryan Holmes
I maintain a desktop python application that is used by a decent number of folks (I would assume 10k+, though it's hard to know since it's based on number of downloads rather than number of unique users). I would like to integrate some sort of usage tracking that would enable me to determine num

Python Calculator

2016-02-01 Thread Ryan Young
iable to a different number it still calculates the original value. I have sent you a picture to help you understand my problem. Thank you so much! Ryan Young -- https://mail.python.org/mailman/listinfo/python-list

Re: how to completely uninstall python 2.7 on Windows

2016-01-28 Thread Ryan Gonzalez
Wrong mailing list! You probably want https://mail.python.org/mailman/listinfo/python-list Anyway, does uninstalling from the Control Panel not work? On January 28, 2016 7:59:00 AM CST, "Shi, Jiajun" wrote: >Hi there, > >Please help me to uninstall Python 2.7 on Windows. I want to install >Pyt

Re: Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default

2015-09-22 Thread Ryan Stuart
gt; > On Tue, Sep 22, 2015 at 2:04 PM, Ryan Stuart > wrote: > >> On Thu, Sep 17, 2015 at 2:24 PM, sol433tt wrote: >> >>> I would like to have the Sqlite pragma statement "locking_mode" set to >>> "EXCLUSIVE" by default (RO database). Does thi

Re: Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default

2015-09-21 Thread Ryan Stuart
ion of it being a compile time PRAGMA. Cheers > > There is some performance to be gained. I have a number of python scripts, > and don't want to alter the pragma statement for every script. This > computer never writes to the databases. > > thank you > > -- > https://mail

Re: [Python-ideas] Wheels For ...

2015-09-06 Thread Ryan Gonzalez
On September 6, 2015 12:33:29 PM CDT, "Sven R. Kunze" wrote: >Hi folks, > >currently, I came across http://pythonwheels.com/ during researching >how >to make a proper Python distribution for PyPI. I thought it would be >great idea to tell other maintainers to upload their content as wheels >s

Stripping sRGB profile from PNGs in python

2015-07-23 Thread Ryan Holmes
We're getting this error when trying to load some of out projects images: libpng warning: iCCP: known incorrect sRGB profile The source files that we have some with incorrect sRGB profiles. We don't have control over the source files, but what we normally do is take them and scale them d

Re: Parser needed.

2015-06-09 Thread Ryan Stuart
tine is real nice... to get rid of fudd/white space... and > just tokens which is nice. > > So for now I will use that as my tokenizer ;) =D > > and bracket level counting and sections and stuff like that yeah... > > > Bye, > Skybuck. > -- > https://mail.python.org/mailman/listinfo/python-list > -- Ryan Stuart, B.Eng Software Engineer ABN: 81-206-082-133 W: http://www.textisbeautiful.net/ M: +61-431-299-036 -- https://mail.python.org/mailman/listinfo/python-list

Re: test2

2015-03-24 Thread Ryan Stuart
rch$', gui_search), > # (r'^delete/$', ipdb_input_delete), > (r'^api/add/$', api_add), #check sensornet urls.py and > views/sensors.py for cool tricks. > (r'^api/search/$', api_search), #check sensornet urls.py and > views/sensors.py for cool tricks. > (r'^api/file/$', api_file), > > #(r'^asset/media/(?P.*)$', 'django.views.static.serve', > {'document_root': os.path.join(PROJECT_PATH, '../asset/media')}), > > #(r'^ip_db/media/(?P.*)$', 'django.views.static.serve', > {'document_root': os.path.join(PROJECT_PATH, 'ip_db/media')}), > #(r'^media/(?P.*)$', 'django.views.static.serve', > {'document_root': os.path.join(PROJECT_PATH, 'media')}), > #(r'^static/(?P.*)$', 'django.views.static.serve', > {'document_root': '/home/sensornet/static'}), > > # extjs4 stuff > #(r'^asset/overview/extjs/(?P.*)$', 'serve', {'document_root': > os.path.join(PROJECT_PATH, '../asset/extjs')}), > #(r'^extjs/(?P.*)$', 'django.views.static.serve', > {'document_root': os.path.join(PROJECT_PATH, '../ip_db/extjs')}), > #(r'^extjs/(?P.*)$', 'django.views.static.serve', > {'document_root': '/home/totis/tree/ipdb/django/ipdb/asset/static/extjs'}), > ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT), > 'ipdb.asset': { > 'handlers': ['console', 'logfile'], > 'level': 'DEBUG', > }, > } > } > > === > > > > -- > https://mail.python.org/mailman/listinfo/python-list > -- Ryan Stuart, B.Eng Software Engineer ABN: 81-206-082-133 W: http://www.textisbeautiful.net/ M: +61-431-299-036 -- https://mail.python.org/mailman/listinfo/python-list

My emails are getting bounced?

2015-03-12 Thread Ryan Gonzalez
tting bounce_notify_owner_on_disable to Yes. This will cause Mailman to send the triggering bounce to the owner, but since that's you, it may bounce too. Is it possible for someone to set this up for my email on Python-ideas? Again, not sure who the manager is, so I'm sending this here. -- Ryan [ERROR]:

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-04 Thread Ryan Stuart
On Thu, 5 Mar 2015 at 11:35 Xrrific wrote: > Could you please come up with something witty incorporating a simple > python line like If...then... but..etc. > Send her this: import base64 print(base64.b64decode('CkhpLCAKVGhpcyBpcyBzb21lb25lIGZyb20gdGhlIHB5dGhvbiBtYWlsaW5nIGxpc3QuIFRoaXMgZ3V5ICho

Re: Are threads bad? - was: Future of Pypy?

2015-02-24 Thread Ryan Stuart
On Tue Feb 24 2015 at 3:32:47 PM Paul Rubin wrote: > Ryan Stuart writes: > Sure, the shared memory introduces the possibility of some bad errors, > I'm just saying that I've found that by staying with a certain > straightforward style, it doesn't seem difficult i

Re: Future of Pypy?

2015-02-22 Thread Ryan Stuart
On Mon Feb 23 2015 at 4:15:42 PM Paul Rubin wrote: > > What do you mean about Queues working with processes? I meant > Queue.Queue. There is multiprocessing.Queue but that's much less > capable, and it uses cumbersome IPC like pipes or sockets instead of a > lighter weight lock. Threads can als

Re: Future of Pypy?

2015-02-22 Thread Ryan Stuart
On Mon Feb 23 2015 at 1:50:40 PM Paul Rubin wrote: > That article is about the hazards of mutable state shared between > threads. The key to using threads safely is to not do that. So the > "transfer" example in the article would instead be a message handler in > the thread holding the account

Re: Future of Pypy?

2015-02-22 Thread Ryan Stuart
On Mon Feb 23 2015 at 12:05:46 PM Paul Rubin wrote: > I don't see what the big deal is. I hear tons of horror stories about > threads and I believe them, but the thing is, they almost always revolve > around acquiring and releasing locks in the wrong order, forgetting to > lock things, stuff lik

Re: TypeError: list indices must be integers, not tuple

2015-02-10 Thread Ryan Stuart
Hi, There is a lot of issues with this code. First, setting fav to a 1 tuples with a string probably isn't what you want. What you probably mean is: if restraunt == ("Pizza"): fav = 1 Second, when you are trying to lookup items in Menu, you are using the incorrect fav. Lists have int indicie

Re: Profiler for long-running application

2015-02-09 Thread Ryan Stuart
Hi Asad, Is there any reason why you can't just use profile/cProfile? In particular, you could use the api of that module to save out the profile stats to an external file with a unique name and then inspect them later with a tool like snakeviz . The code to

Re: [Python-Dev] Dinamically set __call__ method

2014-11-13 Thread Lie Ryan
On 05/11/14 06:15, Roberto Martínez wrote: The thing with this is tricky. I need the change in the instance, > not in the class, because I have multiple instances and all of > them must have different implementations of __call__. Why not just use functions with closure if that's what you need?

Re: Communicating with a PHP script (and pretending I'm a browser)

2014-11-13 Thread Lie Ryan
On 13/11/14 03:57, Larry Martell wrote: We were all making this much harder than it is. I ended up doing this: wp = urllib.request.urlopen('http://php_page/?' + request.POST.urlencode()) pw = wp.read() I was about that suggest that actually, just be careful to escape things properly. Although

Re: I love assert

2014-11-13 Thread Lie Ryan
On 13/11/14 10:05, Ian Kelly wrote: On Wed, Nov 12, 2014 at 3:47 PM, Marko Rauhamaa wrote: Ian Kelly : Apart from idiomatic style, there is no difference between # never reached assert False raise RuntimeError('Unreachable code reached') If the purpose is communication, the

Re: Quick Question About Setting Up Pytz

2014-10-20 Thread Ryan Shuell
Ok, thanks everyone. I just need to spend more time with this stuff. It's definitely slow going. On Sat, Oct 18, 2014 at 11:16 PM, Rustom Mody wrote: > On Sunday, October 19, 2014 8:25:53 AM UTC+5:30, Ben Finney wrote: > > Chris Angelico writes: > > > > Try learning Python itself, rather than

Re: Question about PANDAS

2014-10-20 Thread Ryan Shuell
Thanks guys. I just feel frustrated that I can't do something useful. I'm reading all about dictionaries, and types, and touples. Then I read about string manipulation and loops; two of my favorite things to do. Then I read about logic: -719 >= 833 False That's great, but it's just not very use

How to install and run a script?

2014-10-12 Thread Ryan Shuell
I'm an absolute noob to Python, although I have been programming in several other languages for over 10 years. I'm trying to install and run some scripts, and I'm not having much success. I followed the steps at this site. https://docs.python.org/2/install/ I have Python 2.7.6 Shell. If I type

Re: Load a CSV with different row lengths

2014-07-29 Thread Ryan de Vera
Hey skip, I should've mentioned that I want to import my csv as a data frame or numpy array or as a table. Best regards, Ryan On Tue, Jul 29, 2014 at 6:29 AM, Skip Montanaro wrote: > > How can I load this into python? I tried using both NumPy and Pandas. > > To add to Pe

Load a CSV with different row lengths

2014-07-29 Thread Ryan de Vera
I am trying to load a csv with different row lengths. For example, I have the csv a,b a,b,c,d a,b,c How can I load this into python? I tried using both NumPy and Pandas. -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP8 and 4 spaces

2014-07-04 Thread Lie Ryan
On 04/07/14 07:55, Gregory Ewing wrote: Steven D'Aprano wrote: That's exactly the problem with tabs - whatever you think your code looks like with tabs, other people will see quite different picture. Why do you consider this a problem? It's a problem if you try to use tabs for lining things

Re: Single underscore in interactive mode

2014-06-25 Thread Lie Ryan
On 25/06/14 16:20, candide wrote: As explained by the docs, an assignment statement_evaluates_ the expression on the right hand side. So we can deduce that at the very beginning of the 2nd prompt, "the result of the last evaluation" is 43. Nevertheless, calling _ raises a NameError exception

Re: Python ORM library for distributed mostly-read-only objects?

2014-06-23 Thread Lie Ryan
On 23/06/14 19:05, smur...@gmail.com wrote: On Monday, June 23, 2014 5:54:38 PM UTC+2, Lie Ryan wrote: If you don't want each thread to have their own copy of the object, Don't use thread-scoped session. Use explicit scope instead. How would that work when multiple threads trave

Re: Python ORM library for distributed mostly-read-only objects?

2014-06-23 Thread Lie Ryan
On 22/06/14 10:46, smur...@gmail.com wrote: I've been doing this with a "classic" session-based SQLAlchemy ORM, approach, but that ends up way too slow and memory intense, as each thread gets its own copy of every object it needs. I don't want that. If you don't want each thread to have thei

Re: None in string => TypeError?

2014-06-09 Thread Ryan Hiebert
On Mon, Jun 9, 2014 at 10:34 AM, Roy Smith wrote: > We noticed recently that: > > >>> None in 'foo' > > raises (at least in Python 2.7) > > TypeError: 'in ' requires string as left operand, not NoneType > > This is surprising. > > It's the same in 3.4, and I agree that it's surprising, at least t

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Ryan Hiebert
On Thu, Jun 5, 2014 at 2:59 PM, Chris Angelico wrote: > On Fri, Jun 6, 2014 at 4:52 AM, Ryan Hiebert wrote: > > 2014-06-05 13:42 GMT-05:00 Johannes Bauer : > > > >> On 05.06.2014 20:16, Paul Rubin wrote: > >> > Johannes Bauer writes: > >> &g

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Ryan Hiebert
2014-06-05 13:42 GMT-05:00 Johannes Bauer : > On 05.06.2014 20:16, Paul Rubin wrote: > > Johannes Bauer writes: > >> line = line[:-1] > >> Which truncates the trailing "\n" of a textfile line. > > > > use line.rstrip() for that. > > rstrip has different functionality than what I'm doing. How so

Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

2014-04-30 Thread Ryan Hiebert
On Wed, Apr 30, 2014 at 9:02 AM, Ethan Furman wrote: > On 04/30/2014 06:14 AM, Ethan Furman wrote: > >> On 04/29/2014 03:51 PM, Chris Angelico wrote: >> >>> On Wed, Apr 30, 2014 at 8:42 AM, emile wrote: >>> On 04/29/2014 01:16 PM, Adam Funk wrote: "A man pitches his tent, walks 1

Re: Significant digits in a float?

2014-04-29 Thread Ryan Hiebert
On Tue, Apr 29, 2014 at 3:16 PM, Adam Funk wrote: > > "A man pitches his tent, walks 1 km south, walks 1 km east, kills a > bear, & walks 1 km north, where he's back at his tent. What color is > the bear?" ;-) Skin or Fur? -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing PyGame?

2014-04-24 Thread Ryan Hiebert
On Thu, Apr 24, 2014 at 9:38 PM, Ned Deily wrote: > In article , > Gregory Ewing wrote: > > My advice would be to steer clear of things like Fink and MacPorts > > and do things the native MacOSX way wherever possible. That means > > using a framework installation of Python and framework version

Re: Why Python 3?

2014-04-18 Thread Ryan Hiebert
If you are starting a new project, I'd highly encourage you to use Python 3. It is a stable, well supported, and beautiful language, and gives you the full power of the innovation that is current in the Python world. Python 2 is still well supported (for a while to come), but you won't have the sam

[ANN] ClamAV for Python 0.2!

2014-04-06 Thread Ryan Gonzalez
av-python>. Report bugs to the Issue tracker <https://github.com/kirbyfan64/clamav-python/issues>. -- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated.&quo

Ideas for Python 4

2014-04-01 Thread Ryan Gonzalez
t;>>m3->>>m4!!;; -- Call m2, then m3, then m4, then return the resulting object -- BTW, April Fools! This is ugly... -- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that

Re: [Python-Dev] [RELEASED] Python 3.4.0

2014-03-17 Thread Ryan Gonzalez
://bugs.python.org/ > > > Enjoy! > > > -- > Larry Hastings, Release Manager > larry at hastings.org > (on behalf of the entire python-dev team and 3.4's contributors) > ___ > Python-Dev mailing list > python-...@python.org > https://mail.pyt

Re: Can one use Python to learn and even apply Functional Programming?

2014-02-16 Thread Ryan
Python*can* do functional programming, but, for learning, Haskell will work better. Sam wrote: >I would like to learn and try out functional programming (FP). I love >Python and would like to use it to try FP. Some have advised me to use >Haskell instead because Python is not a good language for

Re: How to turn a package into something pip can install

2014-02-14 Thread Ryan Gonzalez
his? > -- > https://mail.python.org/mailman/listinfo/python-list > -- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." -- https://mail.python.org/mailman/listinfo/python-list

Re: How to begin

2014-02-14 Thread Ryan Gonzalez
Ack, I meant that, not the whole reference. On Thu, Feb 13, 2014 at 6:57 PM, Ben Finney wrote: > Ryan Gonzalez writes: > > > Read the Python reference. I know it's long, but it saves you trouble > > of accidentally reinventing the wheel. > > Hmm, the language re

Re: Explanation of list reference

2014-02-14 Thread Ryan Gonzalez
|x = [1,2,3] x = [4,5,6] | x now points to a different memory location. And, when you do this: |x[0] =99000 x[0] =100 | you're just changing the memory location that |x[0]| points to. -- --Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becaus

Re: How to begin

2014-02-13 Thread Ryan Gonzalez
ce. I know it's long, but it saves you trouble of accidentally reinventing the wheel. -- --Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." -- https

[ANN] PyExt 0.6 Released!

2014-02-09 Thread Ryan Gonzalez
/pyext GitHub: https://github.com/kirbyfan64/pyext -- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." -- https://mail.python.org/mailman/listinfo/python-list

Re: [sqlite] Happy New Year

2013-12-31 Thread Ryan Finnesey
Happy New Year to you as well. Sent from my iPad > On Dec 31, 2013, at 7:46 PM, "Igor Korot" wrote: > > Hi, ALL, > I want to wish everybody who is reading and involved with the list > Happy and oyful New Year! > Let's have a great time in it and lets make a lot of good products and > new relea

Re: why not?

2013-01-21 Thread Lie Ryan
On 22/01/13 04:02, kwakukwat...@gmail.com wrote: f = open(r'c:\text\somefile.txt') for i in range(3): print str(i) + ': ' + f.readline(), please with the print str(i) + ‘: ‘ + f.readline(), why not print str(i) + f.readline(), Try running both code. What do you see? What's the differenc

Re: Vote tallying...

2013-01-19 Thread Lie Ryan
On 20/01/13 08:22, Dennis Lee Bieber wrote: On Sat, 19 Jan 2013 22:58:17 +1100, Lie Ryan Which is the same restriction as when using XML/JSON. What it means by locking the entire database is that an sqlite database can only be read/written by a single program at any moment in time. For batch

Re: Vote tallying...

2013-01-19 Thread Lie Ryan
On 19/01/13 00:43, Andrew Robinson wrote: On 01/18/2013 08:47 AM, Stefan Behnel wrote: Andrew Robinson, 18.01.2013 00:59: I have a problem which may fit in a mysql database Everything fits in a MySQL database - not a reason to use it, though. Py2.5 and later ship with sqlite3 and if you go for

Re: Any algorithm to preserve whitespaces?

2013-01-19 Thread Lie Ryan
On 19/01/13 21:13, Santosh Kumar wrote: I have a working script which takes argv[1] as an input, deassembles each line, and then each word. Then after it capitalizes all its word (upcases the first letter) and then prints it out on the stdout. That script does the capitalization work fine, but,

Re: Safely add a key to a dict only if it does not already exist?

2013-01-18 Thread Lie Ryan
On 19/01/13 15:15, Chris Rebert wrote: On Friday, January 18, 2013, Steven D'Aprano wrote: I wish to add a key to a dict only if it doesn't already exist, but do it in a thread-safe manner. The naive code is: if key not in dict: dict[key] = value but of cours

Re: Vote tallying...

2013-01-18 Thread Lie Ryan
On 18/01/13 10:59, Andrew Robinson wrote: Hi, I have a problem which may fit in a mysql database, but which I only have python as an alternate tool to solve... so I'd like to hear some opinions... Since you have a large dataset, you might want to use sqlite3 (http://docs.python.org/2.5/lib/mo

Re: To make a method or attribute private

2013-01-17 Thread Lie Ryan
On 17/01/13 11:34, iMath wrote: To make a method or attribute private (inaccessible from the outside), simply start its name with two underscores 《Beginning Python From Novice to Professional》 but there is another saying goes: Beginning a variable name with a single underscore indicates tha

Re: python sys.stdout and C++ iostreams::cout

2013-01-17 Thread Lie Ryan
On 18/01/13 02:02, Utpal Sarkar wrote: Hi, I was assuming that sys.stdout would be referencing the same physical stream as iostreams::cout running in the same process, but this doesn't seem to be the case. The following code, which makes a call to a C++ function with a python wrapper called "

mbox parsing, specifically message body

2012-06-14 Thread Ryan Clough
esn't seem reliable to me. I am using the built in mailbox module and am able to do something like: import mailbox for message in mbox: print message['subject'] It would be great if you could do something like the following: print messages['body'] Any thoughts are ap

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-08 Thread Lie Ryan
On 03/30/2012 06:25 AM, Steve Howell wrote: On Mar 29, 11:53 am, Devin Jeanpierre wrote: Well, what sort of language differences make for English vs Mandarin? Relational algebraic-style programming is useful, but definitely a large language barrier to people that don't know any SQL. I think th

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/21/2012 01:44 PM, Steve Howell wrote: Also, don't they call those thingies "object" for a reason? ;) A subject is (almost?) always a noun, and so a subject is also an object. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/21/2012 03:55 AM, Nathan Rice wrote: In mathematics, when you perform global optimization you must be willing to make moves in the solution space that may result in a temporary reduction of your optimality condition. If you just perform naive gradient decent, only looking to the change tha

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/18/2012 12:36 PM, Steven D'Aprano wrote: On Sat, 17 Mar 2012 20:59:34 +0100, Kiuhnm wrote: In the second example, most English speakers would intuit that "print(i)" prints i, whatever i is. There are two points where the code may be misunderstood, a beginner may think that "print i" prin

Re: Tools for refactoring/obfuscation

2012-03-30 Thread Lie Ryan
On 03/29/2012 03:04 AM, Javier wrote: Yes, in general I follow clear guidelines for writing code. I just use modules with functions in the same directory and clear use of name spaces. I almost never use classes. I wonder if you use some tool for refactoring. I am mainly intersted in scripting

Re: [OT]: Smartphones and Python?

2012-02-18 Thread Lie Ryan
On 02/18/2012 12:51 PM, Michael Torrie wrote: On 02/16/2012 10:25 PM, 8 Dihedral wrote: Android is a customized linux OS used in mobile phones. I don't think any linux systm has to be locked by JAVA or any JVM to run applications. Getting waaa off topic here, but... I guess you aren't

Re: Is a with on open always necessary?

2012-01-25 Thread Lie Ryan
On 01/26/2012 04:17 AM, K Richard Pixley wrote: On 1/21/12 03:38 , Lie Ryan wrote: It is only strictly necessary for programs that opens thousands of files in a short while, since the operating system may limit of the number of active file handlers you can have. The number you're lookin

Re: Is a with on open always necessary?

2012-01-21 Thread Lie Ryan
On 01/21/2012 02:44 AM, Andrea Crotti wrote: I normally didn't bother too much when reading from files, and for example I always did a content = open(filename).readlines() But now I have the doubt that it's not a good idea, does the file handler stays open until the interpreter quits? It is n

Re: PyWarts: time, datetime, and calendar modules

2012-01-15 Thread Lie Ryan
On 01/15/2012 06:23 AM, Rick Johnson wrote: So how do we solve this dilemma you ask??? Well, we need to "mark" method OR variable names (OR both!) with syntactic markers so there will be NO confusion. Observe: def $method(self):pass self.@instanceveriable self.@@classvariable There is

Re: replacing __dict__ with an OrderedDict

2012-01-10 Thread Lie Ryan
On 01/11/2012 01:05 AM, Roy Smith wrote: In article, Lie Ryan wrote: On 01/10/2012 12:05 PM, Roy Smith wrote: Somewhat more seriously, let's say you wanted to do test queries against a database with 100 million records in it. You could rebuild the database from scratch for each test

Re: python philosophical question - strong vs duck typing

2012-01-10 Thread Lie Ryan
On 01/09/2012 04:35 PM, John Nagle wrote: A type-inferring compiler has to analyze the whole program at once, because the type of a function's arguments is determined by its callers. This is slow. The alternative is to guess what the type of something is likely to be, compile code at run time, an

Re: replacing __dict__ with an OrderedDict

2012-01-10 Thread Lie Ryan
On 01/10/2012 03:59 AM, Ulrich Eckhardt wrote: There is another dependency and that I'd call a logical dependency. This occurs when e.g. test X tests for an API presence and test Y tests the API behaviour. In other words, Y has no chance to succeed if X already failed. Unfortunately, there is n

Re: replacing __dict__ with an OrderedDict

2012-01-10 Thread Lie Ryan
On 01/10/2012 12:16 AM, Ulrich Eckhardt wrote: Am 09.01.2012 13:10, schrieb Lie Ryan: I was just suggesting that what the OP thinks he wants is quite likely not what he actually wants. Rest assured that the OP has a rather good idea of what he wants and why, the latter being something you

Re: replacing __dict__ with an OrderedDict

2012-01-10 Thread Lie Ryan
On 01/10/2012 12:05 PM, Roy Smith wrote: Somewhat more seriously, let's say you wanted to do test queries against a database with 100 million records in it. You could rebuild the database from scratch for each test, but doing so might take hours per test. Sometimes, real life is just*so* incon

Re: replacing __dict__ with an OrderedDict

2012-01-09 Thread Lie Ryan
On 01/09/2012 09:03 AM, Eelco wrote: i havnt read every post in great detail, but it doesnt seem like your actual question has been answered, so ill give it a try. AFAIK, changing __dict__ to be an ordereddict is fundamentally impossible in python 2. __dict__ is a builtin language construct hard

Re: MOST COMMON QUESTIONS ASKED BY NON-MUSLIMS ?????????

2012-01-07 Thread Lie Ryan
On 01/04/2012 05:24 AM, gene heskett wrote: On Tuesday, January 03, 2012 01:13:08 PM John Ladasky did opine: On Jan 3, 7:40 am, BV wrote: MOST COMMON QUESTIONS ASKED BY NON-MUSLIMS Q0. Why do thousand-line religious posts appear in comp.lang.python? Already discussed, at considerable leng

Re: replacing __dict__ with an OrderedDict

2012-01-06 Thread Lie Ryan
On 01/07/2012 11:49 AM, Steven D'Aprano wrote: You may not be able to run tests*simultaneously*, due to clashes involving external resources, but you should be able to run them in random order. tests that involves external resources should be mocked, although there are always a few external re

Re: how to get id(function) for each function in stack?

2012-01-06 Thread Lie Ryan
On 01/07/2012 06:50 AM, Ian Kelly wrote: On Fri, Jan 6, 2012 at 12:29 PM, dmitrey wrote: Python build-in function sum() has no attribute func_code, what should I do in the case? Built-in functions and C extension functions have no code objects, and for that reason they also do not exist in th

Re: replacing __dict__ with an OrderedDict

2012-01-06 Thread Lie Ryan
On 01/07/2012 04:20 AM, Ian Kelly wrote: On Fri, Jan 6, 2012 at 10:01 AM, Lie Ryan wrote: That unittest executes its tests in alphabetical order is implementation detail for a very good reason, and good unittest practice dictates that execution order should never be defined (some even argued

Re: replacing __dict__ with an OrderedDict

2012-01-06 Thread Lie Ryan
On 01/07/2012 12:36 AM, Ulrich Eckhardt wrote: Am 06.01.2012 12:43, schrieb Lie Ryan: On 01/06/2012 08:48 PM, Ulrich Eckhardt wrote: Hi! The topic explains pretty much what I'm trying to do under Python 2.7[1]. The reason for this is that I want dir(SomeType) to show the attributes i

Re: replacing __dict__ with an OrderedDict

2012-01-06 Thread Lie Ryan
On 01/06/2012 08:48 PM, Ulrich Eckhardt wrote: Hi! The topic explains pretty much what I'm trying to do under Python 2.7[1]. The reason for this is that I want dir(SomeType) to show the attributes in the order of their declaration. This in turn should hopefully make unittest execute my tests in

Re: a little help

2012-01-05 Thread Lie Ryan
On 01/06/2012 03:04 AM, Andres Soto wrote: Please, see my comments between your lines. Thank you very much for your explanation! * * *From:* Lie Ryan *To:* python-list@python.org *Sent:* Thursday, January 5, 2012 2:30 AM *Subject:* Re: a little help On 01/05

Re: help me get excited about python 3

2012-01-05 Thread Lie Ryan
On 01/05/2012 03:41 PM, Evan Driscoll wrote: On 1/4/2012 9:56 AM, Sean Wolfe wrote: I am still living in the 2.x world because all the things I want to do right now in python are in 2 (django, pygame). But I want to be excited about the future of the language. I understand the concept of needing

Re: a little help

2012-01-05 Thread Lie Ryan
On 01/05/2012 11:29 AM, Andres Soto wrote: my mistake is because I have no problem to do that using Prolog which use an interpreter as Python. I thought that the variables in the main global memory space (associated with the command line environment) were kept, although the code that use it could

Re: Spamming PyPI with stupid packages

2012-01-02 Thread Lie Ryan
On 01/02/2012 11:20 PM, Peter Otten wrote: Felinx Lee wrote: I have removed those packages (girlfriend and others) from PyPI forever, I apologize for that. The thought police has won :( I think the community has a right to defend themselves against trolls. If it's just bad naming, we can p

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Lie Ryan
On 01/02/2012 09:33 AM, Robert Kern wrote: On 1/1/12 10:18 PM, Matt Chaput wrote: Someone seems to be spamming PyPI by uploading multiple stupid packages. Not sure if it's some form of advertising spam or just idiocy. Don't know if we should care though... maybe policing uploads is worse than c

  1   2   3   4   5   6   7   8   9   10   >