Re: Python basic program problem

2011-06-27 Thread Daniel Kluev
world') hello world In future, please include full tracebacks and python version info. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

keeping local state in an C extension module

2011-06-30 Thread Daniel Franke
Here, of course, the functions PyObjectFromRawPointer(void*) and void* PyRawPointerFromPyObject(PyObject*) are missing. Is there anything like this in the Python C-API? If not, how could it be implemented? Or is this approach a stupid idea to begin with? Pointers would be highly appreciated. Thanks

Re: keeping local state in an C extension module

2011-06-30 Thread Daniel Franke
get a reasonable solution working for 2.[567], I might as well go back to Py_InitModule() and static variables. It's somewhat ugly, but it works. Thanks for the info! Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: keeping local state in an C extension module

2011-06-30 Thread Daniel Franke
precated as of Python 2.7. Please switch to the new Capsules API." which is of no concern here :) Thanks heaps! Daniel -- http://mail.python.org/mailman/listinfo/python-list

web hosting, first hand experiences?

2011-07-03 Thread Daniel Fetchinson
e have any recent experiences with these two? Or others? Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: web hosting, first hand experiences?

2011-07-04 Thread Daniel Fetchinson
f dreamhost and webfaction >> does anyone have any recent experiences with these two? Or others? >> >> Cheers, >> Daniel >> > > Hi Daniel, > > I can wholeheartedly recommend WebFaction. I currently have an account > running 3 different CherryPy applications

Re: blist question

2011-07-07 Thread Daniel Stutzbach
d into Python source code? > Seems unlikely. -- Daniel Stutzbach -- http://mail.python.org/mailman/listinfo/python-list

Re: how to sort a hash list without generating a new object?

2011-08-03 Thread Daniel Stutzbach
different performance characteristics, and a sorteddict works just like a dict but keeps the keys sorted. -- Daniel Stutzbach -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] allow line break at operators

2011-08-11 Thread Daniel Greenfeld
Something like this already exists: a = 0 b = 1 if (True == True and False == False and a + 1 == b and b - 1 == a): print 'meh' So I've got no idea what this proposal is about except for the dropping of readability of Python. -1 Daniel Greenfeld

Re: Data issues with Django and Apache

2011-08-14 Thread Daniel Roseman
On Sunday, 14 August 2011 03:20:30 UTC+1, John Gordon wrote: > I'm devleoping a website using the Django framework along with Apache, > and I'm seeing some odd data issues. > > During the course of navigating through the website content, a user > will cause the creation of some data records with

OT

2011-08-19 Thread Daniel Fetchinson
I'll be 59 in a couple of months. -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestion Reqd for Designing a Website in Python

2011-02-25 Thread Daniel Fetchinson
ython.org/moin/WebFrameworks My personal opinion is that the 3 top frameworks to consider are: (1) django (2) turbogears (3) web2py. You need to decide for yourself which one use choose, you may even choose something other than these 3, there are tons more. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Can you recommend an Experienced Python/SQL contract developer for this 6 - 12 month contract in NYC?

2011-02-25 Thread Daniel Mahoney
> Thanks, > > Ben Diamond > The Forum Group > Information Technologies Division > 260 Madison Ave > Suite 200 > NY, NY 10016 > T. 212 687 4050 x355 > > C. 201 313 6009 > www.forumgrp.com PLEASE, don't include all that Microsoft HTML crap at the end of your post! Good

Re: Need an example program that implements rpm -pql via import rpm

2011-03-04 Thread Daniel Mahoney
On Thu, 03 Mar 2011 22:24:24 -0500, Steven W. Orr wrote: > I look everywhere but I couldn't find anything. Could someone please > point me to a small example program that does an import rpm, takes an > rpm file as an argument and gets the list of files contained in the > file, the same as if I had

Re: function annotations in open source projects

2011-03-14 Thread Daniel Urban
> Do you know any open source python3 projects that use function > annotations? I would like to see some real use, so maybe I find them > useful to use in my own project. threecheck uses them for type checking: http://pypi.python.org/pypi/threecheck Daniel -- http://mail.python.or

Re: Good literature about python twisted

2011-03-15 Thread Daniel Mahoney
On Tue, 15 Mar 2011 04:34:52 -0700, gelonida wrote: > Hi, > > Just wanted to learn more about python twisted and wanted to buy the > O'Reilly book. > > However I noticed, that the book is from 2005. > > > Is this book still worth it or is there anything better to learn about > twisted. > > I

Re: Dump interpreter history?

2011-03-25 Thread Daniel Mahoney
On Fri, 25 Mar 2011 17:03:55 -0400, Ken D'Ambrosio wrote: > Hey, all. A co-worker asked me a question, and I've got no idea how (or > if) it can be done. Bottom line: he'd like to save off the text from an > interpreter session, his thinking being that you've already tried to get > what you want

Re: Fun python 3.2 one-liner

2011-04-05 Thread Daniel Fetchinson
these days. Seriously, who would want to limit him/herself to 80 characters in 2011? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Fun python 3.2 one-liner

2011-04-05 Thread Daniel Fetchinson
ent habits which have their origins in particular circumstances of those ancient times but actually nothing necessitates them today other than the momentum built around them during their lifetime (which is a pretty strong argument for them by the way). Cheers, Daniel > People who like to ha

Common practice for multiple python versions sharing 3rd party modules

2011-04-09 Thread Daniel Fetchinson
for having a single location for 3rd party modules and all python versions could have access to them? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Postmortem on Unladen Swallow

2011-04-14 Thread Daniel Fetchinson
oogle! And that's something to be proud of, I'd think. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE/text-editor

2011-04-16 Thread Daniel Kluev
or me. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent code to the bool() built-in function

2011-04-17 Thread Daniel Kluev
essence, it just calls PyObject_IsTrue), it also provides needed comparison ops, repr and other magic methods for the type. You can check Objects/boolobject.c in python repository if its implementation is interesting for you. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent code to the bool() built-in function

2011-04-17 Thread Daniel Kluev
JUMPTO(oparg); else break; continue; So technically these implementations are equivalent besides the fact that bool() is type rather than function. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Equivalent code to the bool() built-in function

2011-04-17 Thread Daniel Kluev
to do explicit casting to boolean than the hack in OP. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-18 Thread Daniel Kluev
Isn't it better to use subprocess.Popen and read stdout/stderr directly? Should be much more convenient than temporary files. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a difference between one line and many lines

2011-04-21 Thread Daniel Kluev
its purely syntactic, and is compiled to exactly same bytecode. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Argument count mismatch

2011-04-22 Thread Daniel Kluev
n global, and usually cause no harm, since framework guarantees that these instances are bound to context of this particular http request. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

detecting newline character

2011-04-23 Thread Daniel Geržo
fter I call readlines(). Anyone has an idea? You can fetch the file I am testing with from http://danger.rulez.sk/subrip_ascii.srt Thanks. -- S pozdravom / Best regards Daniel Gerzo -- http://mail.python.org/mailman/listinfo/python-list

Re: detecting newline character

2011-04-23 Thread Daniel Geržo
On 23.4.2011 21:33, Thomas 'PointedEars' Lahn wrote: Chris Rebert wrote: On Sat, Apr 23, 2011 at 11:09 AM, Daniel Geržo wrote: I need to detect the newline characters used in the file I am reading. For this purpose I am using the following code: def _read_lines(self):

Re: When is PEP necessary?

2011-04-23 Thread Daniel Kluev
pure-python modules, anything tied to C-API better be documented, or it becomes a nightmare to keep non-CPython version having identical interface. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: detecting newline character

2011-04-24 Thread Daniel Geržo
On 23.4.2011 21:18, Thomas 'PointedEars' Lahn wrote: Daniel Geržo wrote: I need to detect the newline characters used in the file I am reading. For this purpose I am using the following code: def _read_lines(self): with contextlib.closing(codecs.open(self.path, &quo

Re: detecting newline character

2011-04-24 Thread Daniel Geržo
rt. -- S pozdravom / Best regards Daniel Gerzo -- http://mail.python.org/mailman/listinfo/python-list

Re: detecting newline character

2011-04-24 Thread Daniel Geržo
o sanitize this. ¹ RTSL: Read the Source, Luke! /me makes a note what this means :) Thank you for your help it's very appreciated. -- S pozdravom / Best regards Daniel Gerzo -- http://mail.python.org/mailman/listinfo/python-list

Re: Function __defaults__

2011-04-24 Thread Daniel Kluev
ature -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Function __defaults__

2011-04-24 Thread Daniel Kluev
.. return a ... >>> test() 123 >>> test.func_defaults (123,) >>> test.func_defaults = (456,) >>> test() 456 -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] VCS tools

2011-04-28 Thread Daniel Kluev
cting it to, and was overall very easy to learn. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: use of index (beginner's question)

2011-04-28 Thread Daniel Kluev
t s2 list2 >>> print locals()[s2] ['62327', '49123', '79115'] >>> print locals()[s2][0] 62327 But generally if you need to do that, you would be better with re-design of your data/architecture. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Comparing VCS tools (was ""Development tools and practices for Pythonistas")

2011-04-29 Thread Daniel Kluev
We were looking for some simple integrated SCM, issue tracker and wiki in our university for software design and software testing courses, and fossil seems to be perfect match, thanks for sharing. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Compiling Python 3.2 on Cygwin fails

2011-05-03 Thread Daniel Rentz
binascii bz2cmath crypt fcntl grpmath mmap parser pyexpat readline resource select syslog termiostime unicodedatazlib Is there something obvious I am missing here? Re

Re: Why do directly imported variables behave differently than those attached to imported module?

2011-05-03 Thread Daniel Kluev
utable, when you do `var = 1` you create new object of type int, and re-assign `var` name to point to new object. `foo.var`, on other hand, is a way to access `foo`'s own namespace, so its exactly same name as globals()['var'] of `foo`. -- With best regards, Daniel Kluev --

Re: Why do directly imported variables behave differently than those attached to imported module?

2011-05-03 Thread Daniel Kluev
attribute__(attr) def __repr__(self): return self.__get().__repr__() def __str__(self): return self.__get().__str__() >>> a = 1 >>> b = SymbolicReference(globals(), 'a') >>> b 1 >>> a = 10 >>> b 10 -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Hooking into Python's memory management

2011-05-04 Thread Daniel Neilson
s id() to the list would also suffice. In either case, if such a module is possible, any pointers you could provide regarding how to implement such a module would be appreciated. Thank you for your time, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Hooking into Python's memory management

2011-05-04 Thread Daniel Neilson
imple memory pool/heap that students will have to use to allocate/deallocate objects of a particular type definitely seems the way to go. It will get the ideas across, and allow them to contrast the garbage collection and explicit memory management paradigms. -Daniel -- http://mail.python.org/ma

Re: How best to convert a string "list" to a python list

2011-05-14 Thread Daniel Kluev
On Sat, May 14, 2011 at 7:41 PM, Nobody wrote: > to use a regular expression to match everything up to the next delimiter, > and do this in a loop to extract the individual items. re.findall() should let you match all items at once, without loop. -- With best regards, Daniel Kluev --

Re: Python 3.2 Vectors.py module

2011-05-15 Thread Daniel Kluev
etter if you pack it in separate package and upload to PyPI. You can find good tutorial on packaging here: http://diveintopython3.org/packaging.html - NumPy/SciPy has pretty fair support for vectors. Would be good if you pointed out the differences to begin with. -- With best regards, Daniel Kl

Re: threads with gtk gui problem

2011-05-15 Thread Daniel Kluev
You can also use multiprocessing module instead of threads. Use pipe and gobject.idle_add(somefunc) to process data from other thread. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: obviscating python code for distribution

2011-05-15 Thread Daniel Kluev
parts you want to hide in C/C++/Cython and distribute them as .so/.dll -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a set into list

2011-05-15 Thread Daniel Kluev
"s=set(l2); l3 = [i for i in l1 if i in s]" 10 loops, best of 3: 28.1 msec per loop So even with conversion back into list set&set is still marginally faster. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Overuse of try/except/else?

2011-05-21 Thread Daniel Kluev
On Tue, May 10, 2011 at 11:40 AM, Kyle T. Jones wrote: > > It has been hard for me to determine what would constitute overuse. > Good example of abuse is catching KeyboardInterrupt or SystemExit inside some library code. PycURL does it, and its truly annoying. -- With best regard

Re: Abandoning Python

2011-05-21 Thread Daniel Kluev
expecting some language to acquire "even larger user base" is hopeless. Also, most of these complaints could be solved by using correct python dialect for particular task - RPython, Cython and so on. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Abandoning Python

2011-05-21 Thread Daniel Kluev
On Sun, May 22, 2011 at 12:25 PM, Daniel Kluev wrote: > According to all language popularity indexes [1-10], C# and Forgot to include references, although everyone probably already knows them, [1] https://www.ohloh.net/languages?query=&sort=projects [2] http://www.tiobe.com/index.php/

Re: Why did Quora choose Python for its development?

2011-05-22 Thread Daniel Kluev
actly is so 'advanced' about them which cannot be done in python. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Abandoning Python

2011-05-22 Thread Daniel Kluev
On Mon, May 23, 2011 at 4:33 AM, John Lee wrote: > Pylint?  Does it provide some kind of guessed-at-type that has been integrated > with IDEs? WingIDE Pro has both Pylint integration and advanced type-guessing. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/li

Re: Why did Quora choose Python for its development?

2011-05-22 Thread Daniel Kluev
On Sun, May 22, 2011 at 11:47 PM, Octavian Rasnita wrote: > From: "Daniel Kluev" > I am talking about that flexibility which was criticized in the previous > messages telling that this flexibility allows any programmer to use his own > way. > Perl doesn't force an

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
> for anyone to just say "go to read the documentation and see how great it > is". But "go to read the docs" argument works both ways - I have zero knowledge of DBIx::Class, so obviously I cannot say what features it lacks compared to SQLA. However this is what I wanted to highlight - you cannot simply state that "Perl offers more advanced modules and libraries which are not available for Python" if you don't have reasonable experience with according Python modules. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
27;array' somewhere in stdlib. As for "can't do": >>> a = [1,2] >>> dict([a]) {1: 2} >>> a = (1,2) >>> dict([a]) {1: 2} -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
On Mon, May 23, 2011 at 8:41 PM, Octavian Rasnita wrote: > From: "Daniel Kluev" > As I said, that ORM is not able to do those SQL constructs without using > literal SQL code, but only Python variables and data structures... > An ORM is usually prefered exactly becaus

Re: Python 2.6 and timezones

2011-05-23 Thread Daniel Kluev
info-objects -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
On Mon, May 23, 2011 at 10:17 PM, Octavian Rasnita wrote: > From: "Daniel Kluev" > Aha, so with other words that ORM doesn't have that feature. > DBIX::Class also use the DateTime module, but it can use it directly, > without needing to write more code for t

Re: Python 2.6 and timezones

2011-05-23 Thread Daniel Kluev
emote_tz.utcoffset(now) datetime.timedelta(-1, 68400) You can add or substract these timedelta objects directly from datetime objects or use astimezone(): >>> now = datetime.now(local_tz) >>> now datetime.datetime(2011, 5, 23, 22, 41, 48, 398685, tzinfo=pytz.FixedOffset(600)) &

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
of proper 1, 3, as it does in python: >>> dict([[1,2], [3,4]]).keys() [1, 3] This is yet another example that you are just trolling here, making silly and unbacked claims, and ignoring any valid arguments you receive. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-24 Thread Daniel Kluev
gly syntax. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-26 Thread Daniel Kluev
of obscure "=>" pseudo-syntax to cover it up. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: GIL in alternative implementations

2011-05-27 Thread Daniel Kluev
hing is reasonable to do in real code, but cpython and other implementations with GIL at least give you some safety margin. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters

2011-05-30 Thread Daniel Kluev
On Mon, May 30, 2011 at 6:12 PM, Laurent Claessens wrote: > Could you give an example of an object that has no name ? I've missed > something ... >>> object() -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-30 Thread Daniel Kluev
x27; references to the list, which is referenced by obj1, and calls append method of this list, which modifies itself in place global obj1 obj1 = [] # 'a' still references to original list, which is [1] now, it have no relation to obj1 at all somefunc(obj1) -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-30 Thread Daniel Kluev
hon. On a sidenote, I wonder what is the reason to keep word 'variable' in python documentation at all. I believe word 'name' represents concept better, and those, who come from other languages, would be less likely to associate wrong definitions with it. -- With best regards,

Re: scope of function parameters (take two)

2011-05-30 Thread Daniel Kluev
n use map(lambda x: , list_of_x), and you will have your isolated scopes. Although due to lambdas supporting only expressions, following this style leads to awkward and complicated code (and/or instead if, map instead for, and so on). -- With best regards, Daniel Kluev -- http://mail.python.org/

Re: scope of function parameters (take two)

2011-05-30 Thread Daniel Kluev
/getitem can modify object too if class overrides them). Obviously it would not save you from functions which use global/globals() or some other ways to change state outside their scope. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-31 Thread Daniel Kluev
ords=None, defaults=None) So this decorator achieves needed result and preserves function signatures. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlalchemy and Unicode strings: errormessage

2011-05-31 Thread Daniel Kluev
xt)) Use UnicodeText instead of Text. > A_record = A_class('BUM', 'Bäumer') If this is python2.x, use u'Bäumer' instead. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-31 Thread Daniel Kluev
s exec to create new function, with signature of function you pass to your decorator, so it does not matter what names you used for args in decorator itself. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

on a very slow function

2017-10-01 Thread Daniel Bastos
def make_sequence_non_recursive(N, x0 = 2, c = -1): "What's wrong with this function? It's very slow." last = x0 def sequence(): nonlocal last next = last last = last**2 + c return next % N return sequence It crawls pretty soon. Please advise? Thank you. >>> f = make_se

Re: on a very slow function

2017-10-01 Thread Daniel Bastos
Chris Angelico writes: > On Mon, Oct 2, 2017 at 8:27 AM, Daniel Bastos wrote: >> def make_sequence_non_recursive(N, x0 = 2, c = -1): >> "What's wrong with this function? It's very slow." >> last = x0 >> def sequence(): >> nonlo

Re: on a very slow function

2017-10-02 Thread Daniel Bastos
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Daniel Bastos writes: >> That function produces a function which yields the values of the >> sequence x^2 - 1 mod N > > Thats a term with two free variables. > I am not sure what the sequence is. > > And if that&

Re: on a very slow function

2017-10-02 Thread Daniel Bastos
Chris Angelico writes: [...] > Maybe "linear_congruential" would be a good name for the function? I > don't know. Sounds good to me --- in absence of a smaller name. > Anyhow, the basic memoization technique should help you some. It did! Thanks so much to you and to everyone who contributed

Re: on a very slow function

2017-10-02 Thread Daniel Bastos
Ben Bacarisse writes: > Daniel Bastos writes: > >> def make_sequence_non_recursive(N, x0 = 2, c = -1): >> "What's wrong with this function? It's very slow." >> last = x0 >> def sequence(): >> nonlocal last >>

Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
I am very new to Python and have been struggling to find some info on processing IP addresses. get_network returns 192.168.1.128/25 but I need 192.168.1.128 only. I can do this with netaddr but I am working with Mako templates and ipaddress is a built in module so there are less dependencies.

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 12:37:03 PM UTC-5, Rob Gaddi wrote: > On 10/17/2017 09:59 AM, Daniel Flick wrote: > > I am very new to Python and have been struggling to find some info on > > processing IP addresses. > > > > get_network returns 192.168.1.128/25 but I

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
I was hoping for something more like netaddr.network. Trying to save lots of code as this will be inside a Mako template and I don't want it to get messy. Sounds like the split function will allow me to chop off the /xx from the end of the string which gives me what I need. Off to read docu

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
Peter, I am not following. Are you saying that there is a function that returns the network only? network_address was giving me the mask attached to the end but maybe I was doing something wrong. For an input of LAN_IP=192.168.99.1/24 ipaddress.IPv4Interface(LAN_IP).ip returns 192.168.99.0/

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 4:25:02 PM UTC-5, Daniel Flick wrote: > > Peter, I am not following. Are you saying that there is a function that > returns the network only? network_address was giving me the mask attached to > the end but maybe I was doing something wrong. >

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 5:01:13 PM UTC-5, Peter Otten wrote: > Daniel Flick wrote: > > > On Tuesday, October 17, 2017 at 4:25:02 PM UTC-5, Daniel Flick wrote: > >> > >> Peter, I am not following. Are you saying that there is a function that

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 8:27:03 PM UTC-5, Daniel Flick wrote: > On Tuesday, October 17, 2017 at 8:24:52 PM UTC-5, Daniel Flick wrote: > > On Tuesday, October 17, 2017 at 5:01:13 PM UTC-5, Peter Otten wrote: > > > Daniel Flick wrote: > > > > > > > On

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 8:24:52 PM UTC-5, Daniel Flick wrote: > On Tuesday, October 17, 2017 at 5:01:13 PM UTC-5, Peter Otten wrote: > > Daniel Flick wrote: > > > > > On Tuesday, October 17, 2017 at 4:25:02 PM UTC-5, Daniel Flick wrote: > > >> > &

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-19 Thread Daniel Flick
The problem was with the validation code. Within the python section of the template, the class IPv4Interface will throw an exception due to the invalid value during the validation process. Therefore, the server rejects the form data and the template is not created. Solution: It would work if y

IDLE doesn't recognise installed packages

2017-10-23 Thread Daniel Tangemann
hi, I've recently downloaded and installed python 3.6. (I had already also 2.7 and 3.2 on my computer) Initially pip was looking in the wrong directory to install to, so I changed that. then it had trouble installing matplotlib, so I decided to get rid of the older versions of python, which srew

Re: IDLE doesn't recognise installed packages

2017-10-25 Thread Daniel Tangemann
08:36 geschrieben: > > > On 10/23/2017 10:23 AM, Daniel Tangemann wrote: > > I've recently downloaded and installed python 3.6. (I had already also 2.7 > > and 3.2 on my computer) Initially pip was looking in the wrong directory to > > install to, so I changed that. th

Re: IDLE doesn't recognise installed packages

2017-10-26 Thread Daniel Tangemann
hi, I had tried typing: "path-to-binary -m pip Terry Reedy hat am 26. Oktober 2017 um 21:35 geschrieben: > > > On 10/26/2017 12:37 AM, Daniel Tangemann wrote: > > ok, I did that. I noticed that this path: > > 'C:\\Users\\Daniel86\\AppData\\Local\\Programs\

reading text in pdf, some working sample code

2017-11-21 Thread Daniel Gross
ncoding of the text included in the PDF when opening the file. Still trying to figure out how to get the encoding info out of the PDF ... (if available there) thank you, Daniel -- https://mail.python.org/mailman/listinfo/python-list

Tkinter not working

2022-08-01 Thread Daniel Lee
Hello, I my code with tkinter was working before, and now, it has many errors in it. I’m not sure what has happened. The results after running are below: "D:\Python Projects\tes\venv\Scripts\python.exe" "D:/Python Projects/tes/main.py" Traceback (most recent call last): File "D:\Python Project

回复: Problem using cx_Freeze > auto-py-to-exe

2022-08-19 Thread Daniel Lee
Thank you so much, I really appreciate it. 发件人: Chris Angelico 发送时间: 2022年8月19日 8:39 收件人: python-list@python.org 主题: Re: Problem using cx_Freeze > auto-py-to-exe On Fri, 19 Aug 2022 at 10:07, Grant Edwards wrote: > > On 2022-08-18, Chris An

回复: setup.py + cython == chicken and the egg problem

2022-08-19 Thread Daniel Lee
Thank you! 从 Windows 版邮件发送 发件人: Dan Stromberg 发送时间: 2022年8月19日 8:35 收件人: Python List 主题: Re: setup.py + cython == chicken and the egg problem On Tue, Aug 16, 2022 at 2:03 PM Dan Stromberg

回复: Problem using cx_Freeze

2022-08-19 Thread Daniel Lee
Thank you! 发件人: subin 发送时间: 2022年8月19日 8:02 收件人: python-list@python.org 主题: Re: Problem using cx_Freeze Hope you had a good time. On Wed, Aug 17, 2022 at 10:19 PM Peter J. Holzer wrote: > On 2022-08-17 12:09:14 -0600, David at Booom

回复: UTF-8 and latin1

2022-08-19 Thread Daniel Lee
Thanks! 发件人: Stefan Ram 发送时间: 2022年8月19日 6:23 收件人: python-list@python.org 主题: Re: UTF-8 and latin1 Tobiah writes: > When a person enters >Montréal, Quebéc into a form field, what are they >doing on the ke

Re: Ann: New Python curses book

2021-04-11 Thread Daniel Nelson
On Tue, Mar 30, 2021 at 12:12:19PM +0100, Alan Gauld via Python-list wrote: > I've just published, in Kindle and paperback formats, > my book on "Programming curses with Python". > > https://www.amazon.co.uk/dp/B091B85B77/ > > (It should be available in most other Amazon stores too) This looks h

Re: Python 3 tkinter graphical statistical distributions fitter

2016-08-24 Thread Daniel Riaño
Thanks, James! 2016-08-13 12:46 GMT+02:00 : > I created a Python 3 tkinter graphical statistical distributions fitting > application that will fit a 1D data set to all of the continuous > statistical distributions in scipy.stats, with graphical display of the > distributions plotted against norma

Re: Python 3 tkinter graphical statistical distributions fitter

2016-08-24 Thread Daniel Riaño
Please accept my apologies for sending the message to the full list 😬 2016-08-24 13:11 GMT+02:00 Daniel Riaño : > Thanks, James! > > 2016-08-13 12:46 GMT+02:00 : > >> I created a Python 3 tkinter graphical statistical distributions fitting >> application that will fit

Re: error from Popen only when run from cron

2018-04-17 Thread daniel . chmielewski
gt; can debug this further? Larry, I have exactly the same problem. I'd like to run a script and from normal user it works, and from cron doesn't. In sumarry I was googled to find information how to set two or more env. variables and pass them to subprocess.open. I also try to read

<    1   2   3   4   5   6   7   8   9   10   >